/**
 * ProofPoints AI Integration - Frontend Styles
 * 
 * @package ProofPoints_AI_Integration
 * @subpackage Public
 * @since 18.1.0
 * 
 * Changelog:
 * v18.1.0 - Improved transcript card design (cleaner, removed hover tooltip)
 *         - Reduced transcript editor modal vertical space (~80px savings)
 */
 
/* ===============================================
   TRANSCRIPT TAB STYLING
   =============================================== */

.transcripts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;  /* Reduced from 15px */
}

.transcript-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transcript-section h3 {
    font-family: "Lexend Deca", sans-serif;
    font-size: 18px;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 3px;
}

.transcript-section p {
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    color: #666;
    margin-top: 0;
    margin-bottom: 8px;
}

.add-transcript-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #8b8680;
    color: white;
    border: none;
    border-radius: 25px;
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0px !important;
    width: auto;
}

#transcripts-accordion {
    margin-top: -5px !important;
}

.add-transcript-button:hover {
    background-color: #6d6a67;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.add-transcript-button svg {
    width: 18px;
    height: 18px;
}

/* Transcript Items - IMPROVED v18.1.0 */
.transcript-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;              /* Slightly smaller radius */
    overflow: hidden;
    margin-bottom: 8px;               /* Reduced from 10px */
    background: linear-gradient(to right, #fafafa, #ffffff);
    position: relative;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.transcript-item:hover {
    box-shadow: none !important;
    transform: none;
    border-color: #d1d5db;
    background: linear-gradient(to right, #f5f5f5, #ffffff);
}

.transcript-item.has-unsaved-changes {
    border-left: 4px solid #ffc107;
}

.transcript-header {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 8px 12px;               /* Increased from 4px 12px for better tap target */
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    min-height: 44px;
    gap: 8px;
}

.transcript-header:hover {
    background-color: #f8f9fa;
}

/* REMOVED: "Click to expand" tooltip - cleaner UI v18.1.0 */

.transcript-checkbox {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.transcript-checkbox input {
    margin-right: 4px;
}

.transcript-checkbox label {
    font-size: 10px;
    font-family: "Lexend Deca", sans-serif;
    color: #999;
    font-weight: 400;
}

.transcript-flag {
    margin-right: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    height: 20px !important;
}

.transcript-flag svg {
    width: 24px !important;
    height: 18px !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

.transcript-language {
    margin-right: 8px;
    font-size: 14px;
    font-family: "Lexend Deca", sans-serif;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
}

.transcript-name {
    flex: 1;
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.transcript-date {
    margin-right: 10px;
    color: #666;
    font-size: 11px;
    font-family: "Lexend Deca", sans-serif;
}

.transcript-save-indicator {
    font-size: 10px;
    font-family: "Lexend Deca", sans-serif;
    padding: 2px 6px;
    border-radius: 8px;
    margin-right: 8px;
    flex-shrink: 0;
}

.transcript-save-indicator.saving {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.transcript-save-indicator.saved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.transcript-save-indicator.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Transcript Actions */
.transcript-actions {
    display: flex;
    gap: 3px;
    align-items: center;
}

.transcript-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transcript-translate-btn {
    background: #E3F2FD !important;
    color: #1565C0 !important;
    border: 1px solid #1976D2 !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
    cursor: pointer;
    font-size: 10px !important;
    margin-right: 5px;
    font-family: "Lexend Deca", sans-serif;
    font-weight: 600 !important;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.transcript-translate-btn:hover {
    background: #1976D2 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.transcript-translate-btn:disabled {
    background: #f0f0f0 !important;
    color: #999 !important;
    border-color: #ddd !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.transcript-translate-btn .globe-icon {
    font-size: 12px;
}

.transcript-delete-btn svg {
    stroke: #f44336;
}

.transcript-actions button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.active-translations-counter {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-family: "Lexend Deca", sans-serif;
    font-weight: 500;
    margin-left: 10px;
    display: none;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.active-translations-counter.show {
    display: inline-block;
}

/* ===============================================
   TRANSCRIPT EDIT MODAL
   =============================================== */

.transcript-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;                    /* Add this - remove any padding */
    margin: 0;                     /* Add this - remove any margin */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
 
.transcript-edit-modal-dialog {
    background: white;
    border-radius: 0;
    box-shadow: none;              /* Can remove shadow for fullscreen */
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;                     /* Add this */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.transcript-edit-modal-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;              /* REDUCED from 20px 30px - saves ~16px */
    background: white;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.transcript-edit-modal-header-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;                       /* Reduced from 15px */
}

.transcript-edit-modal-flag {
    display: flex;
    align-items: center;
    padding: 4px;                    /* REDUCED from 8px */
    background: #f5f5f5;
    border-radius: 6px;
}

.transcript-edit-modal-flag svg {
    width: 24px;                     /* REDUCED from 32px */
    height: 18px;                    /* REDUCED from 24px */
}

.transcript-edit-modal-title {
    font-size: 18px;                 /* REDUCED from 22px */
    font-weight: 600;
    font-family: 'Lexend Deca', Arial, sans-serif;
    margin: 0;                       /* REMOVED margin-top: 8px */
    color: #333;
    display: flex;
    align-items: center;
}

.transcript-edit-modal-language {
    background: #f5f5f5;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transcript-edit-modal-close {
    background: white;               /* White background */
    border: 1px solid #e0e0e0;      /* Light border */
    border-radius: 6px;             /* Match other buttons */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.transcript-edit-modal-close:hover {
    background: #f5f5f5;            /* Light grey on hover */
    border-color: #1e2835;          /* Dark border on hover */
}

.transcript-edit-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #1e2835;                /* Dark X icon */
}

.transcript-edit-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;              /* REDUCED from 30px - saves ~30px */
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

.transcript-edit-modal-name-section {
    background: white;
    padding: 12px;                   /* REDUCED from 20px */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;             /* REDUCED from 20px */
    flex-shrink: 0;
}

.transcript-edit-modal-name-input {
    width: 100%;
    padding: 10px 14px;              /* REDUCED from 40px 18px */
    font-size: 15px;                 /* REDUCED from 16px */
    font-weight: 500;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Lexend Deca', Arial, sans-serif;
    transition: all 0.2s;
    line-height: 1.5;
}

.transcript-edit-modal-name-input:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
}

.transcript-edit-modal-editor-section {
    background: white;
    padding: 12px;                   /* REDUCED from 20px */
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* PPEditor inside transcript modal - fill container */
.transcript-edit-modal-editor-section .pp-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100% !important;
}

.transcript-edit-modal-editor-section .pp-editor-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
}

/* Tighter paragraph spacing for transcripts - single line spacing */
.transcript-edit-modal-editor-section .pp-editor-content p {
    margin: 0 0 0.35em 0;
}

/* Transcript text styling - timecodes and speaker names should be lighter */
.transcript-edit-modal-editor-section .pp-editor-content strong,
.transcript-edit-modal-editor-section .pp-editor-content b {
    font-weight: 400;
    color: #666;
}

.transcript-edit-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;               /* REDUCED from 12px 20px */
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    min-height: 44px;                /* REDUCED from 50px */
    gap: 16px;
}

/* Delete button on far left */
.transcript-edit-modal-footer > .transcript-edit-modal-delete-btn {
    margin-right: auto;
}

.transcript-edit-modal-status {
    display: flex;
    align-items: center;
}

.transcript-edit-modal-save-indicator {
    font-size: 11px;
    font-family: "Lexend Deca", sans-serif;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.transcript-edit-modal-save-indicator.saving {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.transcript-edit-modal-save-indicator.saved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.transcript-edit-modal-save-indicator.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.transcript-edit-modal-actions {
    display: flex;
    gap: 8px;
}

.transcript-edit-modal-close-btn {
    padding: 8px 20px;
    background: #1e2835;         /* Dark blue-grey */
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.transcript-edit-modal-close-btn:hover {
    background: #0f1419;         /* Darker on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.transcript-edit-modal-delete-btn {
    padding: 8px 16px;
    background: #fff;
    color: #f44336;
    border: 2px solid #f44336;
    border-radius: 6px;              /* Changed from 20px */
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.transcript-edit-modal-delete-btn:hover {
    background: #f44336;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.transcript-edit-modal-save-btn {
    padding: 8px 20px;
    background: #81b000;
    color: white;
    border: none;
    border-radius: 6px;              /* Changed from 20px */
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.transcript-edit-modal-save-btn:hover {
    background: #739c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.transcript-edit-modal-save-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* TinyMCE Editor Styling in Modal */
.transcript-edit-modal .tox-tinymce {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    overflow: hidden;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.transcript-edit-modal .tox-editor-header {
    background: #f8f8f8 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    flex-shrink: 0 !important;
}

.transcript-edit-modal .tox-editor-container {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.transcript-edit-modal .tox-edit-area {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

.transcript-edit-modal .tox-edit-area__iframe {
    height: 100% !important;
}

.transcript-edit-modal .mce-content-body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: visible !important;
    padding: 15px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.3em !important;
    font-weight: 300 !important;
}

.transcript-edit-modal .mce-content-body p {
    margin-bottom: 0.8em !important;
    line-height: 1.3em !important;
    font-size: 14px !important;
}

.transcript-edit-modal .mce-content-body h4 {
    font-weight: 400 !important;
    font-size: 16px !important;
    margin-top: 0 !important;
    line-height: 1.3em !important;
}

/* Speaker Rename Section */
.speaker-rename-section {
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

.speaker-rename-toggle {
    width: 100%;
    padding: 10px 16px;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.speaker-rename-toggle:hover {
    background: #f3f4f6;
}

.speaker-rename-toggle svg {
    width: 14px;
    height: 14px;
}

.speaker-rename-toggle .chev {
    transition: transform 0.2s;
}

.speaker-rename-toggle.open .chev {
    transform: rotate(180deg);
}

.speaker-rename-body {
    display: none;
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.speaker-rename-body.open {
    display: block;
}

.speaker-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.speaker-field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 3px;
}

.speaker-field input.speaker-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-size: 14px;
    color: #374151;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.speaker-field input.speaker-input:focus {
    outline: none;
    border-color: #80dabc;
    box-shadow: 0 0 0 2px rgba(128, 218, 188, 0.15);
}

.speaker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
}

.speaker-status {
    font-size: 11px;
    color: #6b7280;
}

.speaker-status.ok {
    color: #059669;
}

.apply-speakers-btn {
    background: #81b000;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Lexend Deca', Arial, sans-serif;
    transition: background-color 0.2s;
}

.apply-speakers-btn:hover {
    background: #6a9200;
}

.apply-speakers-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===============================================
   AUDIO TAB STYLING
   =============================================== */

.audio-header {
    margin-bottom: 20px;
}

.audio-header h3 {
    font-family: "Lexend Deca", sans-serif;
    font-size: 18px;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 3px;
}

.audio-header p {
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    color: #666;
    margin-top: 0;
    margin-bottom: 0;
}

.audio-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.audio-upload-column {
    flex: 1;
    min-width: 300px;
}

.audio-url-column {
    flex: 1;
    min-width: 300px;
}

.audio-upload-area {
    border: 2px dashed #1a73e8;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #E8F0FE;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: auto !important;
    position: relative;
}

.audio-upload-area:hover,
.audio-upload-area-dragover {
    border-color: #1a73e8;
    background-color: rgba(26, 115, 232, 0.1);
}

.audio-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.url-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
    color: #1a73e8;
}

.audio-upload-area h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 16px;
    font-family: "Lexend Deca", sans-serif;
}

.audio-upload-area p {
    margin: 3px 0;
    color: #666;
    font-family: "Lexend Deca", sans-serif;
    font-size: 13px;
}

.file-types {
    color: #666;
    font-size: 12px;
    margin-top: 10px;
    font-family: "Lexend Deca", sans-serif;
}

.file-types .size-info {
    color: #1a73e8;
    font-weight: 600;
    display: block;
    margin-top: 5px;
}

.audio-upload-input {
    display: none;
}

.url-input-section {
    padding: 20px;
    background: #f0f8ff;
    border-radius: 10px;
    border: 2px dashed #1a73e8;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.url-input-section:hover {
    background-color: rgba(26, 115, 232, 0.05);
}

.url-input-section h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 16px;
    font-family: "Lexend Deca", sans-serif;
    color: #333;
}

.url-input-section p {
    margin: 3px 0 10px 0;
    font-size: 13px;
    color: #666;
    font-family: "Lexend Deca", sans-serif;
}

.url-input-section input {
    width: 80%;
    max-width: 400px;
    padding: 8px 12px;
    margin: 10px auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Lexend Deca", sans-serif;
    display: block;
}

.url-process-btn-container {
    margin-top: 15px;
    text-align: center;
}

.audio-controls {
    margin-bottom: 15px;
    width: 100%;
}

.audio-status {
    margin-bottom: 8px;
    color: #333;
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.audio-progress {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.audio-progress-bar {
    height: 100%;
    background-color: #1a73e8;
    width: 0;
    transition: width 0.2s ease;
}

.audio-actions {
    margin-top: 15px;
    text-align: center;
}

.process-audio-btn {
    padding: 8px 16px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: "Lexend Deca", sans-serif;
    transition: background-color 0.3s ease;
}

.process-audio-btn:hover {
    background-color: #1557b0;
}

.process-audio-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Fix for wide upload boxes on large screens */
#audio-tab .audio-upload-area,
#audio-tab .url-input-section {
    max-width: 450px !important;
    margin: 0 auto !important;
}

#audio-tab > div:has(.audio-upload-area) {
    max-width: 1000px !important;
    margin: 0 auto !important;
    display: flex !important;
    gap: 30px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.audio-upload-column,
.audio-url-column {
    flex: 0 1 450px !important;
    max-width: 450px !important;
}

/* ===============================================
   MODAL SYSTEM
   =============================================== */

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Delete Confirmation Modal */
.delete-confirm-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    animation: modalSlideIn 0.3s ease-out !important;
    width: 100vw !important;
    height: 100vh !important;
}

.delete-confirm-modal .modal-dialog {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.delete-confirm-modal .modal-header {
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.delete-confirm-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    font-family: 'Lexend Deca', sans-serif;
}

.delete-confirm-modal .modal-body {
    padding: 24px;
}

.delete-confirm-modal .modal-body p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Lexend Deca', sans-serif;
}

.delete-confirm-modal .modal-footer {
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.delete-confirm-modal .cancel-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-confirm-modal .cancel-btn:hover {
    background: #e8e8e8;
}

.delete-confirm-modal .delete-btn {
    padding: 8px 16px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-confirm-modal .delete-btn:hover {
    background: #d32f2f;
}

.delete-confirm-modal .delete-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Rewrite Story Confirmation Modal */
.rewrite-confirm-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    animation: modalSlideIn 0.3s ease-out !important;
    width: 100vw !important;
    height: 100vh !important;
}

.rewrite-confirm-modal .modal-dialog {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rewrite-confirm-modal .modal-header {
    padding: 20px 24px;
    background: #f0f7ff;
    border-bottom: 1px solid #d0e4f7;
}

.rewrite-confirm-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1976D2;
    font-family: 'Lexend Deca', sans-serif;
}

.rewrite-confirm-modal .modal-body {
    padding: 24px;
}

.rewrite-confirm-modal .modal-body p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Lexend Deca', sans-serif;
}

.rewrite-confirm-modal .modal-body p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: #333;
}

.rewrite-confirm-modal .modal-footer {
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.rewrite-confirm-modal .cancel-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.rewrite-confirm-modal .cancel-btn:hover {
    background: #e8e8e8;
}

.rewrite-confirm-modal .rewrite-btn {
    padding: 8px 20px;
    background: #1976D2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.rewrite-confirm-modal .rewrite-btn:hover {
    background: #1565C0;
}

.rewrite-confirm-modal .rewrite-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* Add Transcript Modal */
.add-transcript-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 540px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    font-family: 'Lexend Deca', sans-serif;
    z-index: 999999;
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

.add-transcript-modal-dialog {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.add-transcript-modal-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.add-transcript-modal-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    backdrop-filter: blur(10px);
}

.add-transcript-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.add-transcript-modal-upload-area {
    border: 2px dashed #764ba2;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9ff 0%, #f5f7ff 100%);
    margin-bottom: 20px;
}

.add-transcript-modal-upload-area:hover,
.add-transcript-modal-upload-area.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f4ff 100%);
    transform: translateY(-2px);
}

.add-transcript-modal-upload-area .transcript-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: #764ba2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.add-transcript-modal-upload-area h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    font-family: 'Lexend Deca', sans-serif;
}

.add-transcript-modal-upload-area p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
    font-family: 'Lexend Deca', sans-serif;
}

.add-transcript-modal-upload-area .transcript-file-types {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    background: rgba(118, 75, 162, 0.1);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #764ba2;
    font-family: 'Lexend Deca', sans-serif;
}

.add-transcript-modal-name-section {
    margin-bottom: 20px;
}

.add-transcript-modal-name-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    font-family: 'Lexend Deca', sans-serif;
}

.add-transcript-modal-name-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lexend Deca', sans-serif;
    transition: all 0.2s;
    box-sizing: border-box;
}

.add-transcript-modal-name-section input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 4px rgba(118, 75, 162, 0.1);
}

.add-transcript-modal-language-section {
    margin-bottom: 20px;
}

.add-transcript-modal-language-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    font-family: 'Lexend Deca', sans-serif;
}

.add-transcript-modal-language-section select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lexend Deca', sans-serif;
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.add-transcript-modal-language-section select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 4px rgba(118, 75, 162, 0.1);
}

.add-transcript-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.add-transcript-modal-status {
    flex: 1;
    font-size: 13px;
    color: #666;
    font-family: 'Lexend Deca', sans-serif;
}

.add-transcript-modal-actions {
    display: flex;
    gap: 12px;
}

.add-transcript-modal .cancel-btn {
    padding: 10px 24px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.add-transcript-modal .cancel-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.add-transcript-modal .upload-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.3);
}

