/* VexpoCMS — Chekcout Ecommerce */
/* ═══ vex_ecommerce_checkout ═══ */
.chk { padding: clamp(1.5rem,5vw,3rem) 0; color: var(--vx-text); background: var(--vx-bg-body); }
.chk-wrap { max-width: 1050px; margin: 0 auto; padding: 0 var(--vx-pad-x); }

.chk-loading, .chk-empty { text-align: center; padding: 4rem 1rem; color: var(--vx-text-3); }
.chk-empty p { font-size: 1.1rem; margin-bottom: 1.2rem; }

.chk-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--vx-gap);
    align-items: start;
}
.chk-title { font-size: clamp(1.5rem,4vw,2.1rem); font-weight: 700; margin: 0 0 1.5rem; }

/* blocchi form */
.chk-block {
    background: var(--vx-bg-card);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    padding: 1.4rem;
    margin-bottom: var(--vx-gap);
}
.chk-block-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 1.2rem;
}
.chk-num {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--vx-primary); color: var(--vx-text-inv);
    border-radius: 50%; font-size: .85rem; font-weight: 700;
    flex-shrink: 0;
}

.chk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chk-field-full { grid-column: 1 / -1; }
.chk-label {
    display: block; font-size: .82rem; font-weight: 600;
    margin-bottom: .4rem; color: var(--vx-text-2);
}

/* opzioni radio (spedizione/pagamento) */
.chk-options { display: flex; flex-direction: column; gap: .6rem; }
.chk-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--vx-border);
    border-radius: var(--vx-radius-sm);
    cursor: pointer;
    transition: border-color var(--vx-transition), background var(--vx-transition);
}
.chk-opt:hover { background: var(--vx-bg-hover); }
.chk-opt.sel { border-color: var(--vx-primary); background: var(--vx-primary-light); }
.chk-opt input { position: absolute; opacity: 0; }
.chk-opt-icon { color: var(--vx-text-2); flex-shrink: 0; display: flex; }
.chk-opt.sel .chk-opt-icon { color: var(--vx-primary); }
.chk-opt-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.chk-opt-name { font-weight: 600; font-size: .92rem; }
.chk-opt-eta { font-size: .78rem; color: var(--vx-text-3); }
.chk-opt-price { font-weight: 700; font-size: .95rem; }
.chk-none { color: var(--vx-text-3); font-size: .9rem; padding: .5rem 0; }

/* riepilogo */
.chk-summary {
    background: var(--vx-bg-card);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    padding: 1.4rem;
    position: sticky; top: 1rem;
}
.chk-summary-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 1rem; }
.chk-items { margin-bottom: 1rem; max-height: 320px; overflow-y: auto; }
.chk-item {
    display: flex; align-items: center; gap: 10px;
    padding: .6rem 0; border-bottom: 1px solid var(--vx-border);
}
.chk-item-img {
    width: 44px; height: 44px; flex-shrink: 0;
    object-fit: cover; border-radius: var(--vx-radius-sm);
    background: var(--vx-bg-hover);
}
.chk-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chk-item-name { font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-item-qty { font-size: .78rem; color: var(--vx-text-3); }
.chk-item-price { font-size: .9rem; font-weight: 600; white-space: nowrap; }

.chk-totals { border-top: 1px solid var(--vx-border); padding-top: .8rem; margin-bottom: 1rem; }
.chk-total-row {
    display: flex; justify-content: space-between;
    padding: .35rem 0; font-size: .92rem; color: var(--vx-text-2);
}
.chk-total-grand {
    border-top: 1px solid var(--vx-border);
    margin-top: .4rem; padding-top: .7rem;
    font-size: 1.1rem; color: var(--vx-text);
}
.chk-total-grand strong { font-size: 1.35rem; }

.chk-pay-instructions {
    background: var(--vx-bg-hover);
    border-radius: var(--vx-radius-sm);
    padding: .9rem 1rem;
    font-size: .82rem;
    color: var(--vx-text-2);
    line-height: 1.5;
    margin-bottom: 1rem;
    border-left: 3px solid var(--vx-accent);
}

.chk-terms {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: .82rem; color: var(--vx-text-2);
    margin-bottom: 1rem; cursor: pointer;
}
.chk-terms input { margin-top: 2px; flex-shrink: 0; }

.chk-place { width: 100%; padding: 14px; font-size: .95rem; }

/* pagina grazie */
.chk-thankyou { text-align: center; padding: 3rem 1rem; max-width: 560px; margin: 0 auto; }
.chk-ty-icon { color: var(--vx-success); margin-bottom: 1rem; display: flex; justify-content: center; }
.chk-ty-title { font-size: 1.8rem; font-weight: 700; margin: 0 0 .8rem; }
.chk-ty-text { color: var(--vx-text-2); margin-bottom: 1.2rem; line-height: 1.5; }
.chk-ty-number { font-size: 1.05rem; margin-bottom: 1.5rem; }
.chk-ty-number strong { color: var(--vx-primary); font-size: 1.2rem; }
.chk-ty-pay {
    background: var(--vx-bg-hover);
    border-radius: var(--vx-radius-sm);
    padding: 1rem 1.2rem;
    font-size: .88rem;
    color: var(--vx-text-2);
    text-align: left;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    border-left: 3px solid var(--vx-accent);
}

/* popup */
.chk-pop-overlay {
    position: fixed; inset: 0;
    background: var(--vx-overlay);
    display: none; align-items: center; justify-content: center;
    z-index: 2000; padding: 20px;
}
.chk-pop-overlay.open { display: flex; }
.chk-pop {
    background: var(--vx-bg-card);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius);
    max-width: 400px; width: 100%;
    padding: 1.6rem; text-align: center;
    box-shadow: var(--vx-shadow-lg);
}
.chk-pop-text { font-size: 1rem; margin: 0 0 1.4rem; line-height: 1.5; }

