﻿/* ============================================================
   eSIM — Packages page
   Requires esim-tokens.css (loaded first). Includes the packages
   list, operator card, Networks modal, and Check Compatibility modal.
   ============================================================ */

/* --- Page column (single centered column) --- */
.esim-pkg {
    max-width: 920px; /* match the cards (min-width: 920px) so they no longer overflow */
    margin: 0 auto;
    padding-bottom: 48px;
}

/* --- Breadcrumb --- */
.esim-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--esim-font);
    font-size: 16px;
    font-weight: 400;
    color: #112C55;
}

    .esim-breadcrumb a {
        color: #112C55;
        text-decoration: none;
        transition: color 0.2s;
    }

        .esim-breadcrumb a:hover {
            color: var(--esim-navy);
        }

.esim-breadcrumb__sep {
    width: 7px;
    height: 13px;
    flex-shrink: 0;
}

esim-breadcrumb__first {
    padding-right: 20px;
}


.esim-breadcrumb__current {
    color: var(--esim-navy);
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
}

/* --- Page title --- */
.esim-pkg-header {
    text-align: right;
}

.esim-pkg-header__title {
    font-family: var(--esim-font-u-bold);
    font-size: 55px;
    font-weight: 700;
    line-height: 56px;
    color: #160861;
    margin: 0 0 20px 0;
}

/* ============================================================
   Operator card
   ============================================================ */
.esim-operator {
    position: relative;
    background: #DAE7FF;
    border-radius: 44px;
    padding: 38px 48px 64px;
    min-width: 920px;
    margin-top: 25px;
    margin-bottom: 26px;
}

.esim-operator-plans-card {
    position: relative;
    background: #DAE7FF;
    border-radius: 44px;
    padding: 20px 6px 6px;
    min-width: 920px;
    margin-bottom: 50px;
}

/* country row above the divider */
.esim-operator__country {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--esim-font-u-bold);
    font-weight: 800;
    font-size: 18px;
    color: #160861;
}

img.esim-operator__flag {
    width: 26px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.esim-operator__divider {
    height: 1px;
    background: #99B0D3;
    margin: 10px 0 24px;
}

/* body: info (right in RTL) + logo (left) */
.esim-operator__body {
    display: flex;
    align-items: center;
    gap: 22px;
}

.esim-operator__info {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.esim-operator__name {
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 24px;
    color: #160861;
    margin: 0 0 8px;
}

.esim-operator__badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.esim-operator__badge {
    width: 14px;
}

/* orange button — "Check compatibility" / "Add to cart" */
.esim-operator__compat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F1481F;
    color: var(--esim-white);
    border: none;
    border-radius: 22px;
    padding: 10px 20px;
    font-family: var(--esim-font-u-bold);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: filter 0.2s, opacity 0.2s;
}

    .esim-operator__compat:hover {
        filter: brightness(1.05);
    }

    /* the button stays colored even when disabled (it's the CTA per the mockup) */
    .esim-operator__compat:disabled {
        cursor: default;
        opacity: 0.92;
    }

/* operator logo (left) */
.esim-operator__logo {
    margin-top: 13px;
    flex-shrink: 0;
    width: 294px;
    height: 185px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .esim-operator__logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

/* activation-guarantee bullet points inside the card */
.esim-operator__notes {
    list-style: none;
    margin: 25px 0 0;
    padding: 0;
}

    .esim-operator__notes li {
        display: flex;
        align-items: flex-start;
        gap: 4px;
        font-family: var(--esim-font);
        font-size: 16px;
        font-weight: 400;
        line-height: 28px;
        color: #112C55;
        margin-bottom: 6px;
    }

        .esim-operator__notes li:last-child {
            margin-bottom: 0;
        }

        .esim-operator__notes li::before {
            content: "";
            display: inline-block;
            margin-left: 6px;
            margin-bottom: 2px;
            width: 15px;
            height: 10px;
            align-self: center;
            background-image: url("/images/svg/check-navy.svg");
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

/* ============================================================
   Plan type tabs: "Data" / "Data / Voice / SMS"
   ============================================================ */
.esim-plan-tabs {
    display: flex;
    border-bottom: 3px solid #160861;
    margin-bottom: 18px;
}

.esim-plan-tabs__tab {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 12px 8px;
    font-family: var(--esim-font-u-bold);
    font-size: 16px;
    font-weight: 700;
    color: #160861;
    transition: color 0.2s;
}

    .esim-plan-tabs__tab:hover {
        color: var(--esim-navy);
    }

.esim-plan-tabs__tab--active::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    bottom: -3px;
    height: 6px;
    background: #160861;
}

/* ============================================================
   Toggle: "Standard" / "Unlimited" (segmented control)
   ============================================================ */
.esim-plan-toggle {
    display: flex;
    gap: 5px;
    padding: 8px;
    background: #BED5FF;
    border-radius: 15px;
    margin-bottom: 24px;
}

.esim-plan-toggle__opt {
    flex: 1;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #160861;
    font-family: var(--esim-font-u-bold);
    font-size: 14px;
    font-weight: 700;
    padding: 10px;
    border-radius: 7px;
    transition: background 0.2s, color 0.2s;
}

.esim-plan-toggle__opt--active {
    background: #160861;
    color: var(--esim-white);
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
}

/* ============================================================
   Package list
   ============================================================ */
.esim-pkg-choose {
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 18px;
    color: #160861;
    text-align: right;
    margin: 0 16px 14px;
}

.esim-packages {
    margin-bottom: 30px;
}

.esim-packages__group-title {
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 16px;
    color: #160861;
    text-align: right;
    margin-bottom: 6px;
    margin-right: 16px;
}

.esim-pkg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--esim-white);
    border-radius: 15px;
    border: 2px solid transparent; /* border space reserved at all times */
    padding: 15px 18px;
    margin: 0 9px 8px 9px;
    cursor: pointer;
}

    .esim-pkg-row:hover {
        border-color: #F1481F; /* the only signal before navigating away → make it noticeable */
        box-shadow: var(--esim-shadow-hover);
        transform: translateY(-1px);
    }