.add-transcript-modal .upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
}

.add-transcript-modal .upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-transcript-modal .upload-btn svg {
    width: 16px;
    height: 16px;
}

/* Progress Modal */
.progress-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 480px;
    max-width: 90vw;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
    font-family: 'Lexend Deca', sans-serif;
    z-index: 9999999;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.progress-modal-header {
    display: flex;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.progress-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.progress-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    animation: progressPulse 2s infinite ease-in-out;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

@keyframes progressPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }
}

.progress-modal-icon.transcription {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
}

.progress-modal-icon.translation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(118, 75, 162, 0.4);
}

.progress-modal-icon.generation {
    background: linear-gradient(135deg, #81b000 0%, #5d8a00 100%);
    box-shadow: 0 8px 24px rgba(129, 176, 0, 0.4);
}

.progress-modal-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 2.5;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.progress-modal-title {
    flex: 1;
    position: relative;
    z-index: 1;
}

.progress-modal-title h4 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

.progress-modal-title p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-modal-message {
    padding: 28px;
    background: white;
    position: relative;
}

.progress-modal-message p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
}

.progress-bar-container {
    margin: 20px 0 24px 0;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border-radius: 12px;
    height: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #81b000 0%, #5d8a00 50%, #4a6f00 100%);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(129, 176, 0, 0.3);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 12px;
}

