/* 다국어 언어 선택 위젯 (Google Translate Element 기반) */

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: border-color .15s, color .15s;
}

.lang-btn:hover {
    border-color: var(--color-primary, #ff6c0f);
    color: var(--color-primary, #ff6c0f);
}

.lang-btn img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.lang-btn-name {
    font-weight: 500;
}

/* Google Translate 기본 위젯은 화면에 노출하지 않음 */
#google_translate_element {
    display: none;
}

/* Google Translate 가 삽입하는 banner/tooltip 숨김 */
.skiptranslate,
.goog-te-banner-frame,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
}

body {
    top: 0 !important;
}

/* 언어 선택 모달 */
.lang-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lang-modal.active {
    display: flex;
}

.lang-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.lang-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.lang-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.lang-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.lang-modal-close:hover {
    background: #f1f5f9;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e8eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    transition: background .15s, border-color .15s, color .15s;
    font-weight: 500;
}

.lang-item img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.lang-item:hover {
    background: #fff7ed;
    border-color: var(--color-primary, #ff6c0f);
    color: var(--color-primary, #ff6c0f);
}

.lang-item.selected {
    background: #fff7ed;
    border-color: var(--color-primary, #ff6c0f);
    color: var(--color-primary, #ff6c0f);
    font-weight: 600;
}

@media (max-width: 768px) {
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .lang-btn-name {
        display: none;
    }
}
