:root {
    --tpa-blue: #2563eb;
    --tpa-blue-dark: #1d4ed8;
    --tpa-ink: #0f172a;
    --tpa-muted: #475569;
    --tpa-line: #e2e8f0;
    --tpa-bg-soft: #f8fafc;
    --tpa-white: #ffffff;
}

.tpa-header,
.tpa-header *,
.tpa-footer,
.tpa-footer *,
.tpa-wa,
.tpa-wa * {
    box-sizing: border-box;
}

.tpa-header {
    position: sticky;
    top: 0;
    z-index: 9990;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--tpa-line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--tpa-ink);
}

.tpa-header a,
.tpa-footer a {
    text-decoration: none;
}

.tpa-header__inner {
    width: min(1220px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tpa-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.tpa-brand img {
    display: block;
    width: 170px;
    height: auto;
}

.tpa-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-inline-start: auto;
}

.tpa-nav__link,
.tpa-dropdown__summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    color: #334155;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease;
}

.tpa-nav__link:hover,
.tpa-nav__link.is-active,
.tpa-dropdown.is-active > .tpa-dropdown__summary,
.tpa-dropdown__summary:hover {
    color: var(--tpa-blue);
}

.tpa-nav__link.is-active::after,
.tpa-dropdown.is-active > .tpa-dropdown__summary::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -17px;
    height: 3px;
    border-radius: 999px;
    background: var(--tpa-blue);
}

.tpa-nav__cta,
.tpa-mobile-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    color: #fff;
    background: var(--tpa-blue);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
    transition: background .18s ease, transform .18s ease;
}

.tpa-nav__cta:hover,
.tpa-mobile-nav__cta:hover {
    color: #fff;
    background: var(--tpa-blue-dark);
    transform: translateY(-1px);
}

.tpa-dropdown,
.tpa-language,
.tpa-mobile-services {
    position: relative;
}

.tpa-dropdown > summary,
.tpa-language > summary,
.tpa-mobile-services > summary {
    list-style: none;
}

.tpa-dropdown > summary::-webkit-details-marker,
.tpa-language > summary::-webkit-details-marker,
.tpa-mobile-services > summary::-webkit-details-marker {
    display: none;
}

.tpa-dropdown__summary svg,
.tpa-language summary svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.tpa-dropdown[open] .tpa-dropdown__summary svg,
.tpa-language[open] summary svg {
    transform: rotate(180deg);
}

.tpa-dropdown__menu,
.tpa-language__menu {
    position: absolute;
    top: calc(100% + 12px);
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 270px;
    padding: 9px;
    border: 1px solid var(--tpa-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .14);
    z-index: 9995;
}

html[dir="rtl"] .tpa-dropdown__menu,
.tpa-header[dir="rtl"] .tpa-dropdown__menu {
    transform: translateX(50%);
}

.tpa-dropdown__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 14px;
    border-radius: 12px;
    color: #334155;
    transition: background .18s ease, color .18s ease;
}

.tpa-dropdown__item strong {
    font-size: 14px;
}

.tpa-dropdown__item span {
    color: #64748b;
    font-size: 12px;
}

.tpa-dropdown__item:hover,
.tpa-dropdown__item.is-active {
    color: var(--tpa-blue);
    background: #eff6ff;
}

.tpa-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.tpa-language > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 999px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.tpa-language > summary:hover {
    color: var(--tpa-blue);
    background: #f1f5f9;
}

.tpa-language__menu {
    width: 190px;
    inset-inline-start: auto;
    inset-inline-end: 0;
    transform: none;
}

.tpa-language__menu a,
.tpa-language__current {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-align: start;
}

.tpa-language__menu a:hover {
    color: var(--tpa-blue);
    background: #f8fafc;
}

.tpa-language__current {
    color: var(--tpa-blue);
    background: #eff6ff;
}

.tpa-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.tpa-menu-button span {
    display: block;
    width: 23px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--tpa-ink);
    transition: transform .2s ease, opacity .2s ease;
}

.tpa-menu-button.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.tpa-menu-button.is-open span:nth-child(2) {
    opacity: 0;
}

.tpa-menu-button.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.tpa-mobile-nav {
    display: none;
    border-top: 1px solid var(--tpa-line);
    background: #fff;
    box-shadow: 0 18px 34px rgba(15, 23, 42, .08);
}

.tpa-mobile-nav.is-open {
    display: block;
}

.tpa-mobile-nav__inner {
    width: min(100% - 32px, 680px);
    margin: 0 auto;
    padding: 14px 0 22px;
}

