/* Virtual Files Admin Styles */

/* Modern Virtual Files Styles */
.virtual-files-meta {
    padding: 14px 15px !important;
}

/* File Content Metabox Padding */
.virtual-files-content-wrapper {
    padding: 14px 8px !important;
}

.virtual-files-meta .field-group {
    margin-bottom: 10px !important;
}

.virtual-files-meta .field-group label {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    color: #1e293b !important;
    display: block !important;
    width: 100% !important;
}

.virtual-files-meta .field-group input[type="text"],
.virtual-files-meta .field-group select,
.virtual-files-meta .field-group textarea,
.virtual-files-content-wrapper textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 18px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    background-color: #fff !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.virtual-files-meta .field-group input[type="text"]:focus,
.virtual-files-meta .field-group select:focus,
.virtual-files-meta .field-group textarea:focus,
.virtual-files-content-wrapper textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

.vf-filename-wrapper {
    display: flex !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    align-items: flex-end !important;
}

.vf-filename-wrapper input[type="text"] {
    flex: 2 !important;
    min-width: 300px !important;
    max-width: 420px !important;
    margin: 0 !important;
}

.vf-extension-dropdown {
    margin: 0 !important;
    min-width: 240px !important;
    max-width: 300px !important;
}

.virtual-files-meta .field-group .description {
    color: #64748b !important;
    font-size: 13px !important;
    margin-top: 10px !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 0 0!important;
    border-top: 1px solid #f1f5f9 !important;
}

.virtual-files-meta .field-group .description::before {
    content: "💡" !important;
    font-size: 14px !important;
    flex-shrink: 0 !important;
    margin-top: 1px !important;
}

/* MIME Type Display Styling */
.vf-mime-display {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 15px !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', Courier, monospace !important;
    color: #334155 !important;
    max-width: 500px !important;
}

.auto-detected-indicator {
    font-size: 12px !important;
    color: #64748b !important;
    background: #e2e8f0 !important;
    padding: 4px 8px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* File Name Wrapper Styling */
.vf-name-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    flex: 2 !important;
    min-width: 300px !important;
    max-width: 420px !important;
}

.vf-name-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    display: block !important;
}

.vf-name-label .required-asterisk {
    color: #ef4444 !important;
    margin-left: 4px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* File Type Wrapper Styling */
.vf-file-type-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    flex: 1 !important;
    min-width: 240px !important;
    max-width: 420px !important;
}

.vf-extension-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    display: block !important;
}

/* Second Row Styling */
.vf-second-row {
    display: flex !important;
    gap: 16px !important;
    margin-bottom: 10px !important;
    align-items: flex-end !important;
}

.vf-second-row .field-group {
    margin-bottom: 0 !important;
    flex: 1 !important;
    max-width: 420px !important;
}

.vf-second-row .field-group select {
    width: 100% !important;
    max-width: 420px !important;
}

.vf-second-row .vf-mime-display {
    width: 100% !important;
    max-width: 400px !important;
}

