/* Smart Actions - Modern resizable chat panel */

/* Permission Modal Styling for Large Requests */
.permission-warning.large-request {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #e67e22;
    padding: 1rem;
    border-radius: var(--border-radius);
}

.permission-warning.large-request p {
    margin: 0.5rem 0;
    color: #d68910;
    font-weight: 500;
}

.permission-warning.large-request p:first-child {
    margin-top: 0;
}

.permission-warning.large-request p:last-child {
    margin-bottom: 0;
}

.permission-value.highlight-large {
    color: #e67e22;
    font-weight: 600;
    background: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Markdown Styling for Smart Actions Chat */
.smart-message-content .markdown-heading {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-color);
}

.smart-message-content .markdown-heading:first-child {
    margin-top: 0;
}

.smart-message-content h1.markdown-heading {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.smart-message-content h2.markdown-heading {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.smart-message-content h3.markdown-heading {
    font-size: 1.3rem;
}

.smart-message-content h4.markdown-heading,
.smart-message-content h5.markdown-heading,
.smart-message-content h6.markdown-heading {
    font-size: 1.1rem;
}

.smart-message-content .markdown-table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.smart-message-content .markdown-table th,
.smart-message-content .markdown-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.smart-message-content .markdown-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.smart-message-content .markdown-table tbody tr:hover {
    background: var(--surface-hover-color);
}

.smart-message-content .markdown-code-block {
    background: #f5f7fa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    tab-size: 4;
    -moz-tab-size: 4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

.smart-message-content .markdown-code-block code {
    background: none;
    padding: 0;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: #24292e;
    display: block;
    white-space: pre;
    word-wrap: normal;
}

/* Prism.js enhancements for better readability */
.smart-message-content .markdown-code-block .token.comment,
.smart-message-content .markdown-code-block .token.prolog,
.smart-message-content .markdown-code-block .token.doctype,
.smart-message-content .markdown-code-block .token.cdata {
    color: #6a737d;
    font-style: italic;
}

.smart-message-content .markdown-code-block .token.property,
.smart-message-content .markdown-code-block .token.tag,
.smart-message-content .markdown-code-block .token.boolean,
.smart-message-content .markdown-code-block .token.number,
.smart-message-content .markdown-code-block .token.constant,
.smart-message-content .markdown-code-block .token.symbol {
    color: #005cc5;
}

.smart-message-content .markdown-code-block .token.string,
.smart-message-content .markdown-code-block .token.char,
.smart-message-content .markdown-code-block .token.attr-value {
    color: #032f62;
}

.smart-message-content .markdown-code-block .token.keyword,
.smart-message-content .markdown-code-block .token.operator {
    color: #d73a49;
    font-weight: 600;
}

.smart-message-content .markdown-code-block .token.function,
.smart-message-content .markdown-code-block .token.class-name {
    color: #6f42c1;
}

.smart-message-content .markdown-code-block .token.punctuation {
    color: #24292e;
}

.smart-message-content code:not(.markdown-code-block code) {
    background: rgba(27, 31, 35, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.smart-message-content ul,
.smart-message-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.smart-message-content li {
    margin: 0.3rem 0;
    line-height: 1.5;
}

.smart-message-content p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.smart-message-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: rgba(var(--primary-color-rgb), 0.05);
    font-style: italic;
}

.smart-message-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 1.5rem 0;
}

/* Smart Actions Menu Dropdown */
.smart-actions-menu-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-actions-menu-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.smart-actions-menu-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Resizable Panel Layout - preserve existing layout while adding Smart Actions */
.playground-top {
    display: flex;
    flex-direction: row;
    /* Keep original height to preserve validation panel visibility */
}

.playground-main {
    display: flex;
    flex: 1;
    min-width: 0;
}

.smart-actions-panel {
    position: relative; /* Required for absolute positioning of resize handle */
    width: 400px;
    min-width: 300px;
    max-width: 50vw;
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    display: none; /* Hidden by default */
    flex-direction: column;
    /* Ensure panel doesn't hide validation section */
    height: 100%;
    overflow: hidden;
}

.smart-actions-panel.active {
    display: flex;
}

/* Panel Header - matches tab-bar height for consistent UI */
.smart-actions-header {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color-light), var(--surface-color));
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(0.875rem * 1.5 + 1.5rem + 2px); /* font-size * line-height + vertical padding + border */
    box-sizing: border-box;
}

.smart-actions-title-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.smart-actions-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.smart-actions-conversation-switcher {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    min-width: 0;
    max-width: 200px;
}

.smart-actions-conversation-switcher:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(var(--primary-color-rgb), 0.3);
}