.esim-pkg-row__data {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    /* direction is inherited from the page: RTL sends the number-first-in-DOM to the right; a later LTR mode would send it left */
}

.esim-pkg-row__prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.esim-pkg-row__price-with-vat {
    display: flex;
    align-items: baseline;
    gap: 4px;
    direction: rtl;
}

.esim-pkg-row__price {
    font-family: var(--esim-font-d-bold);
    font-weight: 600;
    font-size: 12px;
    color: #160861;
}

.esim-pkg-row__price-before-vat {
    font-family: var(--esim-font-d-bold);
    font-weight: 600;
    font-size: 18px;
    color: #160861;
    direction: ltr;
    /* isolate: keep the bidi run from leaking into the surrounding RTL text */
    unicode-bidi: isolate;
}

.esim-pkg-row__price-before-vat,
.esim-pkg-row__price-with-vat {
    line-height: 1.1;
}

.esim-pkg-row__vat {
    font-size: 11px;
}

.esim-token {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.esim-token__sep {
    opacity: 0.5;
}

.esim-token__num {
    font-family: var(--esim-font-bold);
    font-weight: 700;
    font-size: 18px;
}

.esim-token__unit {
    font-family: var(--esim-font-medium);
    font-weight: 500;
    font-size: 18px;
}


/* ============================================================
   "Need more coverage?" block — upsell on region/global pages
   ============================================================ */
.esim-more-coverage {
    margin: 30px 15px 15px 15px;
}

.esim-more-coverage__title {
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 18px;
    color: #160861;
    text-align: right;
    margin: 0 14px 12px;
}

.esim-more-coverage__text {
    font-family: var(--esim-font);
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
    color: #112C55;
    text-align: right;
    margin: 0 14px 22px;
    max-width: 600px;
}

.esim-more-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--esim-white);
    border-radius: 29px;
    border: 2px solid transparent;
    padding: 20px 16px 20px 32px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.15s;
}

    .esim-more-card:hover {
        border-color: #F1481F;
        box-shadow: var(--esim-shadow-hover);
        transform: translateY(-1px);
    }

.esim-more-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    /* RTL column: flex-start is the right edge — keeps name and prices in one column */
    align-items: flex-start;
    text-align: right;
    direction: rtl;
}

.esim-more-card__name {
    display: block;
    width: 100%;
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 18px;
    color: #160861;
    margin-bottom: 6px;
}

.esim-more-card__price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    color: #160861;
    direction: rtl;
    text-align: right;
}

.esim-more-card__price-before-vat {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
    color: #160861;
}

.esim-more-card__price-with-vat {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
    /* LTR here: amount first (left), Hebrew label after it (right) */
    direction: ltr;
    color: #160861;
}