/* responsive */
@media (max-width: 860px) {
    .chk-layout { grid-template-columns: 1fr; }
    .chk-summary { position: static; }
}
@media (max-width: 480px) {
    .chk-grid { grid-template-columns: 1fr; }
}
/* ═══ scelta modalità (3 bottoni) ═══ */
.chk-modepick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: var(--vx-gap);
}
.chk-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    background: var(--vx-bg-card);
    border: 2px solid var(--vx-border);
    border-radius: var(--vx-radius);
    cursor: pointer;
    transition: border-color var(--vx-transition), background var(--vx-transition);
    text-align: center;
}
.chk-mode:hover { border-color: var(--vx-primary); background: var(--vx-primary-light); }
.chk-mode svg { color: var(--vx-text-2); }
.chk-mode-t { font-size: .9rem; font-weight: 700; }
.chk-mode-s { font-size: .72rem; color: var(--vx-text-3); }

/* icona sacchetto sotto i bottoni (finché non scegli) */
.chk-modehint {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(2rem, 8vw, 4rem) 0;
    pointer-events: none;
}
.chk-modehint svg {
    width: clamp(90px, 22vw, 150px);
    height: auto;
    color: var(--vx-text-3);
    opacity: .12;
}

/* barra modalità attiva */
.chk-modebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--vx-primary-light);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-sm);
    margin-bottom: var(--vx-gap);
    font-size: .85rem;
    font-weight: 600;
}
.chk-modechange {
    background: none;
    border: none;
    color: var(--vx-primary);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* blocchi compatti */
.chk-compact { padding: 1rem 1.1rem; margin-bottom: 14px; }
.chk-compact .chk-block-title { font-size: .95rem; margin-bottom: .8rem; }
.chk-compact .chk-grid { gap: .6rem; }
.chk-compact .chk-field { margin-bottom: 0; }
.chk-compact .chk-label { font-size: .74rem; margin-bottom: .25rem; }

/* input small */
.vx-sm {
    padding: 8px 11px !important;
    font-size: 13px !important;
    height: auto;
}
.vx-btn-sm { padding: 9px 18px; font-size: .82rem; }

/* chip privato/azienda */
.chk-regkind { display: flex; gap: 6px; margin-bottom: 12px; }
.chk-chip {
    padding: 6px 16px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--vx-border);
    background: var(--vx-bg-card);
    color: var(--vx-text-2);
    border-radius: var(--vx-radius-round);
    cursor: pointer;
    transition: all var(--vx-transition);
}
.chk-chip.is-on { background: var(--vx-primary); color: var(--vx-text-inv); border-color: var(--vx-primary); }

.chk-login-msg { display: block; font-size: .78rem; color: var(--vx-danger); margin-top: 8px; }

