/* Translation Index Page Styles */

/* Full-Page Modal Styles */
.modal-fullscreen .modal-content {
    border-radius: 0;
    border: none;
}

.modal-fullscreen .modal-body {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.alternatives-modal-content, .examples-modal-content {
    min-height: 50vh;
}

.alternative-item-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.example-item-modal:hover {
    border-color: #28a745 !important;
}

.loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
}

.empty-state i {
    opacity: 0.5;
}

.alternatives-grid, .examples-grid {
    max-height: 60vh;
    overflow-y: auto;
}

.alternatives-grid::-webkit-scrollbar, .examples-grid::-webkit-scrollbar {
    width: 6px;
}

.alternatives-grid::-webkit-scrollbar-track, .examples-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.alternatives-grid::-webkit-scrollbar-thumb, .examples-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.alternatives-grid::-webkit-scrollbar-thumb:hover, .examples-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Advanced Settings Dropdown - Modern Design */
.advanced-settings-container {
    position: relative;
    margin-top: 0;
}

.advanced-settings-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    min-width: 120px;
}

.advanced-settings-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.advanced-settings-trigger:active {
    transform: translateY(0);
}

.settings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.settings-text {
    flex: 1;
    text-align: left;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.advanced-settings-trigger[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.advanced-settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    min-width: 480px;
    max-width: 480px;
    width: 90vw;
    max-height: 80vh;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.advanced-settings-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.settings-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 7px;
    color: white;
    font-size: 13px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    flex: 1;
}

.refresh-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s ease;
    font-size: 11px;
}

.refresh-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #4a5568;
}

.provider-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provider-option {
    position: relative;
}

.provider-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.provider-label {
    display: block;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafbfc;
    min-height: auto;
}

.provider-label:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.provider-radio:checked + .provider-label {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.provider-info {
    width: 100%;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.provider-name {
    font-weight: 600;
    color: #1a202c;
    flex: 1;
    font-size: 13px;
}

.provider-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auto-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.available-badge {
    background: #c6f6d5;
    color: #22543d;
}

.warning-badge {
    background: #fefcbf;
    color: #744210;
}

.unavailable-badge {
    background: #fed7d7;
    color: #742a2a;
}

.provider-description {
    display: none;
}

.provider-unavailable {
    opacity: 0.6;
}

.provider-unavailable .provider-label {
    background: #f7fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.provider-unavailable .provider-label:hover {
    background: #f7fafc;
    border-color: #e2e8f0;
}

.provider-unavailable .provider-name {
    color: #a0aec0;
}

.provider-unavailable .provider-description {
    color: #cbd5e0;
}

/* Mobile responsive settings */
@media (max-width: 768px) {
    .advanced-settings-menu {
        min-width: 90vw;
        max-width: 90vw;
        left: 5%;
        transform: none;
        margin-top: 10px;
        border-radius: 10px;
        max-height: 450px;
    }

    .advanced-settings-menu.show {
        transform: none;
    }

    .settings-section {
        padding: 14px 16px;
    }

    .provider-label {
        padding: 10px 12px;
    }

    .option-item {
        padding: 8px 10px;
    }

    .center-controls {
        position: relative;
    }

    .advanced-settings-container {
        position: static;
    }
}

.settings-divider {
    display: none;
}

/* Custom Scrollbar */
.advanced-settings-menu::-webkit-scrollbar {
    width: 6px;
}

.advanced-settings-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 10px 10px 0;
}

.advanced-settings-menu::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.advanced-settings-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.option-toggle {
    position: relative;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-label {
    display: block;
    width: 42px;
    height: 22px;
    background: #cbd5e0;
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-input:checked + .toggle-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(20px);
}

.option-info {
    flex: 1;
}

.option-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 13px;
}

.option-description {
    display: none;
}

.status-summary {
    margin-top: 0;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.status-icon {
    color: #16a34a;
    font-size: 14px;
}

.status-text {
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

.status-summary-minimal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

.status-summary-minimal i {
    font-size: 14px;
    color: #16a34a;
}

.center-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advanced-settings-container {
        margin-top: 0;
        margin-left: 0.5rem;
    }

    .advanced-settings-trigger {
        min-width: auto;
        padding: 10px 14px;
        font-size: 13px;
    }

    .settings-text {
        display: none;
    }

    .advanced-settings-menu {
        min-width: 350px;
        max-width: 95vw;
        width: 95vw;
        left: 2.5vw;
        right: 2.5vw;
        transform: none;
        max-height: 60vh;
        overflow-y: auto;
    }

    .advanced-settings-menu.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .advanced-settings-container {
        margin-left: 0.5rem;
    }

    .advanced-settings-trigger {
        padding: 8px 12px;
        font-size: 12px;
    }

    .advanced-settings-menu {
        min-width: 300px;
        max-width: 90vw;
        width: 90vw;
        left: 5vw;
        right: 5vw;
        max-height: 50vh;
        overflow-y: auto;
    }

    .settings-section {
        padding: 16px;
    }

    .provider-label {
        padding: 10px 12px;
    }
}

/* Scrollbar styling */
.advanced-settings-menu::-webkit-scrollbar {
    width: 6px;
}

.advanced-settings-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.advanced-settings-menu::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.advanced-settings-menu::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Confidence Score Styling */
.confidence-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.confidence-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.confidence-text {
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
}

/* Alternatives Styling */
.alternatives-container {
    margin-top: 8px;
}

.alternatives-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #4a5568;
    transition: all 0.2s ease;
}

.alternatives-toggle:hover {
    background: #e2e8f0;
    border-color: #a0aec0;
}

.alternatives-toggle i {
    transition: transform 0.2s ease;
}

.alternatives-list {
    margin-top: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.alternative-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.alternative-option:last-child {
    border-bottom: none;
}

.alternative-option:hover {
    background: #f8fafc;
}

.alt-text {
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    margin-right: 8px;
}

.alt-confidence {
    font-size: 12px;
    font-weight: 500;
    color: #718096;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Provider Badge in Translation Results */
.provider-badge-result {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.provider-deepl {
    background: #e3f2fd;
    color: #1565c0;
}

.provider-google {
    background: #e8f5e9;
    color: #2e7d32;
}

.provider-azure {
    background: #fff3e0;
    color: #ef6c00;
}

/* Provider Status Panel Styles */
.provider-status-panel {
    position: fixed;
    right: 20px;
    top: 120px;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.provider-panel-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--corporate-primary) 0%, var(--corporate-primary-light) 100%);
    border-radius: 16px 16px 0 0;
}

.provider-panel-header .panel-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
}

.refresh-providers-btn {
    background: none;
    border: none;
    color: white;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.refresh-providers-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.provider-list {
    padding: 16px;
}

.provider-loading,
.provider-error,
.provider-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.provider-error {
    color: #dc2626;
}

.provider-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.provider-status-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s ease;
}

.provider-status-item.available {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.provider-status-item.available::before {
    background: #10b981;
}

.provider-status-item.unavailable {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fef2f2 100%);
    opacity: 0.8;
}

.provider-status-item.unavailable::before {
    background: #ef4444;
}

.provider-status-item.testing {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-color: #f59e0b;
}

.provider-status-item.testing::before {
    background: #f59e0b;
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.provider-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--corporate-primary) 0%, var(--corporate-primary-light) 100%);
    color: white;
    font-size: 14px;
}