.esim-more-card__price-before-vat,
.esim-more-card__price-with-vat {
    line-height: 1.1;
}

.esim-more-card__price-value {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: var(--esim-font-d-bold);
    font-weight: 600;
}

.esim-more-card__price-before-vat .esim-more-card__price-value {
    font-size: 18px;
}

.esim-more-card__price-with-vat .esim-more-card__price-value {
    font-size: 12px;
}

.esim-more-card__price-from {
    font-family: var(--esim-font-u-regular);
    font-size: 18px;
}

.esim-more-card__vat {
    font-family: var(--esim-font-u-regular);
    font-size: 12px;
    font-weight: 400;
}

.esim-more-card__icon {
    width: 69px;
    height: 59px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: contain;
}

.esim-more-card__chevron {
    width: 11px;
}

/* ============================================================
   eSIM — Networks (operator card line + modal popup)
   ============================================================ */

/* --- Networks row on the operator card --- */
/* The container inherits RTL from its parent: the first network sits on the right, "+N" on the left. */
.esim-operator__networks {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

/* A single network: icon + name + type. Inside it's LTR — Latin brand names read left to right. */
.esim-network {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
    unicode-bidi: isolate;
}

.esim-network__icon {
    width: 14px;
}

.esim-network__name {
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 15px;
    color: #160861;
}

.esim-network__type {
    font-family: var(--esim-font-u-bold);
    font-size: 11px;
    font-weight: 700;
    color: #160861;
    border: 1px solid #9AAAC5;
    background-color: var(--esim-white);
    border-radius: 8px;
    padding: 1px 6px;
    line-height: 1.5;
    display: inline-block;
    box-sizing: border-box;
    min-width: 34px;
    text-align: center;
}

.esim-network__more {
    font-family: var(--esim-font);
    font-size: 14px;
    color: var(--esim-navy);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

    .esim-network__more:hover {
        color: var(--esim-orange);
    }

/* ============================================================
   "Networks" modal
   ============================================================ */
.esim-networks-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    /* the hidden attribute fully hides the modal */
    .esim-networks-modal[hidden] {
        display: none;
    }

.esim-networks-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 8, 97, 0.35);
}

.esim-networks-modal__panel {
    position: relative;
    background: var(--esim-white);
    border-radius: 24px;
    padding: 26px 28px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(22, 8, 97, 0.25);
    direction: rtl;
    text-align: right;
    /* small entrance animation */
    animation: esim-modal-in 0.18s ease-out;
}

@keyframes esim-modal-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.esim-networks-modal__head {
    display: flex;
    align-items: center;
/*    margin-top: 30px;*/
    margin-bottom: 14px;
    padding-inline-start: 44px; /* room for the absolute close button (top-right in RTL) */
}

.esim-networks-modal__title {
    font-family: var(--esim-font-u-bold);
    font-weight: 800;
    font-size: 22px;
    color: var(--esim-navy);
    margin: 0;
}

.esim-networks-modal__close {
    position: absolute;
    top: 20px;
    inset-inline-start: 20px; /* top-right in RTL, mirrors to top-left in LTR */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--esim-blue-bg);
    color: var(--esim-navy);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .esim-networks-modal__close:hover {
        background: var(--esim-gray-border);
    }

.esim-networks-modal__desc {
    font-family: var(--esim-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--esim-text-muted);
    margin: 0 0 18px;
}

.esim-networks-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    /* Network rows in the list — LTR (same as on the card) */
    .esim-networks-modal__list .esim-network {
        font-size: 16px;
    }

        .esim-networks-modal__list .esim-network .esim-network__name {
            font-size: 16px;
        }

.esim-confirmation {
    margin-top: 1.5rem;
    text-align: right;
}

.esim-order-title {
    font-size: 1.1rem;
    margin: 0 0 .75rem;
}