.progress-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.progress-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.progress-modal-close svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 2.5;
}

/* Enhanced animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) translateY(0);
    }
}

@keyframes progressShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Success state styling */
.progress-modal.success .progress-modal-header {
    background: linear-gradient(135deg, #81b000 0%, #5d8a00 100%);
}

.progress-modal.success .progress-modal-icon {
    background: linear-gradient(135deg, #81b000 0%, #5d8a00 100%);
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .progress-modal {
        width: 90vw;
        max-width: 400px;
        margin: 20px;
    }

    .progress-modal-header {
        padding: 20px;
    }

    .progress-modal-icon {
        width: 48px;
        height: 48px;
        margin-right: 16px;
    }

    .progress-modal-icon svg {
        width: 24px;
        height: 24px;
    }

    .progress-modal-title h4 {
        font-size: 18px;
    }

    .progress-modal-title p {
        font-size: 13px;
    }

    .progress-modal-message {
        padding: 20px;
    }

    .progress-modal-message p {
        font-size: 14px;
    }
}

/* LLM Version Tabs */
.llm-version-tabs {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.llm-tabs-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
}

.llm-tab-buttons {
    display: flex;
    gap: 4px;
}

.llm-tab-btn {
    padding: 6px 14px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Lexend Deca', sans-serif;
    position: relative;
    white-space: nowrap;
}

.llm-tab-btn:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.llm-tab-btn.active {
    background: #C0E600;
    color: #333;
    border-color: #C0E600;
}

.llm-tab-btn.live-story-tab.active {
    background: #81b000 !important;
    border-color: #81b000 !important;
    color: white !important;
}

.llm-tab-btn.active::after {
    display: none;
}

.llm-tabs-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* NEW */
    gap: 12px;                       /* INCREASED */
    width: 100%;                     /* NEW */
}

.save-current-version-btn,
.save-as-live-story-btn {
    padding: 6px 16px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-family: 'Lexend Deca', sans-serif !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.save-current-version-btn {
    background: #2196F3 !important;
    color: white !important;
}

.save-current-version-btn:hover {
    background: #1976D2 !important;
}

.save-as-live-story-btn {
    background: #C0E600 !important;
    color: #333 !important;
}

.save-as-live-story-btn:hover {
    background: #a8c700 !important;
}

.save-current-version-btn:disabled,
.save-as-live-story-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
}

/* Loading and Error States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    font-family: 'Lexend Deca', sans-serif;
    font-size: 16px;
    font-weight: 300;
}

.loading:after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid #c0e600;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    padding: 20px;
    color: #f44336;
    background-color: #ffebee;
    border-radius: 4px;
    font-family: 'Lexend Deca', sans-serif;
}

/* ===============================================
   GENERATION METHOD MODAL - CLEAN TEAL DESIGN
   =============================================== */

.generation-method-modal {
    position: fixed;
    inset: 0;
    z-index: 10000004;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generation-method-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.generation-method-modal-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: 600px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 2;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.generation-method-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.generation-method-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.generation-method-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generation-method-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.generation-method-close svg {
    width: 20px;
    height: 20px;
}

.generation-method-modal-body {
    padding: 24px;
}

.generation-method-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.generation-method-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.generation-method-option:hover {
    border-color: #80DABC;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 218, 188, 0.15);
}

.generation-method-option-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.generation-method-option:hover .generation-method-option-icon {
    border-color: #80DABC;
    background: rgba(128, 218, 188, 0.1);
}

.generation-method-option-icon svg {
    stroke: #6b7280;
    transition: stroke 0.2s ease;
}

.generation-method-option:hover .generation-method-option-icon svg {
    stroke: #80DABC;
}

.generation-method-option h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.generation-method-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.generation-method-features span {
    font-size: 13px;
    font-family: 'Lexend Deca', sans-serif;
    color: #6b7280;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.generation-method-option:hover .generation-method-features span {
    border-color: rgba(128, 218, 188, 0.3);
    background: rgba(128, 218, 188, 0.05);
}

.generation-method-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.generation-cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f3f4f6;
    color: #374151;
}

.generation-cancel-btn:hover {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 680px) {
    .generation-method-modal-dialog {
        width: 95vw;
    }
    
    .generation-method-options {
        grid-template-columns: 1fr;
    }
}

.generation-method-option p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

.generation-method-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.generation-method-features span {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

.generation-method-modal-footer {
    display: flex;
    justify-content: center;
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.generation-method-modal-footer .cancel-btn {
    padding: 10px 24px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.generation-method-modal-footer .cancel-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Audio Naming Modal */
.audio-naming-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Lexend Deca', Arial, sans-serif;
    animation: fadeIn 0.3s ease-out;
}

.audio-naming-modal .modal-dialog {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

.audio-naming-modal .modal-header {
    display: flex;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    position: relative;
}

.audio-naming-modal .modal-header .modal-icon {
    margin-right: 16px;
}

.audio-naming-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

.audio-naming-modal .modal-header p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.audio-naming-modal .modal-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.audio-naming-modal .transcription-info {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #1a73e8;
}

.audio-naming-modal .transcription-info h4 {
    margin: 0 0 12px 0;
    color: #1a73e8;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

.audio-naming-modal .transcription-info .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 14px;
    font-weight: 400;
}

.audio-naming-modal .transcription-info .info-item {
    display: flex;
    flex-direction: column;
}

.audio-naming-modal .transcription-info .info-label {
    font-weight: 500;
    color: #333;
    font-size: 12px;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.audio-naming-modal .transcription-info .info-value {
    color: #555;
    font-size: 13px;
}

.audio-naming-modal .name-section {
    display: flex;
    flex-direction: column;
}

.audio-naming-modal .name-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

.audio-naming-modal .name-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lexend Deca', Arial, sans-serif;
    transition: all 0.2s;
    box-sizing: border-box;
}

.audio-naming-modal .name-section input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.audio-naming-modal .webhook-section {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.audio-naming-modal .webhook-section input[type="checkbox"] {
    margin-right: 12px;
    width: 16px;
    height: 16px;
}

.audio-naming-modal .webhook-section label {
    margin: 0;
    font-size: 14px;
    color: #555;
    font-family: 'Lexend Deca', Arial, sans-serif;
    cursor: pointer;
}

.audio-naming-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.audio-naming-modal .cancel-btn {
    padding: 10px 24px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.audio-naming-modal .cancel-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.audio-naming-modal .process-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.audio-naming-modal .process-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.audio-naming-modal .process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    #audio-tab > div:has(.audio-upload-area) {
        flex-direction: column !important;
    }

    .audio-upload-column,
    .audio-url-column {
        max-width: 100% !important;
        margin-bottom: 20px !important;
    }

    .transcript-edit-modal-dialog {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
    }

    .generation-method-modal-dialog {
        max-width: calc(100vw - 40px);
        margin: 20px;
    }

    .generation-method-modal-body {
        padding: 20px;
    }

    .generation-method-option {
        padding: 16px;
    }

    .generation-method-option-icon {
        width: 48px;
        height: 48px;
        margin-right: 16px;
    }

    .generation-method-option-icon svg {
        width: 24px;
        height: 24px;
    }

    .audio-naming-modal .modal-dialog {
        max-width: calc(100vw - 40px);
        margin: 20px;
    }

    .audio-naming-modal .modal-body {
        padding: 20px;
    }

    .audio-naming-modal .modal-header {
        padding: 20px;
    }

    .audio-naming-modal .modal-footer {
        padding: 16px 20px;
    }
}

/* Transcript tab with sources layout */
.transcript-tab-with-sources {
    display: flex;
    gap: 20px;
    height: 600px;
    position: relative;
}

/* =========================================
   STORY SOURCES SIDEBAR - WHITE CLEAN VERSION
   ========================================= */

/* Sidebar Container */
.story-sources-sidebar {
    width: 280px;
    min-width: 280px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
}

/* Drag over state */
.story-sources-sidebar.drag-over {
    background: #f0f9ff;
    border-color: #3b82f6;
}

.sources-sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
}

/* Header */
.sources-sidebar-header {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    font-family: 'Lexend Deca', sans-serif;
}

/* Action Buttons */
.sources-action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sources-upload-btn,
.sources-link-btn {
    flex: 1;
    padding: 8px 12px;
    background: #374151;
    color: white;
    border: 1px solid #374151;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sources-upload-btn:hover,
.sources-link-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sources-upload-btn:active,
.sources-link-btn:active {
    transform: translateY(0);
}

/* Sources Tiles Container */
.sources-tiles-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual Source Tile */
.source-tile {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    gap: 10px;
    min-height: 56px;
    animation: slideInLeft 0.3s ease;
}

.source-tile:hover {
    border-color: #c7d2fe;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.source-tile[data-loading="true"] {
    opacity: 0.6;
    pointer-events: none;
}

.source-tile.removing {
    animation: fadeOut 0.2s ease forwards;
}

/* Icon Circle */
.source-tile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Source Info */
.source-tile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.source-tile-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    font-family: 'Lexend Deca', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-tile-date {
    font-size: 11px;
    color: #6b7280;
    font-family: 'Lexend Deca', sans-serif;
}

.source-tile-progress {
    font-size: 11px;
    color: #3b82f6;
    font-family: 'Lexend Deca', sans-serif;
}

/* Remove Button */
.source-tile-remove {
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.source-tile-remove:hover:not(:disabled) {
    color: #ef4444;
}

.source-tile-remove:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Empty State */
.sources-tiles-container:empty::after {
    content: 'No sources added yet. Upload files or add links to enhance your story generation.';
    display: block;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    font-family: 'Lexend Deca', sans-serif;
    line-height: 1.5;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

/* Scrollbar Styling */
.sources-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sources-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sources-sidebar-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sources-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* =========================================
   LINK MODAL
   ========================================= */

.sources-link-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.sources-link-modal[style*="display: flex"],
.sources-link-modal[style*="display: block"] {
    display: flex !important;
}

.sources-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.sources-modal-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1;
}

.sources-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.sources-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.sources-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sources-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.sources-modal-body {
    padding: 24px;
}

.sources-modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    color: #374151;
    margin-bottom: 8px;
}

.sources-modal-body input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lexend Deca', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sources-modal-body input[type="url"]:focus {
    outline: none;
    border-color: #80DABC;
    box-shadow: 0 0 0 3px rgba(128, 218, 188, 0.1);
}

.sources-modal-body input[type="url"]::placeholder {
    color: #9ca3af;
}

.sources-modal-hint {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #6b7280;
    font-family: 'Lexend Deca', sans-serif;
}

.sources-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.sources-modal-btn-cancel,
.sources-modal-btn-add {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sources-modal-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.sources-modal-btn-cancel:hover {
    background: #e5e7eb;
}

.sources-modal-btn-add {
    background: #80DABC;
    color: white;
}

.sources-modal-btn-add:hover {
    background: #6bc9aa;
}

.sources-modal-btn-add:active {
    transform: translateY(1px);
}

.sources-modal-btn-add:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    .story-sources-sidebar {
        width: 240px;
        min-width: 240px;
    }
    
    .sources-sidebar-content {
        padding: 15px;
    }
    
    .source-tile {
        padding: 8px 10px;
    }
    
    .source-tile-icon {
        width: 28px;
        height: 28px;
    }
    
    .source-tile-name {
        font-size: 12px;
    }
    
    .sources-modal-dialog {
        width: 95vw;
        margin: 0 2.5vw;
    }
}


/* Main transcripts area */
.transcripts-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    min-height: 0; /* Important for flexbox */
}

/* Ensure the container uses full height */
#transcript-tab {
    height: 100%;
    overflow: hidden;
}

.transcript-tab-with-sources {
    display: flex;
    gap: 20px;
    height: 100%;
    position: relative;
}

/* Ensure sources panel doesn't overflow */
.sources-panel {
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sources-content {
    overflow-y: auto;
    flex: 1;
}

/* Update upload area for unified uploads */
.transcript-upload-area {
    border: 2px dashed #81b000 !important;
    background: #fafafa;
    padding: 30px !important;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.transcript-upload-area.dragover {
    background: #e8f5e9 !important;
    border-color: #4caf50 !important;
    transform: scale(1.01);
}

.transcript-upload-area h4 {
    margin: 10px 0 15px 0;
    color: #333;
    font-size: 18px;
}

.transcript-upload-area p {
    line-height: 1.5;
}

.transcript-upload-area strong {
    color: #81b000;
}

/* Unified Upload Area */
.unified-upload-area {
    border: 2px dashed #81b000;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.unified-upload-area:hover {
    background: #f5f5f5;
    border-color: #6d9400;
}

.unified-upload-area.drag-over {
    background: #e8f5e9;
    border-color: #4caf50;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-types {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}



/* Hide the old upload area completely */
.unified-upload-area {
    display: none;
}

/* Make the whole area draggable */
.draggable-zone {
    min-height: 400px;
    position: relative;
}

/* Subtle hover effect */
.draggable-zone:hover {
    background: rgba(0, 0, 0, 0.01);
}

/* Drag over effect */
.draggable-zone.drag-over {
    background: rgba(200, 200, 200, 0.05);
    border: 1px dashed #ccc;
    border-radius: 8px;
}

.draggable-zone.drag-over::after {
    content: 'Drop files here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #999;
    font-weight: 400;
    pointer-events: none;
    background: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Lexend Deca', sans-serif;
    border: 1px solid #e0e0e0;
}

/* Help text styling */
.help-text {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
    font-style: italic;
}



/* Hide ugly default upload area */
.unified-upload-area {
    display: none !important;
}

/* Make draggable zone more obvious on drag */
.draggable-zone.drag-over {
    background: rgba(200, 200, 200, 0.05) !important;
    border: 1px dashed #ccc !important;
    border-radius: 8px !important;
}

.draggable-zone.drag-over::after {
    content: 'Drop files here' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 14px !important;
    color: #999 !important;
    font-weight: 400 !important;
    pointer-events: none !important;
    background: white !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    font-family: 'Lexend Deca', Arial, sans-serif !important;
    border: 1px solid #e0e0e0 !important;
}

/* =========================================
   UNIFIED UPLOAD MODAL - CLEAN STYLE
   ========================================= */

.unified-upload-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000001 !important;
    align-items: center;
    justify-content: center;
}

.unified-upload-modal[style*="display: flex"],
.unified-upload-modal[style*="display: block"] {
    display: flex !important;
}

.unified-upload-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.unified-upload-modal .modal-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1;
}

.unified-upload-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.unified-upload-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.unified-upload-modal .modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unified-upload-modal .modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.unified-upload-modal .modal-body {
    padding: 24px;
}

.unified-upload-modal .file-info {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.unified-upload-modal .file-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-family: 'Lexend Deca', sans-serif;
    color: #374151;
}

.unified-upload-modal .file-info p:last-child {
    margin-bottom: 0;
}

.unified-upload-modal .name-input-group,
.unified-upload-modal .language-select-group {
    margin-bottom: 20px;
}

.unified-upload-modal label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    color: #374151;
    margin-bottom: 8px;
}

.unified-upload-modal input[type="text"],
.unified-upload-modal select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lexend Deca', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.unified-upload-modal input[type="text"]:focus,
.unified-upload-modal select:focus {
    outline: none;
    border-color: #80DABC;
    box-shadow: 0 0 0 3px rgba(128, 218, 188, 0.1);
}

.unified-upload-modal .modal-hint {
    margin: 12px 0 0 0;
    font-size: 12px;
    color: #6b7280;
    font-family: 'Lexend Deca', sans-serif;
}

.unified-upload-modal .modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.unified-upload-modal .btn-cancel,
.unified-upload-modal .btn-proceed {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-upload-modal .btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.unified-upload-modal .btn-cancel:hover {
    background: #e5e7eb;
}

.unified-upload-modal .btn-proceed {
    background: #80DABC;
    color: white;
}

.unified-upload-modal .btn-proceed:hover {
    background: #6bc9aa;
}

.unified-upload-modal .btn-proceed:active {
    transform: translateY(1px);
}

/**
 * FIXED AUDIO PROGRESS MODAL STYLING
 * Removes ugly "Cancel Transcription" button and adds proper Cancel + Close buttons
 * to match the unified modal design
 * 
 * Replace the audio progress modal section in public.css with this
 */

/* =========================================
   AUDIO PROGRESS MODAL - FIXED VERSION
   ========================================= */

.audio-progress-modal {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000002 !important;
    align-items: center;
    justify-content: center;
}

.audio-progress-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.audio-progress-modal .modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1;
}

.audio-progress-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.audio-progress-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.audio-progress-modal .modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-progress-modal .modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.audio-progress-modal .modal-body {
    padding: 24px 20px;
}

.audio-progress-modal .modal-subtitle {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: #6b7280;
    font-family: 'Lexend Deca', sans-serif;
    text-align: center;
}

.audio-progress-modal .progress-stages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.audio-progress-modal .progress-stage {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: #f9fafb;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.audio-progress-modal .progress-stage.active {
    opacity: 1;
    background: #f0fdf4;
    border: 1px solid #80DABC;
}

.audio-progress-modal .stage-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    flex-shrink: 0;
}