.smart-actions-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.smart-actions-close:hover {
    background: var(--error-color);
    color: white;
}

/* Panel Content */
.smart-actions-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Interface */
.smart-actions-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    position: relative;
    border: none;
}

/* Empty State - positioned only over messages area, not input */
.smart-actions-empty-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* Don't set bottom - let input area be below */
    height: calc(100% - 150px); /* Exclude input area height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1; /* Above messages, but input will be outside this area */
}

.smart-actions-empty-content {
    text-align: center;
    max-width: 300px;
}

.smart-actions-empty-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.smart-actions-empty-content p {
    color: var(--text-color-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.smart-actions-analyze-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.smart-actions-analyze-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.smart-actions-analyze-btn:active {
    transform: translateY(0);
}

.smart-actions-messages {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: var(--background-color);
    scroll-behavior: smooth;
    resize: vertical;
    min-height: 200px;
    max-height: 60vh;
}

/* Message Styling */
.smart-message {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-in;
}

.smart-message:last-child {
    margin-bottom: 0;
}

.smart-message-streaming .smart-message-content::after {
    content: '▊';
    animation: blink 1s step-start infinite;
    margin-left: 2px;
    color: var(--primary-color);
}

.smart-message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.smart-message-role {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smart-message-role.user {
    color: var(--success-color);
}

.smart-message-role.assistant {
    color: var(--primary-color);
}

.smart-message-time {
    font-size: 0.7rem;
    color: var(--text-color-secondary);
    margin-left: auto;
}

.smart-message-content {
    line-height: 1.6;
    color: var(--text-color);
}

/* Markdown Content Styling */
.smart-message-content h1,
.smart-message-content h2,
.smart-message-content h3,
.smart-message-content h4,
.smart-message-content h5,
.smart-message-content h6 {
    font-family: var(--font-heading);
    margin: 1rem 0 0.5rem 0;
    color: var(--text-color);
}

.smart-message-content h1 { font-size: 1.2rem; font-weight: 700; }
.smart-message-content h2 { font-size: 1.15rem; font-weight: 600; }
.smart-message-content h3 { font-size: 1.1rem; font-weight: 600; }
.smart-message-content h4 { font-size: 1.05rem; font-weight: 600; }
.smart-message-content h5 { font-size: 1rem; font-weight: 500; }
.smart-message-content h6 { font-size: 0.95rem; font-weight: 500; }

.smart-message-content p {
    margin: 0.5rem 0;
}

.smart-message-content ul,
.smart-message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.smart-message-content code {
    background: var(--code-background);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.smart-message-content pre {
    background: var(--code-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 0.5rem 0;
    border-left: 3px solid var(--primary-color);
}

.smart-message-content pre code {
    background: none;
    padding: 0;
}

.smart-message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.smart-message-content th,
.smart-message-content td {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.smart-message-content th {
    background: var(--surface-color);
    font-weight: 600;
}

/* Input Area */
.smart-actions-input-area {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    background: var(--surface-color);
    position: relative;
    z-index: 10; /* Ensure input is always above empty state */
}

.smart-actions-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.smart-actions-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--background-color);
    color: var(--text-color);
    resize: vertical;
    transition: border-color 0.2s ease;
}

.smart-actions-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.smart-actions-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.smart-actions-shortcut-hint {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    font-style: italic;
    margin-right: auto;
}

.smart-actions-send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-actions-send-btn:hover {
    background: var(--primary-hover);
}

.smart-actions-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.smart-actions-config-btn {
    background: var(--surface-color);
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-actions-config-btn:hover {
    background: var(--background-color);
    color: var(--text-color);
}

/* Loading States */
.smart-actions-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color-secondary);
    font-style: italic;
    margin: 1rem 0;
}

.smart-actions-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Tool Call Indicator */
.smart-actions-tool-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin: 0.75rem 0;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--primary-color-rgb), 0.05));
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: var(--border-radius);
    animation: fadeIn 0.3s ease-in, pulse 2s ease-in-out infinite;
}

.smart-actions-tool-icon {
    font-size: 1.2rem;
}

.smart-actions-tool-message {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Dark mode tool indicator */
[data-theme="dark"] .smart-actions-tool-indicator {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.2), rgba(var(--primary-color-rgb), 0.1));
    border-color: rgba(var(--primary-color-rgb), 0.4);
}