.esim-sim {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--esim-border, #e2e2e2);
    border-radius: 12px;
    background: var(--esim-card-bg, #fff);
}

.esim-qr {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
}

img.esim-qr {
    object-fit: contain;
}

.esim-sim-meta {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    min-width: 0;
}

.esim-iccid {
    font-weight: 600;
}

.esim-apple-install {
    display: inline-block;
    width: fit-content;
    padding: .4rem .8rem;
    border-radius: 8px;
    background: var(--esim-accent, #0a7);
    color: #fff;
    text-decoration: none;
}

.esim-lpa {
    font-family: monospace;
    font-size: .8rem;
    word-break: break-all;
    direction: ltr;
    text-align: left;
    background: var(--esim-code-bg, #f5f5f5);
    padding: .4rem .5rem;
    border-radius: 6px;
}

.esim-pending {
    color: var(--esim-muted, #666);
}

/* ============================================================
   Check Compatibility modal
   ============================================================ */
/* Check Compatibility modal */
.esim-compat-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

    .esim-compat-modal[hidden] {
        display: none;
    }

.esim-compat-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 8, 97, 0.35);
}

.esim-compat-modal__panel {
    position: relative;
    background: var(--esim-white);
    border-radius: 24px;
    padding: 26px 28px;
    width: 100%;
    max-width: 560px;
    margin-top: 120px;
    max-height: calc(100vh - 160px); /* 120 offset + 20+20 container padding */
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(22, 8, 97, 0.25);
    direction: rtl;
    text-align: right;
}


.esim-compat-modal__head {
    margin: 40px 0 18px; /* top offset so the title doesn't run into the close button */
}

.esim-compat-modal__title {
    font-family: var(--esim-font-bold);
    font-weight: 700;
    font-size: 24px;
    text-align: right;
}

.esim-compat-modal__close {
    position: absolute;
    top: 20px;
    inset-inline-start: 20px; /* top-right in RTL, mirrors to top-left in LTR */
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.2s;
}

    .esim-compat-modal__close:hover {
        opacity: 0.7;
    }

    .esim-compat-modal__close img {
        width: 100%;
        height: 100%;
        display: block;
    }

.esim-compat-modal__intro {
    font-family: var(--esim-font);
    font-size: 14px;
    line-height: 1.4;
    color: var(--esim-text-muted);
    margin-bottom: 12px;
}

    .esim-compat-modal__intro p {
        margin: 0 0 6px;
    }

.esim-compat-modal__conditions {
    margin: 0;
    padding-right: 18px;
}

    .esim-compat-modal__conditions li {
        line-height: 1.35;
        margin-bottom: 3px;
    }

        .esim-compat-modal__conditions li:last-child {
            margin-bottom: 0;
        }

.esim-compat-modal__conditions {
    margin: 8px 0 0;
    padding-right: 18px;
}

.esim-compat-tabs {
    display: flex;
    width: 303px;
    margin-left: auto;
    gap: 0;
    border-bottom: 1px solid var(--esim-gray-border);
    margin-bottom: 16px;
}

.esim-compat-tabs__tab {
    flex: 1 1 50%;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 4px;
    font-family: var(--esim-font);
    font-size: 16px;
    color: var(--esim-text-muted);
    position: relative;
}

.esim-compat-tabs__tab--active {
    color: var(--esim-navy);
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
}

    .esim-compat-tabs__tab--active::after {
        content: '';
        position: absolute;
        right: 0;
        left: 0;
        bottom: -1px;
        height: 3px;
        background: var(--esim-orange);
        border-radius: 2px;
    }

.esim-compat-search {
    position: relative;
    margin-bottom: 16px;
}

.esim-compat-search__icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.55;
    pointer-events: none;
}

.esim-compat-search__input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px 11px 42px; /* 42px on the left — room for the icon */
    border: 1px solid rgba(96, 116, 139, 0.2); /* #60748B */
    border-radius: 10px;
    font-family: var(--esim-font);
    font-size: 14px;
    direction: rtl;
    text-align: right; /* placeholder/text aligned right */
    color: var(--esim-text-dark);
}

    .esim-compat-search__input::placeholder {
        color: #A6A6A6;
        opacity: 1;
    }

    .esim-compat-search__input:focus {
        outline: none;
        border-color: var(--esim-orange);
    }

/* scrollable device list */
.esim-compat-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

    .esim-compat-list[hidden] {
        display: none;
    }

.esim-compat-brand__name {
    font-family: var(--esim-font-u-bold);
    font-weight: 700;
    font-size: 15px;
    color: var(--esim-navy);
    margin: 14px 0 6px;
}

.esim-compat-device {
    font-family: var(--esim-font);
    font-size: 14px;
    color: var(--esim-text-dark);
    padding: 4px 0;
    /* device names are mostly Latin — keep them readable LTR-ish but
       aligned to the RTL side */
    unicode-bidi: plaintext;
}

.esim-compat-modal__empty {
    text-align: center;
    color: var(--esim-text-muted);
    font-family: var(--esim-font);
    padding: 20px 0;
}
