/* =================================================================
   DECK BUILDER - MODAL STYLES
   Split from deck-builder.css for maintainability
   Contains: Categories modal, file selection modal, filename dialog,
             export CSV, card link, sync, conflict resolution modals
   ================================================================= */

/* =================================================================
   CATEGORIES MODAL
   ================================================================= */

#categoriesModal .modal-content {
    max-width: 600px;
}

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

#categoriesModal .form-group {
    margin-bottom: 20px;
}

#categoriesModal .form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

#categoriesModal .form-label i {
    color: var(--primary);
    font-size: 14px;
}

#categoriesModal .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

#categoriesModal .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#categoriesModal .form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#categoriesModal .action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-num-input {
    font-weight: 700;
    color: var(--primary);
}

.card-num-input:focus {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--primary);
}

/* Current File Preview */
.current-file-preview {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 20px 0 20px;
}

.current-file-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.current-file-header strong {
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-file-header i {
    color: var(--primary);
}

.current-file-name {
    color: var(--text-secondary);
    font-size: 13px;
    font-family: monospace;
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Linked Files List */
.linked-files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.linked-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: var(--bg-primary);
    border-radius: 4px;
}

.linked-file-item .format-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--primary);
    color: white;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    min-width: 45px;
    text-align: center;
}

.linked-file-item .file-name {
    color: var(--text-secondary);
    font-size: 12px;
    font-family: monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-file-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.no-current-file {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

.no-current-file i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

.no-current-file p {
    margin: 0;
    font-size: 14px;
}

.current-image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
}

.current-audio-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.audio-preview-icon {
    font-size: 48px;
    color: var(--primary);
}

.audio-preview-icon i {
    opacity: 0.7;
}

#playCurrentAudio {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =================================================================
   FILE SELECTION MODAL
   ================================================================= */

.file-selection-modal {
    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: 10000;
    backdrop-filter: blur(4px);
}

.file-selection-content {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.file-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.file-selection-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.file-selection-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.file-selection-tabs .tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-selection-tabs .tab-btn:hover {
    background: var(--bg-primary);
}

.file-selection-tabs .tab-btn.active {
    background: var(--bg-primary);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.file-selection-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tab-content {
    display: none;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

/* File Browser Controls */
.file-browser-controls {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.file-browser-controls .form-input {
    flex: 1;
}

.file-browser-controls .select-control {
    width: 150px;
}

/* File Browser Grid */
.file-browser-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    align-content: start;
}

.file-browser-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.file-browser-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.file-browser-item:hover .file-select-overlay {
    opacity: 1;
}

.file-preview {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    overflow: hidden;
}

.file-preview.audio-preview {
    height: 60px;
}

.file-preview.audio-preview i {
    font-size: 32px;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.file-preview i {
    font-size: 48px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.file-info {
    padding: 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: normal;
    word-break: break-word;
    margin-bottom: 4px;
    line-height: 1.3;
    min-height: 32px;
}

.file-name.audio-filename {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: 4px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .file-name.audio-filename {
    background: var(--bg-primary);
    color: var(--primary);
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.audio-play-btn {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    color: var(--success);
    font-weight: 600;
}

.audio-play-btn:hover {
    background: var(--success);
    color: white;
}

.file-select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(79, 70, 229, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-select-overlay .btn {
    pointer-events: none;
}

/* Loading/Error/Empty States */
.loading-files,
.error-message,
.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-files i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--primary);
}

.error-message i,
.empty-message i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.3;
}

.error-message {
    color: var(--error);
}

.error-message code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Upload Zone */
.upload-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.upload-zone i {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.upload-zone h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-zone p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Empty State for Deck Builder */
.module-deck-builder .empty-state {
    padding: 60px 20px;
    text-align: center;
}

.module-deck-builder .empty-state i {
    font-size: 64px;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 20px;
}

.module-deck-builder .empty-state h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.module-deck-builder .empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Loading state */
.deck-table-container.loading {
    position: relative;
    min-height: 200px;
}

.deck-table-container.loading::after {
    content: 'Loading cards...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-weight: 600;
}

/* Success/Error indicators */
.save-success {
    animation: flashSuccess 1s ease;
}

@keyframes flashSuccess {
    0%, 100% { background: transparent; }
    50% { background: rgba(39, 174, 96, 0.2); }
}

.save-error {
    animation: flashError 1s ease;
}

@keyframes flashError {
    0%, 100% { background: transparent; }
    50% { background: rgba(239, 68, 68, 0.2); }
}

/* Highlight animation for new cards */
@keyframes highlightNew {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(79, 70, 229, 0.2);
    }
}

/* =================================================================
   VERSION 4.0 ADDITIONS - Language Selector & Independent Lessons
   ================================================================= */

/* Deck Builder - Language Selector (Primary Control) */
.deck-language-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    color: white;
}

.deck-language-selector label {
    font-size: 14px;
    font-weight: 500;
}

.deck-language-selector .select-lg {
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 600;
    min-width: 180px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.deck-language-selector .select-lg:hover {
    border-color: rgba(255,255,255,0.6);
}

.deck-language-selector .select-lg:focus {
    border-color: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
}

.language-card-count {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* =================================================================
   MOBILE RESPONSIVE FOR MODALS
   ================================================================= */

@media (max-width: 768px) {
    .file-selection-content {
        width: 100%;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .file-browser-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
        padding: 12px;
    }

    .file-preview {
        height: 80px;
    }

    .file-browser-controls {
        flex-direction: column;
    }

    .file-browser-controls .select-control {
        width: 100%;
    }

    .file-selection-tabs .tab-btn {
        font-size: 12px;
        padding: 12px;
    }

    .categories-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    #categoriesModal .modal-content {
        width: 95%;
        max-width: none;
    }

    #categoriesModal .modal-body {
        padding: 16px;
        max-height: 50vh;
    }

    #categoriesModal .form-group {
        margin-bottom: 16px;
    }

    #categoriesModal .action-buttons {
        flex-direction: column;
        padding: 12px 16px;
        gap: 8px;
    }

    #categoriesModal .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .current-file-preview {
        padding: 12px;
    }

    .current-file-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .current-file-name {
        font-size: 11px;
        word-break: break-all;
    }

    .current-image-preview img {
        max-height: 150px !important;
    }

    /* Deck Language Selector Mobile */
    .deck-language-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 16px;
    }

    .deck-language-selector .select-lg {
        min-width: auto;
        width: 100%;
    }

    .language-card-count {
        margin-left: 0;
        text-align: center;
    }
}

/* =================================================================
   FILENAME DIALOG STYLES
   ================================================================= */

.filename-dialog-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: 10001;
}

