/**
 * iLogist — Language suggestion banner.
 *
 * Показується ТІЛЬКИ якщо navigator.language не збігається з мовою сторінки
 * (наприклад, користувач відкрив RU-сторінку з браузером uk-UA).
 * Тонкий, dismissible, у правому верхньому куті. Не блокує LCP/скрол.
 *
 * Замінює стару повноекранну модалку вибору мови (видалена з custom-home.js).
 */

.lang-banner {
    position: fixed;
    top: 80px;          /* нижче header */
    right: 20px;
    z-index: 9989000;   /* нижче cookie-banner (9990000), вище звичайного контенту */

    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 360px;

    background: rgba(11, 25, 44, 0.93);
    color: #fff;
    padding: 14px 18px 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(252, 163, 17, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    font-family: 'Manrope', 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.45;

    /* Initial: hidden, anim from right */
    opacity: 0;
    transform: translateX(20px);
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear 0.4s;
}

.lang-banner.is-visible {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear 0s;
}

.lang-banner.is-fading {
    opacity: 0;
    transform: translateX(20px);
}

.lang-banner__flag {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.lang-banner__body {
    flex: 1;
    min-width: 0;
}

.lang-banner__text {
    margin: 0 0 6px;
    font-weight: 600;
    color: #fff;
}

.lang-banner__link {
    display: inline-block;
    color: #fca311;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(252, 163, 17, 0.5);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.lang-banner__link:hover,
.lang-banner__link:focus {
    color: #ffb733;
    border-bottom-color: #ffb733;
}

.lang-banner__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-banner__close:hover,
.lang-banner__close:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}

/* На мобільних — притискаємо до правого краю, трохи менший шрифт */
@media (max-width: 575px) {
    .lang-banner {
        top: 70px;
        right: 12px;
        left: 12px;
        max-width: none;
        padding: 12px 14px;
        font-size: 13px;
        gap: 10px;
    }
}