/* Responsive fixes */
@media screen and (max-width: 782px) {
    .virtual-files-meta {
        padding: 16px !important;
    }

    .vf-filename-wrapper {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .vf-second-row {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .vf-second-row .field-group {
        max-width: 100% !important;
    }

    .vf-second-row .field-group select,
    .vf-second-row .vf-mime-display {
        max-width: 100% !important;
    }

    .vf-name-wrapper,
    .vf-file-type-wrapper {
        min-width: auto !important;
        max-width: 100% !important;
    }

    .vf-name-wrapper input[type="text"],
    .vf-extension-dropdown {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Enhanced File Info Section Styles */
.vf-enhanced-info {
    margin-bottom: 16px;
}

.vf-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.vf-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.vf-info-mini-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.vf-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* URL Section Styles */
.vf-url-section {
    margin-bottom: 16px;
}

.vf-url-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.vf-url-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'SF Mono', 'Monaco', monospace;
    background: #f8fafc;
    color: #334155;
}

.vf-copy-btn, .vf-visit-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vf-copy-btn {
    background: #3b82f6;
    color: white;
}

.vf-copy-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.vf-visit-btn {
    background: #10b981;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vf-visit-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    color: white;
}

/* Quick Actions Section */
.vf-quick-actions {
    margin-bottom: 16px;
}

.vf-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.vf-action-btn {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.3;
}

.vf-action-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vf-upgrade-prompt {
    border-color: #10b981;
    color: #059669;
}

.vf-upgrade-prompt:hover {
    background: #f0fdf4;
    border-color: #059669;
}

/* Validation Section Styles */
.vf-validation-section {
    margin-bottom: 16px;
}

.vf-validation-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.vf-validation-item {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vf-validation-item.valid {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.vf-validation-item.invalid {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.vf-validation-item.warning {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
}

/* Enhanced Analytics Display */
.vf-analytics-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.vf-analytic-stat {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.vf-stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.vf-stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive adjustments for new sections */
@media screen and (max-width: 782px) {
    .vf-info-grid {
        grid-template-columns: 1fr;
    }

    .vf-url-container {
        flex-direction: column;
    }

    .vf-actions-grid {
        grid-template-columns: 1fr;
    }

    .vf-validation-items {
        flex-direction: column;
    }

    .vf-analytics-display {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Sidebar Styles */
.vf-enhanced-sidebar {
    padding: 0 !important;
}

.vf-sidebar-section {
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.vf-sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.vf-sidebar-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    display: block;
}

.vf-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.vf-sidebar-info {
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.vf-sidebar-info-label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.vf-sidebar-info-value {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.vf-url-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'SF Mono', 'Monaco', monospace;
    background: #f8fafc;
    margin-bottom: 8px;
}

.vf-sidebar-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.vf-sidebar-btn {
    padding: 8px 6px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.vf-copy-btn {
    background: #3b82f6;
    color: white;
}

.vf-copy-btn:hover {
    background: #2563eb;
}

.vf-visit-btn {
    background: #10b981;
    color: white;
    text-decoration: none;
}

.vf-visit-btn:hover {
    background: #059669;
}

.vf-action-btn {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #e2e8f0;
    padding: 8px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.vf-action-btn:hover {
    background: #e2e8f0;
}

.vf-upgrade-btn {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
}

.vf-upgrade-btn:hover {
    background: #059669;
}

.vf-validation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.vf-validation-item {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

.vf-validation-item.valid {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.vf-validation-item.warning {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.vf-url-copy-feedback {
    display: none;
    color: #2271b1;
    font-size: 11px;
    margin-left: 8px;
}

.vf-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.vf-analytic-item {
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.vf-analytic-number {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.vf-analytic-label {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* File Settings Controls */
.vf-control-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    display: block;
}

.vf-sidebar-select {
    width: 100%;
    padding: 8px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
    color: #1e293b;
    margin-bottom: 4px;
}

.vf-sidebar-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.vf-control-description {
    font-size: 10px;
    color: #6b7280;
    margin: 0;
    line-height: 1.3;
}

.vf-mime-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 4px;
}

.vf-mime-value {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', monospace;
    flex: 1;
}

.vf-modified-date {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono', 'Monaco', monospace;
    flex: 1;
}

.vf-mime-indicator {
    font-size: 10px;
    color: #6b7280;
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 500;
}

/* Pro Sidebar Styles */
.vf-pro-sidebar {
    text-align: center;
    padding: 0;
}

.vf-pro-sidebar .pro-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.vf-pro-sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f39c12;
    margin: 0 0 16px 0;
    text-align: center;
}

.vf-pro-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.vf-pro-sidebar li {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.vf-pro-sidebar li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.vf-pro-sidebar .upgrade-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    text-decoration: none;
    padding: 8px 10px;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.vf-pro-sidebar .upgrade-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #fff;
}

.vf-pro-sidebar .limit-info {
    background: #fef9e7;
    border: 1px solid #f1c40f;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #8a6d3b;
    line-height: 1.4;
}

/* Accessibility Indicators */
.vf-accessible-indicator {
    display: inline-block;
    color: #28a745;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
}

.vf-inaccessible-indicator {
    display: inline-block;
    color: #dc3545;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
}

/* File Link Display Styles */
.vf-file-link-display {
    margin-bottom: 15px;
}

.vf-file-link-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    background-color: #f8f9fa;
}

.vf-file-link-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vf-file-link-actions a {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vf-link-primary {
    background-color: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

.vf-link-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: white;
}

.vf-link-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.vf-link-secondary:hover {
    background-color: #e9ecef;
    color: #333;
}

/* Status Display Styles */
.vf-status-active {
    color: #28a745;
    font-weight: 600;
}

.vf-status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.vf-accessibility-indicator.vf-accessible {
    color: #28a745;
}

.vf-accessibility-indicator.vf-inaccessible {
    color: #dc3545;
}

/* Status Section Styles */
.vf-status-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.vf-pro-status-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.vf-lock-notification {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 11px;
    color: #991b1b;
    line-height: 1.4;
}

.vf-lock-notification strong {
    display: block;
    margin-bottom: 4px;
    color: #7f1d1d;
}
/* File Limit Banner - Compact with Details */
.vf-limit-banner .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.vf-limit-banner .button:active {
    transform: translateY(0);
}

/* Responsive design for limit banner */
@media (max-width: 1200px) {
    .vf-limit-banner > div {
        flex-wrap: wrap;
    }

    .vf-limit-banner .button {
        width: 100%;
        margin-top: 8px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 782px) {
    .vf-limit-banner {
        margin: 15px 10px 15px 0 !important;
        padding: 12px 14px !important;
    }

    .vf-limit-banner strong {
        font-size: 14px !important;
    }

    .vf-limit-banner p {
        font-size: 12px !important;
    }
}

@media (max-width: 600px) {
    .vf-limit-banner > div {
        gap: 10px !important;
    }

    .vf-limit-banner > div > div:first-of-type {
        font-size: 24px !important;
    }
}

/* Extension Tag Styles for Admin List */
.vf-extension-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    background-color: var(--tag-color);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Column Width Adjustments */
.column-vf_extension {
    width: 40px !important;
}
.column-vf_filename {
    width: 150px !important;
}
.column-vf_status {
    width: 75px !important;
}
.column-vf_accessibility {
    width: 30px !important;
}

/* Make Type column header smaller */
.column-vf_extension .manage-column {
    font-size: 11px !important;
}
/* AI Generation Styles */
#vf-ai-generate-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#vf-ai-generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.25);
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

#vf-ai-generate-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Modal */
.vf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
}

.vf-modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 100001;
    overflow: hidden;
    animation: vfModalSlideIn 0.2s ease-out;
}

@keyframes vfModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.vf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.vf-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
}

.vf-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.vf-modal-close:hover {
    color: #475569;
}

.vf-modal-body {
    padding: 20px;
}

.vf-modal-body .description {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 14px;
    color: #64748b;
}

#vf-ai-prompt {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

#vf-ai-prompt:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
    outline: none;
}

.vf-modal-footer {
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vf-modal-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.vf-ai-loading {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

#vf-ai-submit {
    background: #8b5cf6;
    border-color: #7c3aed;
}

#vf-ai-submit:hover {
    background: #7c3aed;
    border-color: #6d28d9;
}

#vf-ai-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* AI Improve Button */
#vf-ai-improve-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#vf-ai-improve-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.25);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

#vf-ai-improve-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Analyze Button */
#vf-ai-analyze-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#vf-ai-analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.25);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

#vf-ai-analyze-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Stream Output Box */
.vf-ai-stream-box {
    height: 200px;
    padding: 12px;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    border: 1px solid #334155;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Scrollbar for stream box */
.vf-ai-stream-box::-webkit-scrollbar {
    width: 8px;
}

.vf-ai-stream-box::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.vf-ai-stream-box::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.vf-ai-stream-box::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Action Buttons */
.vf-ai-action-btn {
    font-weight: 500 !important;
}

.vf-ai-action-btn[data-action="replace"] {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1 !important;
}

.vf-ai-action-btn[data-action="replace"]:hover {
    background: #e2e8f0;
    color: #dc2626; /* Warning color for replace */
    border-color: #cbd5e1 !important;
}

.vf-ai-action-btn[data-action="insert"],
.vf-ai-action-btn[data-action="append"] {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1 !important;
}

.vf-ai-action-btn[data-action="insert"]:hover,
.vf-ai-action-btn[data-action="append"]:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.vf-ai-action-btn[data-action="copy"] {
    background: #f1f5f9;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a;
}

.vf-ai-action-btn[data-action="copy"]:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8 !important;
}

/* Context Search Styles */
.vf-context-search-wrapper {
    margin-bottom: 8px;
}

.vf-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccd0d4;
    border-top: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 100002;
    max-height: 200px;
    overflow-y: auto;
}

.vf-search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.vf-search-result-item:hover {
    background: #f0f6fc;
    color: #2271b1;
}

.vf-attached-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.vf-attached-items:empty {
    display: none;
    margin-bottom: 0;
}

.vf-attached-items:not(:empty) {
    min-height: 28px;
}

.vf-chip {
    background: #e5e7eb;
    color: #374151;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vf-remove-attachment {
    cursor: pointer;
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #6b7280;
}

.vf-remove-attachment:hover {
    color: #ef4444;
}

/* AI History Sidebar Styles */
.vf-ai-history-sidebar {
    padding: 0;
}

.vf-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vf-history-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vf-history-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.vf-history-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.vf-history-icon {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #64748b;
}

.vf-history-label {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vf-history-time {
    font-size: 10px;
    color: #94a3b8;
    margin-left: auto;
}

.vf-history-delete {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.vf-history-delete:hover {
    color: #ef4444;
}

.vf-history-delete .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.vf-history-preview {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Analyze Footer Specific Styles */
#vf-ai-analyze-footer .vf-ai-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

#vf-download-analysis {
    background: #3b82f6;
    color: white;
    border: 1px solid #2563eb !important;
}

#vf-download-analysis:hover {
    background: #2563eb;
    border-color: #1d4ed8 !important;
}