.filename-dialog {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    overflow: hidden;
}

.filename-dialog-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filename-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filename-dialog-header h3 i {
    color: var(--primary);
}

.filename-dialog-body {
    padding: 20px;
}

.filename-dialog-body .form-group {
    margin-bottom: 12px;
}

.filename-dialog-body .form-input {
    width: 100%;
    font-family: monospace;
    font-size: 14px;
}

.filename-preview {
    text-align: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.filename-preview img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.filename-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filename-hint i {
    color: var(--primary);
}

.filename-dialog-footer {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .filename-dialog {
        width: 95%;
    }

    .filename-dialog-footer {
        flex-direction: column;
    }

    .filename-dialog-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode specific */
[data-theme="dark"] .categories-btn {
    background: var(--primary);
}

[data-theme="dark"] .categories-btn:hover {
    background: var(--primary-dark);
}

[data-theme="dark"] #categoriesModal .form-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .current-file-preview {
    border-color: var(--border-color);
}

[data-theme="dark"] .current-image-preview {
    background: rgba(0, 0, 0, 0.2);
}

/* =================================================================
   ROLE-BASED ACCESS STYLES
   ================================================================= */

/* Voice Recorder Mode Badge */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 12px;
    vertical-align: middle;
}

.role-badge.voice-recorder {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.role-badge.deck-manager {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.role-badge.editor {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.role-badge i {
    font-size: 10px;
}

/* Disabled/Read-only fields for voice recorder */
.readonly-field {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    cursor: default !important;
    border-color: transparent !important;
}

.readonly-field:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Disabled badge styling */
.disabled-badge {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.disabled-badge:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Text muted for empty action cells */
.text-muted {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Language restriction lock indicator */
.language-locked-hint {
    margin-left: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.language-locked-hint i {
    opacity: 0.7;
}

/* Disabled select styling */
select.select-control:disabled {
    background-color: var(--bg-secondary);
    cursor: not-allowed;
    opacity: 0.8;
}

/* =================================================================
   EXPORT CSV MODAL
   ================================================================= */

#exportCSVModal .modal-content {
    max-width: 500px;
}

#exportCSVModal .modal-body {
    padding: 24px;
}

.export-option-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.export-option-btn:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.export-option-btn:active {
    transform: translateY(0);
}

.export-option-btn i {
    font-size: 24px;
    color: var(--primary);
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.export-option-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.export-option-text strong {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.export-option-text small {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Dark mode adjustments */
[data-theme="dark"] .export-option-btn {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .export-option-btn:hover {
    background: var(--bg-secondary);
}

/* =================================================================
   SENTENCE BUILDER - CARD LINK MODAL
   ================================================================= */

.sw-card-link-modal .modal-content {
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.sw-card-link-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
}

.sw-card-link-modal .modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Current link section */
.sw-current-link {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.sw-current-link h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sw-current-picture {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sw-current-picture img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sw-current-picture span {
    font-weight: 500;
    color: var(--text-primary);
}

/* No link state */
.sw-no-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
}

.sw-no-link i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Search section */
.sw-search-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.sw-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.sw-search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.sw-search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Card grid */
.sw-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.sw-card-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-card-option:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sw-card-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
}

.sw-card-option .no-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.sw-card-option .card-word {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.sw-card-option .card-english {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Modal actions */
.sw-modal-actions {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.sw-modal-actions .btn {
    flex: 1;
}

/* Make word chips show pointer cursor */
.sw-word-chip {
    cursor: pointer;
}

.sw-word-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sw-chip-text {
    cursor: pointer;
}

/* =================================================================
   CARD-SENTENCE SYNC MODAL STYLES
   ================================================================= */

.sentence-sync-modal .modal-content {
    max-width: 600px;
}

.sentence-sync-modal .modal-content.modal-lg {
    max-width: 900px;
}

.sentence-sync-modal .modal-header.warning-header {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-bottom: 2px solid #F59E0B;
}

.sentence-sync-modal .modal-header.warning-header h2 {
    color: #92400E;
}

.sentence-sync-modal .modal-header.warning-header h2 i {
    color: #F59E0B;
}

/* Summary section */
.sync-warning-summary {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 20px;
}

.sync-warning-summary p {
    margin-bottom: 12px;
    font-weight: 500;
}

.sync-stats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sync-stats li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.sync-stats li:last-child {
    border-bottom: none;
}

.sync-stats li i {
    width: 20px;
    text-align: center;
}

.sync-stat-deleted i {
    color: var(--error);
}

.sync-stat-changed i {
    color: var(--warning);
}

.sync-stat-sentences i {
    color: var(--primary);
}

/* Recommendation section */
.sync-recommendation {
    padding: 16px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sync-recommendation h4 {
    color: #1E40AF;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-recommendation h4 i {
    color: #F59E0B;
}

.sync-recommendation p {
    margin: 0;
    color: #1E40AF;
}

/* Actions */
.sync-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.sync-actions .btn-lg {
    padding: 16px 24px;
    font-size: 16px;
}

/* Results summary cards */
.sync-results-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.sync-result-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.sync-result-card.auto-fix {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 2px solid #10B981;
}

.sync-result-card.auto-fix i {
    color: #059669;
    font-size: 24px;
    margin-bottom: 8px;
}

.sync-result-card.needs-review {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #F59E0B;
}

.sync-result-card.needs-review i {
    color: #D97706;
    font-size: 24px;
    margin-bottom: 8px;
}

.sync-result-card .count {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.sync-result-card.auto-fix .count {
    color: #059669;
}

.sync-result-card.needs-review .count {
    color: #D97706;
}

.sync-result-card .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Sync sections */
.sync-section {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.sync-section h4 {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-section .section-desc {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 14px;
}

/* Sync items list */
.sync-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.sync-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.sync-item:last-child {
    border-bottom: none;
}

.sync-item:hover {
    background: var(--bg-tertiary);
}

.sync-item.deleted {
    background: #FEF2F2;
}

.sync-item.changed {
    background: #FFFBEB;
}

.sync-item-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-weight: 500;
}

.sync-item-word {
    font-weight: 600;
    color: var(--text-primary);
}

.sync-item-sentence {
    color: var(--text-secondary);
    font-style: italic;
}

.sync-item-message {
    width: 100%;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 4px;
}

.sync-item-message.has-suggestion {
    color: #059669;
}

.sync-item-message.no-match {
    color: #DC2626;
}

/* Needs review item details */
.sync-item-icon {
    width: 24px;
    text-align: center;
}

.sync-item-details {
    flex: 1;
}

.sync-item-location {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.sync-item-word-info {
    margin-bottom: 4px;
}

.sync-item-sentence-text {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Empty state */
.sync-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.sync-empty-state i {
    font-size: 48px;
    color: var(--success);
    margin-bottom: 16px;
}

.sync-empty-state h4 {
    color: var(--success);
    margin-bottom: 8px;
}

/* Modal footer */
.sentence-sync-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Text color utilities */
.text-danger {
    color: var(--error) !important;
}

.text-warning {
    color: var(--warning) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sync-results-summary {
        flex-direction: column;
    }

    .sync-actions {
        flex-direction: column;
    }
}
