/* =========================================================
   File: public/assets/frontend/css/kiosk-translate.css
========================================================= */

.kiosk-lang-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, .6);
    display: none;
    align-items: center;
    justify-content: center;
    touch-action: auto !important;
    pointer-events: auto !important
}

.kiosk-lang-overlay.open {
    display: flex
}

.kiosk-lang-popup {
    background: #fff;
    border-radius: 24px;
    width: 92%;
    max-width: 900px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    touch-action: auto !important;
    pointer-events: auto !important;
    -webkit-overflow-scrolling: touch
}

.kiosk-lang-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px 16px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    z-index: 2
}

.kiosk-lang-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #162b57
}

.kiosk-lang-x {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #333;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation !important;
    pointer-events: auto !important
}

.kiosk-lang-x:hover {
    background: #e5aa35;
    color: #162b57
}

.kiosk-lang-section {
    padding: 6px 28px 2px;
    font-size: .8rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .05em
}

.kiosk-lang-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 12px 28px 20px
}

.kiosk-lang-default {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 28px 8px;
    padding: 16px 24px;
    border-radius: 14px;
    border: 2px solid #162b57;
    background: #f0f4ff;
    cursor: pointer;
    touch-action: manipulation !important;
    pointer-events: auto !important;
    font-size: 1.15rem;
    font-weight: 700;
    color: #162b57;
    transition: all .2s
}

.kiosk-lang-default:hover {
    background: #162b57;
    color: #fff
}

.kiosk-lang-default.selected {
    background: #162b57;
    color: #fff
}

.kiosk-lang-default .dtag {
    font-size: .65rem;
    font-weight: 600;
    background: rgba(22, 43, 87, .15);
    color: #162b57;
    padding: 2px 8px;
    border-radius: 6px
}

.kiosk-lang-default.selected .dtag {
    background: rgba(255, 255, 255, .2);
    color: #fff
}

.kiosk-lang-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 14px 8px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    cursor: pointer;
    min-height: 72px;
    touch-action: manipulation !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(229, 170, 53, .3);
    transition: border-color .2s, background .2s
}

.kiosk-lang-item:hover, .kiosk-lang-item:active {
    border-color: #e5aa35;
    background: #fff8ec
}

.kiosk-lang-item.selected {
    border-color: #e5aa35;
    background: linear-gradient(135deg, #fff8ec, #fef3d6)
}

.kiosk-lang-item.selected::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: .7rem;
    font-weight: 700;
    color: #e5aa35
}

.kiosk-lang-item .native {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e2f57;
    text-align: center;
    line-height: 1.2
}

.kiosk-lang-item .label {
    font-size: .68rem;
    color: #999;
    text-align: center
}

.kiosk-lang-btn {
    background: #e5aa35 !important;
   color: #162b57 !important;
    border: 2px solid rgba(255, 255, 255, .4) !important;
    font-weight: 700 !important;
    white-space: nowrap;
    touch-action: manipulation !important;
    pointer-events: auto !important
}

.kiosk-lang-btn:hover, .kiosk-lang-btn:focus, .kiosk-lang-btn:active {
    background: #e5aa35 !important;
    color: #162b57 !important;
    border-color: #e5aa35 !important
}

/* Hide Google Translate UI */
.goog-te-banner-frame {
    display: none !important
}

body>.skiptranslate {
    display: none !important;
    height: 0 !important
}

iframe.skiptranslate {
    display: none !important
}

body {
    top: 0 !important
}

html.translated-ltr, html.translated-rtl {
    margin-top: 0 !important;
    padding-top: 0 !important
}

body.kiosk-body {
    top: 0 !important;
    margin-top: 0 !important
}

.goog-te-highlight, font[style]>font {
    background: none !important;
    box-shadow: none !important
}

#google_translate_element {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important
}

/* Responsive */
@media(min-width:3800px) {
    .kiosk-lang-popup {
        max-width: 1400px
    }

    .kiosk-lang-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 18px;
        padding: 12px 48px 30px
    }

    .kiosk-lang-item {
        padding: 24px 14px;
        min-height: 110px;
        border-radius: 18px
    }

    .kiosk-lang-item .native {
        font-size: 1.5rem
    }

    .kiosk-lang-item .label {
        font-size: .95rem
    }

    .kiosk-lang-header {
        padding: 32px 48px 20px
    }

    .kiosk-lang-header h3 {
        font-size: 2rem
    }

    .kiosk-lang-x {
        width: 60px;
        height: 60px;
        font-size: 2rem
    }

    .kiosk-lang-default {
        margin: 20px 48px 10px;
        padding: 22px 32px;
        font-size: 1.4rem
    }

    .kiosk-lang-section {
        padding: 8px 48px 2px;
        font-size: 1rem
    }
}

@media(min-width:2200px) and (max-width:3799px) {
    .kiosk-lang-popup {
        max-width: 1100px
    }

    .kiosk-lang-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px
    }

    .kiosk-lang-item {
        padding: 20px 12px;
        min-height: 95px
    }

    .kiosk-lang-item .native {
        font-size: 1.35rem
    }
}

@media(min-width:1920px) and (max-width:2199px) {
    .kiosk-lang-popup {
        max-width: 950px
    }

    .kiosk-lang-grid {
        grid-template-columns: repeat(5, 1fr)
    }

    .kiosk-lang-item {
        padding: 16px 10px;
        min-height: 82px
    }
}

@media(max-width:1365px) and (min-width:768px) {
    .kiosk-lang-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media(max-width:767px) {
    .kiosk-lang-popup {
        width: 95%;
        max-width: 460px;
        border-radius: 16px
    }

    .kiosk-lang-header {
        padding: 14px 16px 10px;
        border-radius: 16px 16px 0 0
    }

    .kiosk-lang-header h3 {
        font-size: 1.1rem
    }

    .kiosk-lang-x {
        width: 34px;
        height: 34px;
        font-size: 1.2rem
    }

    .kiosk-lang-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
        padding: 10px 16px 16px
    }

    .kiosk-lang-item {
        padding: 8px 6px;
        min-height: 52px;
        border-radius: 9px
    }

    .kiosk-lang-item .native {
        font-size: .82rem
    }

    .kiosk-lang-item .label {
        font-size: .58rem
    }

    .kiosk-lang-default {
        margin: 12px 16px 6px;
        padding: 12px 16px;
        font-size: 1rem
    }
}

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