/**
 * Store directory states.
 *
 * The region buttons toggle an .is-active class that the theme never styled,
 * so clicking one filtered the plans with no visible feedback at all. Uses the
 * theme's own primary (#58B58E) rather than a new colour.
 */

.esim-region-filters .region-card.is-active {
    outline: 2px solid #58B58E;
    outline-offset: -2px;
    background: rgba(88, 181, 142, .25);
}

.esim-region-filters .region-card {
    transition: background .15s ease, outline-color .15s ease;
}

/**
 * A–Z jump bar and lazily filled letter groups.
 *
 * With the whole catalogue published the directory is over a thousand cards,
 * so the server sends headings plus the first letter and the rest arrive as
 * the visitor scrolls. These rules cover the bar and the waiting state; the
 * cards themselves stay entirely the theme's.
 */

.plans-letters {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 2rem;
}

.plans-letter {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    padding: .3rem .55rem;
    border-radius: 8px;
    background: rgba(88, 181, 142, .12);
    color: inherit;
    text-decoration: none;
    line-height: 1.2;
}

.plans-letter:hover,
.plans-letter:focus-visible {
    background: rgba(88, 181, 142, .3);
    color: inherit;
}

.plans-letter-glyph {
    font-weight: 600;
}

.plans-letter-count {
    font-size: .7em;
    opacity: .6;
}

/* Keeps the group from collapsing to nothing while its cards are on the way. */
.plans-grid.is-pending {
    min-height: 6rem;
    border-radius: 12px;
    background: linear-gradient(100deg, rgba(128, 128, 128, .06) 30%, rgba(128, 128, 128, .14) 50%, rgba(128, 128, 128, .06) 70%);
    background-size: 220% 100%;
    animation: esim-letter-wait 1.4s ease-in-out infinite;
}

@keyframes esim-letter-wait {
    from { background-position: 100% 0; }
    to   { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .plans-grid.is-pending {
        animation: none;
    }
}

/**
 * Top-up notice.
 *
 * Shown when the visitor arrived from "Top up now" in their eSIM portal, so
 * the store does not look like an ordinary new-SIM purchase. Uses the theme's
 * primary rather than a new colour, and states the ICCID so the customer can
 * check it is the right SIM before paying.
 */
.plans-topup-notice {
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #58B58E;
    border-radius: 6px;
    background: rgba(88, 181, 142, .12);
    color: inherit;
    font-size: 15px;
}

.plans-topup-notice code {
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(88, 181, 142, .22);
    color: inherit;
    font-size: .95em;
}
