/* Header language switcher — Figma: Home > Topbar (desktop) / Home Mobile.
   Plain CSS on purpose: the Tailwind source for dist/output.css is not in the repo. */

@font-face {
    font-family: Montserrat-Medium;
    src: url('../fonts/Montserrat-Medium.ttf') format("truetype");
}

.lang-switch {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
}

.lang-switch__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.lang-switch__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #110E2D;
    color: #fff;
    font-family: MontserratLtr, Montserrat-Bold, sans-serif;
    font-weight: 700;
    font-size: 9px;
    letter-spacing: .5px;
    line-height: 1;
}

/* the name is only shown from sm up; on mobile it is flag + chevron */
.lang-switch__label {
    display: none;
}

.lang-switch__label--fa,
.lang-switch__label--ku,
.lang-switch__label--ar {
    font-family: IranSansFaNum-Bold, sans-serif;
}

.lang-switch__label--en {
    font-family: Montserrat-Bold, sans-serif;
}

.lang-switch__chevron {
    flex-shrink: 0;
    transition: transform .2s;
}

.lang-switch.is-open .lang-switch__chevron {
    transform: rotate(180deg);
}

/* --- dropdown --- */
.lang-switch__menu {
    position: absolute;
    top: calc(100% + 16px);
    inset-inline-start: -14px;
    min-width: 160px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid #E4E4E4;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(17, 14, 45, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}

.lang-switch.is-open .lang-switch__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* small bump on top of the card, pointing at the flag, with the orange dot */
.lang-switch__notch {
    position: absolute;
    top: -8px;
    inset-inline-start: 19px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-top: 1px solid #E4E4E4;
    border-left: 1px solid #E4E4E4;
    border-top-left-radius: 5px;
    transform: rotate(45deg);
}

.lang-switch__notch::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #EE5D37;
}

.lang-switch__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 56px;
    color: #110E2D;
    font-size: 15px;
    transition: color .2s;
}

.lang-switch__item + .lang-switch__item {
    border-top: 1px solid #E0E0E0;
}

.lang-switch__item:hover {
    color: #EE5D37;
}

.lang-switch__code--item {
    width: 26px;
    height: 26px;
    font-size: 10px;
}

.lang-switch__item .lang-switch__label--fa,
.lang-switch__item .lang-switch__label--ku,
.lang-switch__item .lang-switch__label--ar {
    font-family: IranSansFaNum-Medium, sans-serif !important;
}

.lang-switch__item .lang-switch__label--en {
    font-family: Montserrat-Medium, sans-serif;
}

/* --- sm and up: grey pill that slides under the phone button --- */
@media (min-width: 640px) {
    .lang-switch__toggle {
        height: 56px;
        gap: 12px;
        padding-inline-start: 16px;
        /* 40px of the pill sit under the phone button (-ml-10 / -mr-10) */
        padding-inline-end: 58px;
        background: #EDF2F8;
        border-radius: 200px;
    }

    .lang-switch__code {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .lang-switch__label {
        display: inline;
        font-size: 16px;
        color: #110E2D;
    }

    .lang-switch__menu {
        top: calc(100% + 36px);
        inset-inline-start: 0;
        min-width: 216px;
        padding: 0 22px;
    }

    .lang-switch__notch {
        inset-inline-start: 22px;
    }

    .lang-switch__item {
        height: 62px;
        font-size: 16px;
    }

    .lang-switch__code--item {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
}

/* --- phone button next to the switcher (Figma: two lines, small prefix on top) --- */
/* the phone button sits on top of the grey switcher pill, which tucks underneath it */
.header-phone-btn {
    position: relative;
    z-index: 60;
}

.header-phone {
    text-align: left;
    line-height: 1.15;
}

.header-phone__prefix {
    display: block;
    font-size: 13px;
    opacity: .55;
}

.header-phone__number {
    display: block;
    font-size: 19px;
    font-weight: 800;
}
