/**
 * Language Family Config Modal Styles - 语言配置弹窗样式
 *
 * MDA Traceability:
 * - CIM: BR-001 批量翻译 (跨语系翻译优化)
 * - PIM: UC-001 翻译工作流 §3.2 语系配置
 * - PSM: FC Frontend LanguageFamilyConfigModal
 */

/* 遮罩层 */
.lf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lf-modal-overlay.visible {
    opacity: 1;
}

/* 弹窗主体 */
.lf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s ease;
}

.lf-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 头部 */
.lf-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.lf-modal-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.lf-modal-subtitle {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.lf-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lf-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* 主体 */
.lf-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.lf-section {
    margin-bottom: 24px;
}

.lf-section:last-child {
    margin-bottom: 0;
}

.lf-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

/* 源语言状态 */
.lf-source-status {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.lf-source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
}

.lf-source-item.has-content {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.lf-source-item.empty {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
}

.lf-source-icon {
    font-size: 16px;
}

.lf-source-name {
    font-weight: 500;
    color: #333;
}

.lf-source-status {
    font-size: 12px;
    color: #666;
    margin-left: auto;
}

/* 枢纽提示 */
.lf-pivot-info {
    margin-top: 12px;
    padding: 10px 14px;
    background: #e3f2fd;
    border-radius: 8px;
    font-size: 13px;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lf-pivot-info.lf-pivot-complete {
    background: #e8f5e9;
    color: #388e3c;
}

.lf-info-icon {
    font-size: 14px;
}

/* 语系表格 */
.lf-family-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.lf-family-table th,
.lf-family-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.lf-family-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
}

.lf-family-table tbody tr:hover {
    background: #f8f9fa;
}

.lf-family-icon {
    margin-right: 6px;
}

.lf-family-name {
    font-weight: 500;
}

.lf-languages {
    color: #666;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lf-source-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

.lf-source-select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.lf-source-select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.lf-task-count {
    color: #666;
    font-variant-numeric: tabular-nums;
}

.lf-empty-row {
    text-align: center;
    color: #999;
    padding: 24px !important;
}

/* 配置模式 */
.lf-mode-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lf-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.lf-mode-option:hover {
    background: #f0f0f0;
}

.lf-mode-option:has(input:checked) {
    background: #e3f2fd;
    border-color: #2196f3;
}

.lf-mode-option input[type="radio"] {
    margin-top: 3px;
    accent-color: #2196f3;
}

.lf-mode-label {
    flex: 1;
}

.lf-mode-label strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.lf-mode-label small {
    font-size: 12px;
    color: #666;
}

.lf-unified-select {
    margin-left: auto;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

.lf-unified-select:disabled {
    background: #f5f5f5;
    color: #999;
}

/* 底部 */
.lf-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafafa;
}

/* 按钮 */
.lf-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lf-btn-primary {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
}

.lf-btn-primary:hover {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.lf-btn-secondary {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.lf-btn-secondary:hover {
    background: #f5f5f5;
    color: #333;
}

/* 响应式 */
@media (max-width: 600px) {
    .lf-modal {
        width: 95%;
        max-height: 90vh;
    }

    .lf-source-status {
        flex-direction: column;
    }

    .lf-source-item {
        min-width: auto;
    }

    .lf-family-table {
        font-size: 12px;
    }

    .lf-family-table th,
    .lf-family-table td {
        padding: 8px;
    }

    .lf-source-select {
        min-width: 90px;
        padding: 4px 6px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .lf-modal {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .lf-modal-header {
        border-color: #333;
    }

    .lf-modal-header h3 {
        color: #fff;
    }

    .lf-modal-subtitle {
        color: #aaa;
    }

    .lf-modal-close {
        color: #888;
    }

    .lf-modal-close:hover {
        background: #333;
        color: #fff;
    }

    .lf-section h4 {
        color: #fff;
    }

    .lf-source-item {
        background: #2a2a2a;
    }

    .lf-source-item.has-content {
        background: #1b3a1b;
        border-color: #2e5a2e;
    }

    .lf-source-item.empty {
        background: #3a2a1a;
        border-color: #5a4a2a;
    }

    .lf-pivot-info {
        background: #1a3a5a;
        color: #64b5f6;
    }

    .lf-pivot-info.lf-pivot-complete {
        background: #1b3a1b;
        color: #81c784;
    }

    .lf-family-table th {
        background: #2a2a2a;
        color: #aaa;
    }

    .lf-family-table td {
        border-color: #333;
    }

    .lf-family-table tbody tr:hover {
        background: #2a2a2a;
    }

    .lf-source-select {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .lf-mode-option {
        background: #2a2a2a;
    }

    .lf-mode-option:hover {
        background: #333;
    }

    .lf-mode-option:has(input:checked) {
        background: #1a3a5a;
        border-color: #2196f3;
    }

    .lf-modal-footer {
        background: #252525;
        border-color: #333;
    }

    .lf-btn-secondary {
        background: #333;
        border-color: #444;
        color: #e0e0e0;
    }

    .lf-btn-secondary:hover {
        background: #444;
    }
}