.audio-progress-modal .progress-stage.active .stage-icon {
    background: #80DABC;
    color: white;
}

.audio-progress-modal .stage-content {
    flex: 1;
}

.audio-progress-modal .stage-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    font-family: 'Lexend Deca', sans-serif;
    margin-bottom: 4px;
}

.audio-progress-modal .stage-text {
    font-size: 13px;
    color: #6b7280;
    font-family: 'Lexend Deca', sans-serif;
}

.audio-progress-modal .progress-bar-container {
    margin-top: 24px;
}

.audio-progress-modal .progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.audio-progress-modal .progress-fill {
    height: 100%;
    background: #80DABC;
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

/* ✅ FIXED FOOTER WITH PROPER BUTTONS */
.audio-progress-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
}

/* ✅ Cancel button - light gray (stops process) */
.audio-progress-modal .cancel-progress-btn {
    padding: 10px 20px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-progress-modal .cancel-progress-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* ✅ Close button - dark gray (just closes modal) */
.audio-progress-modal .close-progress-btn {
    padding: 10px 20px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.audio-progress-modal .close-progress-btn:hover {
    background: #5a6678;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.audio-progress-modal .close-progress-btn:active,
.audio-progress-modal .cancel-progress-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ❌ REMOVE THE OLD UGLY BUTTON */
.audio-progress-modal .cancel-transcription-btn {
    display: none !important;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    .audio-progress-modal .modal-dialog {
        width: 95vw;
        margin: 0 2.5vw;
    }
    
    .audio-progress-modal .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .audio-progress-modal .cancel-progress-btn,
    .audio-progress-modal .close-progress-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===============================================
   LANGUAGE TRANSLATION MODAL
   =============================================== */

.language-modal {
    position: fixed;
    inset: 0;
    z-index: 10000003;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.language-modal-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 2;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.language-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.language-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.language-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.language-modal-close svg {
    width: 20px;
    height: 20px;
}

.language-modal-body {
    padding: 24px;
}

.language-modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    color: #374151;
    margin-bottom: 12px;
}

.language-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Lexend Deca', sans-serif;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow-y: auto;
}

.language-select:focus {
    outline: none;
    border-color: #80DABC;
    box-shadow: 0 0 0 3px rgba(128, 218, 188, 0.1);
}

.language-select option {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
}

.language-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.language-cancel-btn,
.language-translate-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-cancel-btn {
    background: #f3f4f6;
    color: #374151;
}

.language-cancel-btn:hover {
    background: #e5e7eb;
}

.language-translate-btn {
    background: #80DABC;
    color: white;
}

.language-translate-btn:hover {
    background: #6bc9aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(128, 218, 188, 0.3);
}

.language-translate-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
    .language-modal-dialog {
        width: 95vw;
        margin: 0 2.5vw;
    }
}


/**
 * ADD THIS CSS to public.css
 * 
 * Fixes the modal footer buttons to show both Cancel and Close
 * with proper styling
 */

/* Modal footer with two buttons */
.unified-progress-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cancel button - TRANSPARENT RED (stops process) */
.unified-progress-modal .cancel-progress-btn {
    padding: 8px 20px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', sans-serif;
}

.unified-progress-modal .cancel-progress-btn:hover {
    background: #5b5b5b;
}

/* Close button - DARK (just closes modal) */
.unified-progress-modal .close-progress-btn {
    padding: 8px 20px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', sans-serif;
}

.unified-progress-modal .close-progress-btn:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

/* Make sure X button is visible */
.unified-progress-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unified-progress-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.unified-progress-modal .modal-close svg {
    width: 20px;
    height: 20px;
}

.unified-progress-modal .modal-close svg path {
    stroke: white;
}



.brand-score-details-btn,
.brand-score-improve-btn {
    padding: 6px 14px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.brand-score-details-btn:hover,
.brand-score-improve-btn:hover {
    background: #e5e7eb;
}

.brand-score-improve-btn {
    background: #2c3e50;
    color: white;
}

.brand-score-improve-btn:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

/* Loading Spinner for Score All Button */
.spinner-small {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 5px;
    vertical-align: -2px;
}

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

/* Responsive Design */
@media (max-width: 1400px) {
    .brand-score-card {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .brand-score-card {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 320px;
        margin: 0 auto;
    }
}

/* Brand Details Modal */
.brand-details-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.brand-details-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.brand-details-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.brand-details-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.brand-details-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.brand-details-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.brand-details-scores {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.brand-details-score-item {
    flex: 1;
    text-align: center;
}

.brand-details-score-item .score-label {
    display: block;
/* Brand More Modal - Higher z-index */
.brand-more-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000005;
    animation: fadeIn 0.2s ease-out;
}

.brand-more-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.3s ease-out;
}

.brand-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
}

.brand-more-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

.brand-more-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
}

.brand-more-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.brand-more-scores {
    display: flex;
    gap: 16px;
    padding: 20px 28px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.brand-more-score-item {
    flex: 1;
    text-align: center;
}

.brand-more-score-item .score-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    font-family: 'Lexend Deca', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-more-score-item .score-value {
    display: block;
    font-size: 28px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
}

.brand-more-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    padding: 0 28px;
    background: white;
}

.brand-more-tab {
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 4px solid transparent;
    margin-bottom: -2px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.brand-more-tab:hover {
    color: #374151;
    background: #f9fafb;
}

.brand-more-tab.active {
    color: #9C27B0;
    border-bottom-color: #9C27B0;
}

.brand-more-content {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.brand-more-tab-content {
    display: none;
}

.brand-more-tab-content.active {
    display: block;
}

.brand-more-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-more-list li {
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    position: relative;
    padding-left: 46px;
}

.brand-more-list li::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.brand-more-list-good li {
    border-left: 3px solid #10b981;
    background: #f0fdf4;
}

.brand-more-list-good li::before {
    background: #10b981;
}

.brand-more-list-issues li {
    border-left: 3px solid #ef4444;
    background: #fef2f2;
}

.brand-more-list-issues li::before {
    background: #ef4444;
}

.brand-more-list-suggestions li {
    border-left: 3px solid #3b82f6;
    background: #eff6ff;
}

.brand-more-list-suggestions li::before {
    background: #3b82f6;
}

.brand-more-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
}

.brand-more-footer {
    display: flex;
    justify-content: flex-end;
    padding: 20px 28px;
    border-top: 1px solid #e5e7eb;
}

.brand-more-btn-close {
    padding: 10px 24px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', sans-serif;
}

.brand-more-btn-close:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}  color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', sans-serif;
}

.brand-details-btn-close:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

/* Tab score badge container - inline within tab button */
.tab-score-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.tab-score-badge .score-value {
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}

.tab-score-badge .score-value:hover {
    background: rgba(0, 0, 0, 0.25);
}

.tab-score-badge .score-error {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 700;
}

/* Inline score button for unscored tabs */
.inline-score-btn {
    background: rgba(0, 0, 0, 0.08);
    border: 1px dashed rgba(0, 0, 0, 0.3);
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Lexend Deca', sans-serif;
}

.inline-score-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    border-style: solid;
    opacity: 1;
}

