/* ─────────────────────────────────────────────────────────
   MODAL LAYOUT
   ───────────────────────────────────────────────────────── */
.trp-ls-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    align-items: center;
    justify-content: center;
    z-index: 9999999;
}

.trp-ls-modal-content {
    background: #fff;
    position: relative;
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5em 1.5em 30px;
    border-radius: 16px;

    /* ✅ This keeps the modal consistent */
    height: 70vh;
    min-height: 40vh;
    max-height: 90vh;
}


/* Header row: title left, close right */
.trp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 10px;
}

.trp-ls-modal-content h3.trp-modal-title {
    margin: 0;
    font-size: 18px !important;
    font-weight: 600;
    color: #021B32;
    line-height: 1.5;
}

/* Close button now inline, no absolute positioning */
.trp-ls-close {
    cursor: pointer;
    color: #021B32;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trp-ls-close i {
    pointer-events: none;
    /* icon won’t block clicks */
}

.trp-ls-close:hover {
    color: #083156;
    /* hover highlight */
    transition: color 0.2s ease;
}

.trp-ls-sections {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    /* ✅ allows children to shrink & scroll */
}

/* Tabs */
.trp-tabs {
    display: inline-flex;
    gap: .5rem;
    margin: 1em 0 1em 0;
    width: 100%;
    background: #F5F5F5;
    border-radius: 8px;
    margin-bottom: 10px;
}

.trp-tab {
    background: transparent;
    border: 0;
    color: #656A76;
    cursor: pointer;
    width: 100%;
    border-radius: 6px;
    margin: 6px;
    line-height: 1.5;
    transition: background-color 0.25s ease, color 0.25s ease;
}

button.trp-tab:not(.is-active):hover {
    background-color: #EFF6FF;
    color: #021B32;
}

.trp-tab.is-active {
    background: #FFFFFF;
    color: #021B32;
}

/* Tab panels */
.trp-tabpanel {
    flex: 1 1 auto;
    /* ✅ each tab fills remaining height */
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* important for overflow */
}

.trp-tabpanel:not(.is-active) {
    display: none;
}

/* Search */
.trp-search {
    position: relative;
    margin: 0 0 .75rem 0;
    min-height: 42px;
}

.trp-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #656A76;
    font-size: 14px;
    pointer-events: none;
    /* ✅ doesn't block clicks in input */
}

#trp-lang-search,
#trp-curr-search {
    width: 100%;
    padding: .5rem .75rem .5rem 2.25rem;
    border: 0;
    border-radius: 12px;
    font-size: 16px;
    /* line-height: 1.5; */
    color: #9FA3AD;
    background: #F5F5F5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Optional: highlight on focus */
#trp-lang-search:focus,
#trp-curr-search:focus {
    outline: none;
}

#trp-lang-search:focus~.trp-search-icon,
#trp-curr-search:focus~.trp-search-icon {
    outline: none;
}

/* Panels (scrollable area) */
.trp-ls-language-panel,
.trp-currency-panel {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-top: .25rem;
    min-height: 0;
    /* ✅ ensures scrollbars show */
}

.trp-ls-currency-panel {
    overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────
   TRIGGER BUTTON
   ───────────────────────────────────────────────────────── */
.trp-ls-trigger {
    border: 1px solid #09355D !important;
    background: #00234F;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 1rem;
}
.trp-ls-trigger:hover {
    background: #021B32;
    color: #fff !important;
    border-color: #021B32 !important;
    box-shadow: 0 0 0 3px rgba(8, 49, 86, .12);
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

/* ─────────────────────────────────────────────────────────
   LANGUAGE LIST (stacked rows)
   ───────────────────────────────────────────────────────── */
.trp-language-switcher {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.trp-language-switcher li {
    margin: 0 0 .5rem 0;
}

.trp-language-switcher .trp-lang-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .75rem .875rem;
    border-radius: 8px;
    background: #fff;
    color: #0a2540;
    text-decoration: none;
    line-height: 1.25;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.trp-language-switcher .trp-lang-row:hover,
.trp-language-switcher .trp-lang-row:focus-visible {
    background: #EFF6FF;
}

.trp-lang-left {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.trp-lang-code {
    font-weight: 600;
}

.trp-lang-sep {
    opacity: .7;
}

.trp-lang-name {
    opacity: .95;
}

.trp-lang-check {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.trp-ls-language.trp-ls-current-language>.trp-lang-row {
    background: #EAF2FF;
    border-color: #BCD3FF;
}

.trp-ls-language.trp-ls-current-language>.trp-lang-row .trp-lang-check {
    position: relative;
}

.trp-ls-language.trp-ls-current-language>.trp-lang-row .trp-lang-check::before {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: #083156;
}

/* No flags in the list (and tidy any inline hreflang) */
#trp-ls-list img {
    display: none !important;
}

li.trp-ls-language {
    display: flex;
    align-items: center;
}

#trp-ls-list .hreflang-inline span {
    margin-left: 5px;
}

li.trp-ls-language span.hreflang-inline>a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px !important;
    border: 2px solid transparent !important;
    border-radius: 9999px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    transition: background-color .15s ease, border-color .15s ease;
}

/* ─────────────────────────────────────────────────────────
   CURRENCY LIST (identical look to LANGUAGE rows)
   ───────────────────────────────────────────────────────── */
.trp-currency-switcher {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.trp-currency-switcher li {
    margin: 0 0 .5rem 0;
}

.trp-curr-flag {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.trp-curr-left {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    /* space between flag & code */
}

.aelia-cs-btn.trp-curr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-radius: 8px;
    background: #fff;
    color: #0a2540;
    text-decoration: none;
    padding: .75rem .875rem;
    line-height: 1.25;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    cursor: pointer;
    font: inherit;
}

.aelia-cs-btn.trp-curr-row:hover,
.aelia-cs-btn.trp-curr-row:focus-visible {
    background: #EAF2FF;
    border-color: #d6e4ff;
    outline: 0;
}

.trp-curr-left {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.trp-curr-code {
    font-weight: 600;
}

.trp-curr-sep {
    opacity: .7;
}

.trp-curr-name {
    opacity: .95;
}

.trp-curr-check {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

/* Active currency = same selected style & checkmark */
.trp-currency--active>form>.trp-curr-row {
    background: #EAF2FF;
}

.trp-currency--active>form>.trp-curr-row .trp-curr-check {
    position: relative;
}

.trp-currency--active>form>.trp-curr-row .trp-curr-check::before {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: #083156;
}

/* Neutralize legacy pill styles from plugins */
.trp-currency-switcher li a {
    padding: 0;
    background: none;
}

.trp-currency--active a {
    background: none;
    color: inherit;
    border-radius: 8px;
}

.aelia-cs-btn {
    background: none;
    border: 0;
    padding: 0;
}

.aelia-cs-btn:hover,
.aelia-cs-btn:focus-visible {
    background: none;
    box-shadow: none;
}

/* Shared hover target safety */
.trp-language-switcher li a {
    border-radius: 8px;
}

/* Accessibility */
@media (prefers-contrast: more) {

    .trp-language-switcher li a:focus-visible,
    .trp-currency-switcher li a:focus-visible,
    .trp-ls-trigger:focus-visible,
    .trp-ls-close:focus-visible {
        outline-width: 4px;
        outline-color: #083156;
        box-shadow: 0 0 0 4px #fff;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .trp-ls-modal-content {
        max-width: 95%;
        padding: 1em;
        max-height: 90vh;
    }
}

@media (max-width: 640px) {

    .trp-ls-language-panel,
    .trp-currency-panel {
        min-height: 30vh;
        max-height: 85vh;
    }
}