/* phones-cart.css — the phone store (templates/orderforms/phones_cart/products.tpl).
   Every rule is scoped to html:has(.phones-cart) or .phones-cart; the navbar and footer belong to the theme.
   Colours come from the nexus_proxeasy tokens in css/custom.css (light mode only); no literal colours.
   Width media queries use max-width (never Level 4 range syntax); one (scripting: none) query serves no-JS visitors. */

html:has(.phones-cart) {
    color-scheme: light;
}

.phones-cart {
    max-width: 1100px;
    margin-inline: auto;
    padding-block: 2rem 3rem;
    color: var(--text);
}

.phones-cart .phones-cart__intro {
    margin-block-end: 1.75rem;
}

.phones-cart .phones-cart__title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
}

.phones-cart .phones-cart__lead {
    max-width: 44rem;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-lifted);
}

.phones-cart .phones-cart__alert {
    margin-block-end: 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--error);
    border-radius: var(--rounding-md);
    background: color-mix(in srgb, var(--error) 8%, var(--bg));
    color: var(--error-accented);
}

.phones-cart .phones-cart__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
    margin-block-end: 2.5rem;
}

.phones-cart .phones-cart__empty {
    margin: 0;
    color: var(--text-muted);
}

.phones-cart .phones-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 1px solid var(--border-muted);
    border-radius: var(--rounding-lg);
    background: var(--bg);
}

.phones-cart .phones-card[hidden] {
    display: none;
}

.phones-cart .phones-card__name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.phones-cart .phones-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
}

.phones-cart .phones-card__amount {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.phones-cart .phones-card__cycle {
    color: var(--text-muted);
}

.phones-cart .phones-card__chip {
    align-self: flex-start;
    margin: 0;
    padding: 0.2rem 0.65rem;
    border-radius: var(--pe-radius-full);
    background: var(--bg-lifted);
    color: var(--text-lifted);
    font-size: 0.85rem;
    font-weight: 600;
}

.phones-cart .phones-card__chip[data-state="free"] {
    background: color-mix(in srgb, var(--success) 12%, var(--bg));
    color: var(--success-accented);
}

.phones-cart .phones-card__chip[data-state="soldout"] {
    background: var(--bg-accented);
    color: var(--text-accented);
}

.phones-cart .phones-card__chip[data-state="unknown"] {
    background: color-mix(in srgb, var(--warning) 10%, var(--bg));   /* --warning-accented on it: 4.61:1 */
    color: var(--warning-accented);
}

/* Key facts under the chip: a plain bullet list; its first item is the live spec line the script fills. */
.phones-cart .phones-card__facts {
    margin: 0;
    padding-inline-start: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-lifted);
}

.phones-cart .phones-card__facts li::marker {
    color: var(--text-muted);
}

.phones-cart .phones-card__spec {
    font-weight: 500;
    color: var(--text);
}

.phones-cart .phones-card__spec[hidden] {
    display: none;
}

.phones-cart .phones-card__rent {
    margin-block-start: auto;
    padding: 0.7rem 1rem;
    border-radius: var(--rounding-md);
    background: var(--primary);
    color: var(--text-inverted);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.phones-cart .phones-card__rent:hover {
    background: var(--primary-lifted);
    color: var(--text-inverted);
    text-decoration: none;
}

.phones-cart .phones-card__rent:focus-visible {
    outline: 2px solid var(--bg-inverted);
    outline-offset: 2px;
}

.phones-cart .phones-card__rent.is-disabled {
    background: var(--bg-accented);
    color: var(--text-muted);
    pointer-events: none;   /* the script also blocks a click or Enter on aria-disabled */
}

.phones-cart .phones-card__trial {
    align-self: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-accented);
}

.phones-cart .phones-cart__section-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.phones-cart .phones-cart__how {
    margin-block-end: 2.5rem;
}

.phones-cart .phones-cart__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding-inline-start: 1.25rem;
}

.phones-cart .phones-cart__steps li {
    line-height: 1.55;
    color: var(--text-lifted);
}

.phones-cart .phones-cart__steps strong {
    display: block;
    color: var(--text);
}

.phones-cart .phones-cart__faq-item {
    border-block-end: 1px solid var(--border-muted);
    padding-block: 0.85rem;
}

.phones-cart .phones-cart__faq-item summary {
    cursor: pointer;
    font-weight: 600;
}

.phones-cart .phones-cart__faq-item p {
    margin: 0.6rem 0 0;
    line-height: 1.6;
    color: var(--text-lifted);
}

.phones-cart .phones-cart__faq-item a {
    color: var(--primary-accented);
}

/* Without JavaScript the live chip would say "Checking availability…" forever: the noscript chip speaks instead. */
@media (scripting: none) {
    .phones-cart .phones-card__chip[data-phones-chip] {
        display: none;
    }
}

@media (max-width: 600px) {
    .phones-cart {
        padding-block: 1.25rem 2rem;
    }

    .phones-cart .phones-cart__title {
        font-size: 1.6rem;
    }

    .phones-cart .phones-cart__steps {
        grid-template-columns: 1fr;
    }
}