.tpa-mobile-nav__link,
.tpa-mobile-services > summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
}

.tpa-mobile-nav__link.is-active,
.tpa-mobile-services > summary,
.tpa-mobile-services a.is-active {
    color: var(--tpa-blue);
}

.tpa-mobile-services > summary::after {
    content: "+";
    font-size: 20px;
    line-height: 1;
}

.tpa-mobile-services[open] > summary::after {
    content: "−";
}

.tpa-mobile-services > div {
    padding: 5px 0 8px 14px;
}

.tpa-header[dir="rtl"] .tpa-mobile-services > div {
    padding: 5px 14px 8px 0;
}

.tpa-mobile-services a {
    display: block;
    padding: 11px 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.tpa-mobile-nav__cta {
    width: 100%;
    margin-top: 16px;
}

.tpa-footer {
    background: #0b1220;
    color: #cbd5e1;
    padding: 58px 0 0;
}

.tpa-footer__inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(300px, 1.55fr) repeat(3, minmax(140px, 1fr));
    gap: 32px;
    align-items: start;
}

.tpa-footer__inner.tpa-footer__inner--with-markets {
    grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(140px, 1fr));
    gap: 28px;
}

.tpa-footer__wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    color: #ffffff;
    font-size: 27px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.035em;
}

.tpa-footer__wordmark strong {
    color: #60a5fa;
    font-weight: 900;
}

.tpa-footer__brand p {
    max-width: 380px;
    margin: 18px 0 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.75;
}

.tpa-footer__column h2 {
    margin: 4px 0 17px;
    color: #fff;
    font-size: 14px;
    font-weight: 850;
}

.tpa-footer__column a {
    display: block;
    width: fit-content;
    margin: 0 0 11px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
    transition: color .18s ease;
}

.tpa-footer__column a:hover {
    color: #fff;
}

.tpa-footer__bottom {
    width: min(1180px, calc(100% - 40px));
    margin: 44px auto 0;
    padding: 21px 0;
    border-top: 1px solid rgba(148, 163, 184, .2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #94a3b8;
    font-size: 13px;
}

.tpa-wa {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.tpa-wa[dir="rtl"] {
    right: auto;
    left: 22px;
    align-items: flex-start;
}

.tpa-wa__bubble,
.tpa-wa__icon {
    pointer-events: auto;
}

.tpa-wa__bubble {
    position: relative;
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 10px 14px;
    background: #fff;
    color: #1e293b;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.tpa-wa__arrow {
    position: absolute;
    right: 20px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid #dcfce7;
    border-bottom: 1px solid #dcfce7;
    transform: rotate(45deg);
}

.tpa-wa[dir="rtl"] .tpa-wa__arrow {
    right: auto;
    left: 20px;
    border-right: 0;
    border-left: 1px solid #dcfce7;
}

.tpa-wa__icon {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 14px 28px rgba(34, 197, 94, .3);
    transition: transform .2s ease, opacity .2s ease;
}

.tpa-wa__icon:hover {
    transform: translateY(-2px) scale(1.03);
}

.tpa-wa__icon svg {
    width: 31px;
    height: 31px;
    fill: #fff;
}

@media (max-width: 1180px) {
    .tpa-nav--desktop {
        display: none;
    }

    .tpa-menu-button {
        display: block;
    }

    .tpa-header__inner {
        min-height: 70px;
    }

    .tpa-brand img {
        width: 160px;
    }
}

@media (max-width: 1080px) {
    .tpa-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tpa-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .tpa-header__inner,
    .tpa-footer__inner,
    .tpa-footer__bottom {
        width: min(100% - 30px, 100%);
    }

    .tpa-brand img {
        width: 150px;
    }

    .tpa-language > summary {
        padding-inline: 7px;
    }

    .tpa-footer {
        padding-top: 44px;
    }

    .tpa-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 28px 20px;
    }

    .tpa-footer__brand {
        grid-column: 1 / -1;
    }

    .tpa-footer__bottom {
        margin-top: 34px;
        flex-direction: column;
        align-items: flex-start;
    }

    .tpa-footer[dir="rtl"] .tpa-footer__bottom {
        align-items: flex-end;
    }

    .tpa-wa {
        right: 0;
        bottom: 16px;
    }

    .tpa-wa[dir="rtl"] {
        right: auto;
        left: 0;
    }

    .tpa-wa__bubble {
        max-width: 235px;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 16px 0 0 16px;
    }

    .tpa-wa[dir="rtl"] .tpa-wa__bubble {
        border-radius: 0 16px 16px 0;
    }

    .tpa-wa__icon {
        width: 54px;
        height: 54px;
        margin-inline: 8px;
    }
}

/* Mobile interaction hardening */
.tpa-header__actions,
.tpa-menu-button,
.tpa-language {
    position: relative;
    z-index: 4;
}

.tpa-menu-button,
.tpa-language > summary,
.tpa-mobile-services > summary {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tpa-mobile-nav.is-open {
    position: relative;
    z-index: 3;
}

/* =========================================================
   TruePriceAgent V2 navigation interaction layer
   Uses buttons and hidden panels instead of details/summary.
   ========================================================= */

.tpa-header [hidden] {
    display: none !important;
}

.tpa-dropdown__summary,
.tpa-language__summary,
.tpa-mobile-services__summary {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: inherit;
}

.tpa-dropdown__summary {
    padding: 0;
}

.tpa-dropdown__summary svg,
.tpa-language__summary svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.tpa-dropdown.is-open .tpa-dropdown__summary svg,
.tpa-language.is-open .tpa-language__summary svg {
    transform: rotate(180deg);
}

.tpa-dropdown.is-open > .tpa-dropdown__menu,
.tpa-language.is-open > .tpa-language__menu {
    display: block;
}

.tpa-language__summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 999px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.tpa-language__summary:hover,
.tpa-language__summary:focus-visible {
    color: var(--tpa-blue);
    background: #f1f5f9;
}

.tpa-mobile-services__summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--tpa-blue);
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
}