/* Scoring spinner */
.scoring-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Brand score badge base styles - inherits from parent tab */
.brand-score-badge {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* Score error state */
.brand-score-badge.score-error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

/* Badge MORE button styles */
.badge-more-btn {
    margin-left: 6px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.25);
    color: inherit;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.badge-more-btn:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(0, 0, 0, 0.35);
}

.badge-more-btn:active {
    background: rgba(0, 0, 0, 0.35);
    transform: translateY(1px);
}

/* Needs rescoring indicator */
.llm-tab-btn.needs-rescore::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Score age indicator */
.score-age {
    font-size: 10px;
    color: #9ca3af;
    margin-left: 4px;
}

/**
 * Beautiful Mini Confirmation Modal Styles
 * Modern, subtle, and smooth - MATCHES UNIFIED MODAL STYLE
 */

/* Score Confirmation Mini Modal */
.score-confirm-mini-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.score-confirm-mini-modal.active {
    opacity: 1;
}

.score-confirm-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.score-confirm-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.2s ease;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.score-confirm-mini-modal.active .score-confirm-dialog {
    transform: scale(1);
}

.score-confirm-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.score-confirm-icon svg {
    color: white;
    width: 24px;
    height: 24px;
}

.score-confirm-content {
    text-align: center;
    margin-bottom: 20px;
}

