/**
 * One AI Language System CSS
 * 언어 변경 모달 및 관련 UI 스타일
 */

/* 언어 모달 오버레이 */
.oneai-language-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

/* 언어 모달 */
.oneai-language-modal {
    background: var(--color-surface-elevated, #111111);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 600px;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* 모달 헤더 */
.oneai-language-modal-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.oneai-language-modal-header h2 {
    color: var(--text-primary, #ffffff);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.oneai-language-modal-header p {
    color: var(--text-secondary, #e5e5e5);
    font-size: 13px;
    margin: 0;
}

/* 모달 닫기 버튼 */
.oneai-language-modal-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-surface-modal, #222222);
    color: var(--text-tertiary, #a3a3a3);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.oneai-language-modal-close:hover {
    background: var(--color-error, #ef4444);
    color: white;
    transform: scale(1.1);
}

/* 언어 그리드 */
.oneai-language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* 언어 옵션 */
.oneai-language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-surface-modal, #222222);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    text-align: left;
}

.oneai-language-option:hover {
    background: var(--color-surface-overlay, #1a1a1a);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.oneai-language-option.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.15));
    border-color: var(--color-primary-500, #10b981);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* 언어 플래그 */
.oneai-language-flag {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* 언어 정보 */
.oneai-language-info {
    flex: 1;
    min-width: 0;
}

.oneai-language-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 2px;
    line-height: 1.2;
}

.oneai-language-native {
    font-size: 12px;
    color: var(--text-secondary, #e5e5e5);
    line-height: 1.2;
}

/* 체크 아이콘 */
.oneai-language-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--text-quaternary, #737373);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.oneai-language-option.active .oneai-language-check {
    background: var(--color-primary-500, #10b981);
    border-color: var(--color-primary-500, #10b981);
    color: white;
    transform: scale(1.1);
}

/* 토스트 메시지 */
.oneai-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: var(--color-surface-elevated, #111111);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
}

.oneai-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.oneai-toast-success {
    border-left: 4px solid var(--color-success, #10b981);
}

.oneai-toast-error {
    border-left: 4px solid var(--color-error, #ef4444);
}

.oneai-toast-warning {
    border-left: 4px solid var(--color-warning, #f59e0b);
}

.oneai-toast-info {
    border-left: 4px solid var(--color-info, #3b82f6);
}

/* 언어 변경 버튼 */
.oneai-language-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-surface-elevated, #111111);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.oneai-language-btn:hover {
    background: var(--color-surface-overlay, #1a1a1a);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.oneai-language-btn-flag {
    font-size: 16px;
}

.oneai-language-btn-text {
    font-weight: 500;
}

.oneai-language-btn-icon {
    font-size: 12px;
    opacity: 0.7;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .oneai-language-modal {
        padding: 20px;
        margin: 15px;
        max-height: calc(100vh - 30px);
        max-width: calc(100vw - 30px);
    }
    
    .oneai-language-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .oneai-language-option {
        padding: 10px;
        gap: 10px;
    }
    
    .oneai-language-flag {
        font-size: 18px;
        width: 28px;
        height: 28px;
    }
    
    .oneai-language-name {
        font-size: 13px;
    }
    
    .oneai-language-native {
        font-size: 11px;
    }
    
    .oneai-language-check {
        width: 16px;
        height: 16px;
    }
    
    .oneai-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