.tpa-mobile-services__summary::after {
    content: "+";
    font-size: 20px;
    line-height: 1;
}

.tpa-mobile-services.is-open > .tpa-mobile-services__summary::after {
    content: "−";
}

.tpa-mobile-services__menu {
    padding: 5px 0 8px 14px;
}

.tpa-header[dir="rtl"] .tpa-mobile-services__menu {
    padding: 5px 14px 8px 0;
}

.tpa-mobile-services__menu a {
    display: block;
    padding: 11px 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.tpa-mobile-services__menu a.is-active {
    color: var(--tpa-blue);
}

.tpa-menu-button,
.tpa-dropdown__summary,
.tpa-language__summary,
.tpa-mobile-services__summary {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tpa-header__inner,
.tpa-header__actions,
.tpa-brand {
    min-width: 0;
}

.tpa-dropdown__menu,
.tpa-language__menu {
    max-width: calc(100vw - 24px);
}

@media (max-width: 600px) {
    .tpa-language__summary {
        padding-inline: 7px;
    }
}

@media (max-width: 380px) {
    .tpa-header__inner {
        gap: 8px;
    }

    .tpa-brand {
        flex: 1 1 auto;
    }

    .tpa-brand img {
        width: min(132px, 100%);
    }

    .tpa-header__actions {
        flex: 0 0 auto;
        gap: 6px;
    }

    .tpa-language__summary {
        padding-inline: 5px;
    }
}

/* =========================================================
   2026-08-04: compact language arrow + RTL mobile menu fix
   ========================================================= */

/* Keep the language control on one line and reduce the arrow size. */
.tpa-language__summary {
    flex-wrap: nowrap !important;
    white-space: nowrap;
    line-height: 1;
}

.tpa-language__summary svg {
    display: block !important;
    width: 11px !important;
    height: 11px !important;
    min-width: 11px !important;
    flex: 0 0 11px !important;
}

/*
 * Use physical left/right positioning here.
 * The language wrapper itself uses dir="ltr", so logical inset properties
 * would otherwise open the menu outside the viewport on an RTL header.
 */
.tpa-language {
    z-index: 10002;
}

.tpa-language__menu {
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    right: 0 !important;
    left: auto !important;
    z-index: 10003;
}

/* Arabic / RTL: the button sits on the left, so open the menu to the right. */
.tpa-header[dir="rtl"] .tpa-language__menu {
    right: auto !important;
    left: 0 !important;
}

@media (max-width: 600px) {
    .tpa-language__summary {
        min-height: 36px;
        gap: 4px;
        padding: 6px 7px;
    }

    .tpa-language__summary svg {
        width: 9px !important;
        height: 9px !important;
        min-width: 9px !important;
        flex-basis: 9px !important;
    }

    .tpa-language__menu {
        top: calc(100% + 8px);
        width: min(190px, calc(100vw - 24px));
    }
}