.score-confirm-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.score-confirm-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.score-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.score-confirm-actions button {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.score-confirm-cancel {
    background: #f5f5f5;
    color: #666;
}

.score-confirm-cancel:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.score-confirm-ok {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.score-confirm-ok:hover {
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
    transform: translateY(-1px);
}

.score-confirm-ok:active,
.score-confirm-cancel:active {
    transform: translateY(0);
}


/* =================================================================
   IMPROVED BRAND SCORE "MORE" MODAL
   Larger, centered, better close button, ESC + click outside
   MATCHES UNIFIED MODAL STYLE (white header, no gradients)
   ================================================================= */

/* Brand More Modal - IMPROVED */
.brand-more-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000005 !important;
    animation: fadeIn 0.2s ease-out;
    padding: 20px;
}

.brand-more-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 720px; /* LARGER: was probably 600px before */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUpModal 0.2s ease-out;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header - WHITE with gray border, NO GRADIENT (matches unified modal) */
.brand-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: white; /* CLEAN WHITE - no gradient */
}

.brand-more-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* MUCH LARGER Close Button - matches unified modal style */
.brand-more-close {
    width: 40px; /* LARGER: was 32px */
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px; /* LARGER X */
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    border-radius: 6px;
}

.brand-more-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.brand-more-close:active {
    transform: scale(0.95);
}