/* link password dimenticata */
.chk-forgot-link {
    display: inline-block;
    margin-top: 10px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--vx-primary);
    text-decoration: none;
    transition: color var(--vx-transition);
}
.chk-forgot-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
    .chk-modepick { grid-template-columns: 1fr; }
    .chk-mode { flex-direction: row; justify-content: flex-start; text-align: left; }
}
.chk-modebar-l { display: inline-flex; align-items: center; gap: 8px; }
.chk-modebar-l svg { color: var(--vx-primary); }
.chk-modebar-l b { color: var(--vx-primary); }
/* ═══ indirizzi salvati ═══ */
.chk-addr-box { margin-bottom: 14px; }
.chk-addr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    font-weight: 600;
    color: var(--vx-text-2);
    margin-bottom: 8px;
}
.chk-addr-toggle {
    background: none;
    border: none;
    color: var(--vx-primary);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.chk-addr-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}
.chk-addr-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 9px 12px;
    background: var(--vx-bg-card);
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-sm);
    cursor: pointer;
    text-align: left;
    transition: border-color var(--vx-transition), background var(--vx-transition);
}
.chk-addr-card:hover { border-color: var(--vx-primary); background: var(--vx-primary-light); }
.chk-addr-label { font-size: .82rem; font-weight: 700; }
.chk-addr-label em {
    font-style: normal;
    font-size: .68rem;
    color: var(--vx-primary);
    background: var(--vx-primary-light);
    padding: 1px 6px;
    border-radius: var(--vx-radius-round);
    margin-left: 4px;
}
.chk-addr-txt { font-size: .76rem; color: var(--vx-text-3); }
.chk-addr-new {
    padding: 8px 12px;
    background: none;
    border: 1px dashed var(--vx-border);
    border-radius: var(--vx-radius-sm);
    color: var(--vx-text-2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--vx-transition);
}
.chk-addr-new:hover { border-color: var(--vx-primary); color: var(--vx-primary); }
/* ── Timeline stepper (stile food-rider) ── */
.chk-steps {
    display: flex; align-items: flex-start;
    margin: 0 0 20px; padding: 0 4px;
}
.chk-step {
    flex: 1; position: relative;
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; text-align: center;
}
/* connettore tra i pallini */
.chk-step::before {
    content: ""; position: absolute;
    top: 19px; left: -50%; width: 100%; height: 3px;
    background: var(--vx-border); z-index: 0;
    transition: background .3s ease;
}
.chk-step:first-child::before { display: none; }
.chk-step.done::before { background: var(--vx-primary); }

.chk-step-dot {
    position: relative; z-index: 1;
    width: 40px; height: 40px; border-radius: var(--vx-radius-round);
    display: flex; align-items: center; justify-content: center;
    background: var(--vx-bg-card); border: 3px solid var(--vx-border);
    color: var(--vx-text-3);
    transition: background .3s ease, border-color .3s ease, color .3s ease, transform .2s ease;
}
.chk-step-dot svg { width: 18px; height: 18px; }
.chk-step-lbl {
    font-size: .74rem; color: var(--vx-text-3); font-weight: 600;
    transition: color .3s ease;
    max-width: 84px; line-height: 1.2;
}
/* step già completati */
.chk-step.done .chk-step-dot {
    background: var(--vx-primary); border-color: var(--vx-primary); color: var(--vx-text-inv);
}
.chk-step.done .chk-step-lbl { color: var(--vx-text-2); }
/* step corrente (pulsa un pelo) */
.chk-step.active .chk-step-dot {
    border-color: var(--vx-primary); color: var(--vx-primary);
    transform: scale(1.12);
    box-shadow: 0 0 0 4px var(--vx-overlay);
}
.chk-step.active .chk-step-lbl { color: var(--vx-primary); }

/* ── Tasto torna al carrello ── */
.chk-back-cart {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0 0 16px; padding: 6px 12px;
    font-size: .85rem; font-weight: 600;
    color: var(--vx-text-2); text-decoration: none;
    border: 1px solid var(--vx-border); border-radius: var(--vx-radius-sm);
    background: var(--vx-bg-card); transition: background .15s, color .15s;
}
.chk-back-cart:hover { background: var(--vx-bg-hover); color: var(--vx-text); }

@media (max-width: 560px) {
    .chk-step-lbl { font-size: 0; }          /* su mobile solo icone */
    .chk-step-dot { width: 36px; height: 36px; }
    .chk-step::before { top: 17px; }
}