/* Setup Modal */
.smart-actions-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.smart-actions-modal-content {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .smart-actions-modal-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .smart-actions-modal {
    background: rgba(0, 0, 0, 0.8);
}

.smart-actions-modal-header {
    margin-bottom: 1.5rem;
}

.smart-actions-modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.smart-actions-form-group {
    margin-bottom: 1.5rem;
}

.smart-actions-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.smart-actions-input,
.smart-actions-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: var(--background-color);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.smart-actions-input:focus,
.smart-actions-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.smart-actions-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.smart-actions-btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.smart-actions-btn-primary:hover {
    background: var(--primary-hover);
}

.smart-actions-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.smart-actions-btn-secondary {
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.smart-actions-btn-secondary:hover {
    background: var(--background-color);
}

.smart-actions-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Setup Form Messages */
.setup-error {
    background: rgba(var(--error-color-rgb), 0.1);
    color: var(--error-color);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--error-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.setup-success {
    background: rgba(var(--success-color-rgb), 0.1);
    color: var(--success-color);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--success-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Setup Form Specific Styles */
.smart-actions-setup-form .smart-actions-input[type="password"] {
    font-family: monospace;
}

.smart-actions-setup-form .smart-actions-input[type="number"] {
    text-align: right;
}

/* Provider-specific hints */
.provider-hint {
    font-size: 0.8rem;
    color: var(--text-color-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Resize Handle */
.smart-actions-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: ew-resize;
    background: transparent;
    transition: background 0.2s ease;
}

.smart-actions-resize-handle:hover,
.smart-actions-resize-handle.resizing {
    background: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .smart-actions-panel {
        width: 100%;
        max-width: none;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .playground-top {
        flex-direction: column;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .smart-actions-panel {
    border-left-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .smart-actions-header {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.15), var(--surface-color));
}

[data-theme="dark"] .smart-message-content pre {
    background: rgba(255, 255, 255, 0.05);
}

/* Dark mode code block styling */
[data-theme="dark"] .smart-message-content .markdown-code-block {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .smart-message-content .markdown-code-block code {
    color: #d4d4d4;
}

/* Dark mode Prism token colors */
[data-theme="dark"] .smart-message-content .markdown-code-block .token.comment,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.prolog,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.doctype,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.cdata {
    color: #6a9955;
}

[data-theme="dark"] .smart-message-content .markdown-code-block .token.property,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.tag,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.boolean,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.number,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.constant,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.symbol {
    color: #4fc1ff;
}

[data-theme="dark"] .smart-message-content .markdown-code-block .token.string,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.char,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.attr-value {
    color: #ce9178;
}

[data-theme="dark"] .smart-message-content .markdown-code-block .token.keyword,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.operator {
    color: #c586c0;
}

[data-theme="dark"] .smart-message-content .markdown-code-block .token.function,
[data-theme="dark"] .smart-message-content .markdown-code-block .token.class-name {
    color: #dcdcaa;
}

[data-theme="dark"] .smart-message-content .markdown-code-block .token.punctuation {
    color: #d4d4d4;
}

/* Permission Modal Specific Styles */
.permission-warning {
    background: rgba(var(--warning-color-rgb, 255, 193, 7), 0.1);
    border: 1px solid var(--warning-color, #ffc107);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.permission-warning p {
    margin: 0;
    color: var(--text-color);
}

.permission-details {
    margin-bottom: 1.5rem;
}

.permission-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.permission-info-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

.permission-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.permission-label {
    font-weight: 500;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
}

.permission-value {
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    color: var(--text-color);
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

/* Dark mode adjustments for permission modal */
[data-theme="dark"] .permission-info-item {
    background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   Smart Actions Diff Editor Action Bar
   ======================================== */

/* Action bar overlays above the editor when diff view is active */
.smart-diff-action-bar {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 100;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-diff-action-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.smart-diff-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.smart-diff-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    background: var(--background-color);
    color: var(--text-color);
}

.smart-diff-btn:hover {
    background: var(--surface-hover-color);
}

.smart-diff-btn-reject {
    border-color: var(--error-color);
    color: var(--error-color);
}

.smart-diff-btn-reject:hover {
    background: rgba(var(--error-color-rgb), 0.1);
}

.smart-diff-btn-approve {
    border-color: var(--success-color);
    color: var(--success-color);
}

.smart-diff-btn-approve:hover {
    background: rgba(var(--success-color-rgb), 0.1);
}

.smart-diff-btn:active {
    transform: scale(0.98);
}

/* Dark mode support */
[data-theme="dark"] .smart-diff-action-bar {
    background: var(--surface-color);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .smart-diff-action-bar {
        padding: 0.5rem 0.75rem;
    }

    .smart-diff-action-content {
        gap: 0.5rem;
    }

    .smart-diff-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}