/* Category Scores Summary */
.brand-more-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.brand-more-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.brand-more-score-item .score-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

.brand-more-score-item .score-value {
    font-size: 24px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 8px;
}

/* Tabs */
.brand-more-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px 0 24px;
    border-bottom: 2px solid #e5e7eb;
    background: white;
}

.brand-more-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 4px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', sans-serif;
    margin-bottom: -2px;
}

.brand-more-tab:hover {
    color: #374151;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.brand-more-tab.active {
    color: #9C27B0;
    border-bottom-color: #9C27B0;
    background: white;
}

/* Content Area */
.brand-more-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    min-height: 300px;
}

.brand-more-tab-content {
    display: none;
}

.brand-more-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Lists */
.brand-more-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-more-list li {
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #f9fafb;
    border-left: 4px solid #e5e7eb;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    transition: all 0.2s ease;
}

.brand-more-list li:hover {
    background: #f3f4f6;
    border-left-color: #9C27B0;
    transform: translateX(4px);
}

.brand-more-list-good li {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.brand-more-list-good li:hover {
    background: #d1fae5;
}

.brand-more-list-issues li {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.brand-more-list-issues li:hover {
    background: #fee2e2;
}

.brand-more-list-suggestions li {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.brand-more-list-suggestions li:hover {
    background: #dbeafe;
}

/* Empty State */
.brand-more-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 40px 20px;
    font-style: italic;
}

/* Footer */
.brand-more-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    background: white; /* CLEAN WHITE - no gradient */
}

.brand-more-btn-close {
    padding: 10px 24px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', sans-serif;
}

.brand-more-btn-close:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.brand-more-btn-close:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .brand-more-modal {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .brand-more-scores {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .brand-more-tabs {
        flex-direction: column;
        gap: 4px;
    }
    
    .brand-more-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }
    
    .brand-more-tab.active {
        border-left-color: #9C27B0;
        border-bottom-color: transparent;
    }
}

/* =================================================================
   BRAND SCORE CARD - COMPLETE SECTION
   Floating card with backdrop, centered, ESC + click-outside support
   ================================================================= */

/* Backdrop for brand score card */
.brand-score-card-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: none;
}

