/* =====================================================
   LUMIX — Single-Screen Order (nexus_cart)
   SparkedHost-style configurator in Lumix brand.
   Scoped under #order-standard_cart.lx-order so it never
   bleeds into the rest of the order form.
   ===================================================== */

#order-standard_cart.lx-order {
    --lx-red: #FF4C4C;
    --lx-red-hover: #E03E3E;
    --lx-red-subtle: rgba(255, 76, 76, 0.08);
    --lx-red-glow: rgba(255, 76, 76, 0.15);
    --lx-bg: #0E0E10;
    --lx-card: #141416;
    --lx-elevated: #1A1A1E;
    --lx-input: #1E1E22;
    --lx-border: #2A2A2E;
    --lx-border-lift: #3A3A40;
    --lx-text: #E8E8ED;
    --lx-text-2: #B0B0BA;
    --lx-text-muted: #6B6B75;
    --lx-success: #22C55E;
    --lx-radius: 6px;

    color: var(--lx-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 0 !important;
    /* The base order-form CSS sets overflow:hidden here, which disables
       position:sticky on the summary. Re-enable it. */
    overflow: visible !important;
}

/* Widen the page container so the order spans the screen like the rest of the
   marketing site. Scoped to the products/listing page body class so it never
   affects other pages. Applies to every service group, not just FiveM. */
body.lumix-page-products section#main-body .container {
    max-width: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(24px, 3.5vw, 80px) !important;
    padding-right: clamp(24px, 3.5vw, 80px) !important;
}

/* Flat, even page surface (no decorative gradients/grid) so the order screen
   matches the rest of the portal. */
body.lumix-page-products section#main-body {
    background: #0E0E10 !important;
}
body.lumix-page-products #order-standard_cart.lx-order { background: transparent !important; }

.lx-order *, .lx-order *::before, .lx-order *::after { box-sizing: border-box; }

.lx-order__header { margin-bottom: 1.75rem; }
.lx-order__title { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.4rem; color: var(--lx-text); }
.lx-order__subtitle { font-size: 0.9rem; color: var(--lx-text-muted); margin: 0; max-width: 70ch; }

/* Shell */
.lx-order__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 992px) { .lx-order__grid { grid-template-columns: minmax(0, 1fr); } }

/* Steps */
.lx-step { margin-bottom: 2.25rem; }
.lx-step__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.lx-step__num {
    flex: 0 0 1.5rem; width: 1.5rem; height: 1.5rem;
    display: grid; place-items: center;
    font-size: 0.8rem; font-weight: 700;
    color: var(--lx-red); background: var(--lx-red-subtle);
    border: 1px solid var(--lx-red); border-radius: 3px;
}
.lx-step__title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; color: var(--lx-text); }