.provider-details {
    flex: 1;
}

.provider-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.provider-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #dcfce7;
    color: #166534;
}

.status-unavailable {
    background: #fee2e2;
    color: #991b1b;
}

.response-time {
    font-size: 10px;
    color: #6b7280;
    font-weight: 500;
}

.provider-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.test-provider-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, var(--corporate-accent) 0%, var(--corporate-accent-light) 100%);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.test-provider-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.test-provider-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Design for Provider Panel */
@media (max-width: 1200px) {
    .provider-status-panel {
        right: 15px;
        width: 260px;
        top: 110px;
    }
}

@media (max-width: 992px) {
    .provider-status-panel {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        margin-top: 20px;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .provider-status-panel {
        border-radius: 12px;
        margin: 16px;
        width: calc(100% - 32px);
    }

    .provider-panel-header {
        padding: 12px 16px;
        border-radius: 12px 12px 0 0;
    }

    .provider-list {
        padding: 12px;
    }
}

.provider-lara {
    background: #f3e5f5;
    color: #7b1fa2;
}

.provider-naver {
    background: #ffebee;
    color: #c62828;
}
/* Alternative Translations and Examples Sections */
.alternatives-section,
.examples-section {
    margin-top: 2rem;
    padding: 1rem 0;
}

.section-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.close-section-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-section-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.alternatives-content,
.examples-content {
    padding: 1.5rem;
}

.loading-state,
.error-state,
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 1rem;
}

.error-state {
    color: #dc2626;
}

/* Language Alternatives */
.language-alternatives {
    margin-bottom: 2rem;
}

.lang-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

.lang-flag {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.alternatives-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alternative-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alternative-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alt-text {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.5rem;
}

.alt-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.alt-context {
    color: #6b7280;
    background: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.alt-confidence {
    color: #059669;
    background: #d1fae5;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Word Examples */
.word-examples {
    margin-bottom: 2rem;
}

.word-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

.examples-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.example-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
}

.example-original {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.example-translated {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.example-context {
    font-size: 0.875rem;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    background: #e2e8f0;
    border-radius: 6px;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-card {
        margin: 0 1rem;
    }

    .alternatives-content,
    .examples-content {
        padding: 1rem;
    }

    .alt-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}