.brand-score-card-backdrop.active {
    display: block;
}

/* Floating Brand Score Card - CENTERED */
.brand-score-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10000;
    overflow: hidden;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Header - White with Black Text and Border */
.brand-score-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.brand-score-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #111827;
}

/* MUCH BIGGER Close Button */
.brand-score-close {
    width: 40px;  /* BIGGER: was 32px */
    height: 40px; /* BIGGER: was 32px */
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;  /* BIGGER X */
    font-weight: 300;
    line-height: 1;
}

.brand-score-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.brand-score-close:active {
    transform: scale(0.95);
}

/* Main Content - Minimal Padding */
.brand-score-main {
    padding: 24px 20px;
}

/* Circular Score Chart */
.brand-score-circle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.circular-chart {
    width: 100px;
    height: 100px;
}

.circle-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke: #9C27B0;
    stroke-width: 2;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.6s ease-in-out, stroke 0.6s ease-in-out;
}

.percentage {
    fill: #111827;
    font-family: 'Lexend Deca', sans-serif;
    font-size: 14px;
    font-weight: 300;
    text-anchor: middle;
    dominant-baseline: central;
}

/* Score Breakdown - Minimal Padding */
.brand-score-breakdown {
    padding: 0 20px;
}

.brand-score-category {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 10px;
}

.category-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.category-label {
    font-size: 12px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    color: #374151;
    min-width: 80px;
    flex-shrink: 0;
}

.category-bars {
    display: flex;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.category-bars .bar {
    height: 7px;
    flex: 1;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background-color 0.3s;
}

.category-bars .bar.score-excellent {
    background: #66bb6a;
}

.category-bars .bar.score-good {
    background: #ffa726;
}

.category-bars .bar.score-fair {
    background: #ffca28;
}

.category-bars .bar.score-poor {
    background: #ef5350;
}

.category-score {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #6b7280;
    min-width: 32px;
    text-align: right;
    flex-shrink: 0;
}

/* Score Card Actions - Two buttons side by side */
.brand-score-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;  /* Space between buttons */
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.brand-score-details-btn,
.brand-score-close-btn {
    padding: 8px 16px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Lexend Deca', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.brand-score-details-btn:hover,
.brand-score-close-btn:hover {
    background: #e5e7eb;
}

.brand-score-close-btn {
    background: #2c3e50;
    color: white;
}

.brand-score-close-btn:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .brand-score-card {
        width: 90%;
        max-width: 320px;
    }
}

/**
 * IMPROVED DRAG-AND-DROP STYLING
 * Teal theme with Lexend Deca font to match unified modal design
 * 
 * Add this to public.css
 */

/* =========================================
   TRANSCRIPT TAB - DRAG AND DROP ZONE
   ========================================= */

/* Hide the old unified upload area */
.unified-upload-area {
    display: none !important;
}

/* Make the draggable zone subtle and professional */
.draggable-zone {
    min-height: 400px;
    position: relative;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Subtle hover effect */
.draggable-zone:hover {
    background: rgba(128, 218, 188, 0.02);
}

/* Beautiful drag-over effect with teal theme */
.draggable-zone.drag-over {
    background: rgba(200, 200, 200, 0.05);
    border: 1px dashed #ccc !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* Drag-over text overlay - subtle grey theme */
.draggable-zone.drag-over::after {
    content: 'Drop files here' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 14px !important;
    color: #999 !important;
    font-weight: 400 !important;
    pointer-events: none !important;
    background: white !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    border: 1px solid #e0e0e0 !important;
    z-index: 10 !important;
    animation: none !important;
}

/* Optional: subtle border to the zone when not dragging */
.draggable-zone {
    border: 1px solid transparent;
}

/* Make sure the text is using Lexend Deca */
.draggable-zone * {
    font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 
 * Fix Media Card Alignment
 * Keeps status badges at bottom when question titles vary in length
 * Add to Customizer > Additional CSS or your theme's style.css
 */

.media-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 200ms ease-out !important;
}

.media-card:hover {
    background: #F5F5F7 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transform: none !important;
}

.media-card .media-header {
    flex-shrink: 0 !important;
    min-height: 52px !important;
    max-height: 52px !important;
    height: 52px !important;
    overflow: hidden !important;
    background: transparent !important;
    border-bottom: none !important;
    padding: 16px 20px !important;
}

.media-card .media-question {
    font-size: 18px !important;
    font-family: "Lexend Deca", sans-serif !important;
    color: #1D1D1F !important;
}

/* Hide the question icon */
.media-card .icon-question {
    display: none !important;
}

.media-card .media-player-wrapper {
    flex-shrink: 0 !important;
}

.media-card .media-footer {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border-top: none !important;
    padding: 14px 20px !important;
}

/* Clean status without background pill */
.media-card .media-status {
    background: none !important;
    padding: 0 !important;
    font-size: 11px !important;
}

/* =================================================================
   UNIFIED EMPTY STATE DESIGN SYSTEM
   Consistent empty states across all tabs
   ================================================================= */

/* Base Empty State */
.ppud-empty-state,
.transcript-empty-state,
.images-empty-state,
.languages-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
    text-align: center;
    font-family: 'Lexend Deca', sans-serif;
}

/* pp-empty-state is controlled by JS hide/show, so don't force display */
.pp-empty-state {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
    text-align: center;
    font-family: 'Lexend Deca', sans-serif;
}

/* Ensure hidden empty states stay hidden */
.pp-empty-state[style*="display: none"] {
    display: none !important;
}

.ppud-empty-state svg,
.pp-empty-state svg,
.transcript-empty-state svg,
.images-empty-state svg,
.languages-empty-state svg {
    opacity: 0.3;
    margin-bottom: 20px;
    width: 48px;
    height: 48px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.ppud-empty-state-title,
.pp-empty-state-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: #666;
}

.ppud-empty-state-message,
.pp-empty-state-message {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    color: #999;
    line-height: 1.5;
}

/* Override any red error styling */
.error {
    background: transparent !important;
    color: #999 !important;
    border: none !important;
}