/* Card grids */
.lx-cards { display: grid; gap: 0.75rem; }
.lx-cards--plans     { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lx-cards--cycles    { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.lx-cards--locations { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* The order form runs the iCheck plugin, which wraps radios in a visible blue
   square. Hide it — the card border + check indicate selection instead. */
#order-standard_cart.lx-order .iradio_square-blue,
#order-standard_cart.lx-order .icheckbox_square-blue { display: none !important; }

/* Selectable card */
.lx-card {
    position: relative; display: block; cursor: pointer;
    background: var(--lx-card); border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius); padding: 1rem;
    transition: border-color 0.15s ease, background 0.15s ease;
    user-select: none; margin: 0;
}
.lx-card:hover { border-color: var(--lx-border-lift); background: var(--lx-elevated); }
.lx-card__input { position: absolute; opacity: 0; pointer-events: none; }
.lx-card.is-selected {
    border-color: var(--lx-red);
    background: linear-gradient(180deg, var(--lx-red-subtle), transparent 60%);
    box-shadow: 0 0 0 1px var(--lx-red) inset;
}
.lx-card.is-disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }
.lx-card__check {
    position: absolute; top: 0.7rem; right: 0.7rem;
    width: 1.1rem; height: 1.1rem; border-radius: 50%;
    border: 1px solid var(--lx-border-lift); display: grid; place-items: center;
    font-size: 0.6rem; color: transparent; transition: all 0.15s ease;
}
.lx-card.is-selected .lx-card__check { background: var(--lx-red); border-color: var(--lx-red); color: #fff; }

/* Plan card */
.lx-plan__name {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--lx-text-2);
}
.lx-plan__price { display: flex; align-items: baseline; gap: 0.15rem; margin: 0.45rem 0 0.5rem; }
.lx-plan__price .amt { font-size: 1.55rem; font-weight: 800; color: var(--lx-text); letter-spacing: -0.02em; }
.lx-plan__price .per { font-size: 0.7rem; color: var(--lx-text-muted); }
.lx-plan__stock { font-size: 0.66rem; color: var(--lx-success); margin-bottom: 0.4rem; }
.lx-plan__stock.is-out { color: var(--lx-red); }

.lx-plan__specs {
    font-size: 0.76rem; line-height: 1.55; color: var(--lx-text-2);
    border-top: 1px solid var(--lx-border); margin-top: 0.6rem; padding-top: 0.6rem;
}
.lx-plan__specs p { margin: 0 0 0.3rem; }
.lx-plan__specs ul { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.25rem; }
.lx-plan__specs li { display: flex; gap: 0.4rem; align-items: baseline; }
.lx-plan__specs .feature-value { color: var(--lx-text); font-family: 'JetBrains Mono', monospace; font-weight: 600; min-width: 1.5rem; }
.lx-plan__specs b, .lx-plan__specs strong { color: var(--lx-text); font-family: 'JetBrains Mono', monospace; font-weight: 600; }

/* Location card — horizontal: radio on the left, name + badge and a
   latency/note line, country flag fading in from the card's right edge. */
.lx-location {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1.5rem 1.1rem; min-height: 6.75rem; overflow: hidden;
}
.lx-location .lx-card__check { position: static; flex: 0 0 1.1rem; }
.lx-location__body { position: relative; z-index: 1; display: grid; gap: 0.3rem; min-width: 0; }
.lx-location__top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lx-location__name { font-size: 1.15rem; font-weight: 700; color: var(--lx-text); letter-spacing: -0.01em; }
.lx-location__meta { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; }
.lx-location__ping {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-family: 'JetBrains Mono', monospace; font-weight: 600;
}
.lx-location__ping.is-good { color: var(--lx-success); }
.lx-location__ping.is-ok   { color: #E8B341; }
.lx-location__ping.is-far  { color: var(--lx-red); }
.lx-location__note { color: var(--lx-text-muted); }

.lx-badge--rec {
    background: rgba(232, 179, 65, 0.12); color: #E8B341;
    border: 1px solid rgba(232, 179, 65, 0.4);
}

/* Flag artwork, masked so it dissolves toward the card body */
.lx-location__flag {
    position: absolute; top: 0; right: 0; bottom: 0; width: 42%;
    pointer-events: none; opacity: 0.35;
    background-position: right center; background-size: 100% 100%; background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to left, #000 35%, transparent);
            mask-image: linear-gradient(to left, #000 35%, transparent);
}
.lx-location__flag--us { background-image: url("../img/flag-us.png"); }

/* [hidden] must always win over the display rules above (ping + badge) */
.lx-order [hidden] { display: none !important; }

/* Cycle card */
.lx-cycle { text-align: center; padding: 1rem 0.85rem; }
.lx-cycle__name { display: block; font-size: 0.9rem; font-weight: 600; color: var(--lx-text); }
.lx-cycle__price { display: block; font-size: 0.8rem; color: var(--lx-text-muted); margin-top: 0.25rem; }
.lx-cycle__save { display: block; margin-top: 0.5rem; }

/* Badges */
.lx-badge {
    display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 0.15rem 0.45rem; border-radius: 3px;
    background: var(--lx-red); color: #fff;
}
.lx-badge--save { background: var(--lx-success); }
.lx-badge--ribbon { position: absolute; top: -0.6rem; left: 1rem; }

/* Summary rail */
.lx-summary {
    position: sticky; top: 24px;
    background: var(--lx-card); border: 1px solid var(--lx-border);
    border-radius: var(--lx-radius); padding: 1.25rem;
}
.lx-summary__title {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--lx-text-muted); margin: 0 0 0.9rem;
}
.lx-summary__lines { list-style: none; margin: 0; padding: 0 0 0.9rem; border-bottom: 1px solid var(--lx-border); }
.lx-summary__line { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; padding: 0.28rem 0; }
.lx-summary__line .k { color: var(--lx-text-muted); }
.lx-summary__line .v { color: var(--lx-text); font-family: 'JetBrains Mono', monospace; }
.lx-summary__empty { font-size: 0.78rem; color: var(--lx-text-muted); padding: 0.4rem 0; }
.lx-summary__total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 0.9rem; }
.lx-summary__total .k { font-size: 0.85rem; font-weight: 700; color: var(--lx-text); }
.lx-summary__total .v { font-size: 1.5rem; font-weight: 800; color: var(--lx-text); font-family: 'JetBrains Mono', monospace; }
.lx-summary__cycle-note { font-size: 0.68rem; color: var(--lx-text-muted); text-align: right; margin-top: 0.15rem; min-height: 0.9rem; }

.lx-summary__cta {
    width: 100%; margin-top: 1.1rem; padding: 0.8rem 1rem;
    font-size: 0.9rem; font-weight: 700; color: #fff;
    background: var(--lx-red); border: none; border-radius: var(--lx-radius);
    cursor: pointer; transition: background 0.15s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.lx-summary__cta:hover { background: var(--lx-red-hover); color: #fff; text-decoration: none; }
.lx-summary__cta.is-disabled { background: #3A3A40; cursor: not-allowed; pointer-events: none; }

.lx-summary__included { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.lx-summary__included li { font-size: 0.72rem; color: var(--lx-text-muted); display: flex; align-items: center; gap: 0.4rem; }
.lx-summary__included i { color: var(--lx-success); font-size: 0.7rem; }

/* Mobile: summary becomes a bottom bar */
@media (max-width: 992px) {
    .lx-summary {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        border-radius: 0; border-left: none; border-right: none; border-bottom: none;
        z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem;
    }
    .lx-summary__title, .lx-summary__lines, .lx-summary__included, .lx-summary__cycle-note { display: none; }
    .lx-summary__total { margin: 0; flex-direction: column; align-items: flex-start; gap: 0; }
    .lx-summary__total .v { font-size: 1.15rem; }
    .lx-summary__cta { width: auto; margin: 0; padding: 0.7rem 1.4rem; }
    .lx-order { padding-bottom: 6rem !important; }
}
