/* ── Reset ───────────────────────────────────────────────────────── */
 
body.appify-checkout-active .woocommerce-checkout {
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--ap-bg);
}
 
body.appify-checkout-active .woocommerce-checkout h3,
body.appify-checkout-active .woocommerce-checkout h2,
body.appify-checkout-active .woocommerce-checkout .woocommerce-checkout-coupon,
body.appify-checkout-active .woocommerce-checkout .woocommerce-checkout-login,
body.appify-checkout-active .woocommerce-info {
    display: none !important;
}
 
/* ── Root container ──────────────────────────────────────────────── */
 
.appify-co-root {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(var(--ap-bar-h) + var(--ap-safe));
    overflow: hidden;
    background: var(--ap-bg);
    z-index: 40;
}
 
.admin-bar .appify-co-root { top: 32px; }
 
@media screen and (max-width: 782px) {
    .admin-bar .appify-co-root { top: 46px; }
}
 
/* ── Schermate ───────────────────────────────────────────────────── */
 
.appify-co-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--ap-bg);
    transform: translateX(100%);
    transition: transform .28s var(--ap-ease);
    overflow: hidden;
}
 
.appify-co-screen.is-active {
    transform: translateX(0);
}
 
.appify-co-screen.is-leaving-left {
    transform: translateX(-30%);
    transition: transform .28s var(--ap-ease);
}
 
.appify-co-screen.is-leaving-right {
    transform: translateX(100%);
    transition: transform .28s var(--ap-ease);
}
 
.appify-co-screen.is-entering-right {
    transform: translateX(100%);
    transition: none;
}
 
.appify-co-screen.is-entering-left {
    transform: translateX(-30%);
    transition: none;
}
 
/* ── Header ──────────────────────────────────────────────────────── */
 
.appify-co-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: calc(12px + var(--ap-safe-top)) 16px 12px;
    background: var(--ap-accent);
    flex-shrink: 0;
    min-height: 48px;
}
 
.appify-co-header-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
 
.appify-co-header-icon svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255,255,255,.85);
}
 
.appify-co-back-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: transform .08s ease-out;
    flex-shrink: 0;
}
 
.appify-co-back-btn:active { transform: scale(.88); }
 
.appify-co-back-btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}
 
.appify-co-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}
 
.appify-co-step-counter {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,.55);
    flex-shrink: 0;
}
 
/* ── Body ────────────────────────────────────────────────────────── */
 
.appify-co-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
}
 
/* ── Footer navigazione ──────────────────────────────────────────── */
 
.appify-co-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--ap-bg);
    border-top: 1px solid var(--ap-separator);
}
 
.appify-co-next-btn {
    display: block;
    width: 100%;
    height: 46px;
    background: var(--ap-accent);
    color: #fff;
    border: none;
    border-radius: var(--ap-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    font-family: inherit;
    transition: transform .08s var(--ap-ease), opacity .12s;
}
 
.appify-co-next-btn:active { transform: scale(.98); opacity: .85; }
 
/* ── Titolo sezione ──────────────────────────────────────────────── */
 
.appify-co-section-title {
    font-size: 12px;
    color: var(--ap-muted);
    padding: 12px 16px 4px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
 
/* ── Campi nelle schermate ───────────────────────────────────────── */
 
.appify-co-fields p.form-row {
    margin: 0 !important;
    padding: 5px 16px !important;
    float: none !important;
    width: 100% !important;
    border-bottom: 1px solid var(--ap-separator);
    box-sizing: border-box;
    background: #ffffff;
}
 
.appify-co-fields p.form-row:last-child { border-bottom: none; }
 
.appify-co-fields .form-row-first,
.appify-co-fields .form-row-last {
    float: none !important;
    width: 100% !important;
}
 
.appify-co-fields label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--ap-muted);
    margin: 0 0 2px !important;
    padding: 0 !important;
    text-transform: none;
    letter-spacing: 0;
}
 
.appify-co-fields label .required { color: #c62828; }
 
.appify-co-fields input.input-text,
.appify-co-fields select,
.appify-co-fields textarea {
    width: 100% !important;
    height: 26px !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    color: var(--ap-text) !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    outline: none !important;
    font-family: inherit !important;
    line-height: 26px !important;
}
 
.appify-co-fields textarea {
    height: auto !important;
    min-height: 48px !important;
    resize: none;
    line-height: 1.4 !important;
}
 
.appify-co-fields .woocommerce-input-wrapper { display: block; width: 100%; }
 
.appify-co-fields .woocommerce-additional-fields { display: none !important; }
 
.appify-co-body h2,
.appify-co-body h3 { display: none !important; }
 
/* ── Riepilogo ordine ────────────────────────────────────────────── */
 
.appify-co-review {
    background: #ffffff;
    border-top: 1px solid var(--ap-separator);
    border-bottom: 1px solid var(--ap-separator);
}
 
.appify-co-review-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ap-separator);
}
 
.appify-co-review-thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--ap-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
 
.appify-co-review-name {
    flex: 1;
    font-size: 14px;
    color: var(--ap-text);
    display: flex;
    align-items: baseline;
    gap: 5px;
}
 
.appify-co-review-qty {
    font-size: 12px;
    color: var(--ap-muted);
}
 
.appify-co-review-price {
    font-size: 14px;
    font-weight: 500;
    color: var(--ap-text);
    flex-shrink: 0;
}
 
.appify-co-review-totals {
    padding: 0;
}
 
.appify-co-review-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--ap-muted);
    border-bottom: 1px solid var(--ap-separator);
}
 
.appify-co-review-row:last-child { border-bottom: none; }
 
.appify-co-review-row--total {
    font-size: 15px;
    font-weight: 700;
    color: var(--ap-text);
}
 
.appify-co-review-totals table.shipping { width: 100%; }
.appify-co-review-totals table.shipping th,
.appify-co-review-totals table.shipping td {
    padding: 9px 16px;
    font-size: 13px;
    color: var(--ap-muted);
    font-weight: 400;
    border: none;
    border-bottom: 1px solid var(--ap-separator);
    background: transparent;
}
 
/* ── Pagamento ───────────────────────────────────────────────────── */
 
body.appify-checkout-active #payment {
    background: #ffffff;
    border-top: 1px solid var(--ap-separator);
    border-bottom: 1px solid var(--ap-separator);
    padding: 0 16px 16px;
    border-radius: 0;
    margin-top: 12px;
}
 
body.appify-checkout-active #payment ul.payment_methods {
    border: none; padding: 0; margin: 0;
}
 
body.appify-checkout-active #payment ul.payment_methods li {
    border-bottom: 1px solid var(--ap-separator);
    margin: 0; padding: 13px 0; background: transparent;
}
 
body.appify-checkout-active #payment ul.payment_methods li:last-child { border-bottom: none; }
 
body.appify-checkout-active #payment ul.payment_methods li label {
    font-size: 15px; font-weight: 400; color: var(--ap-text);
    cursor: pointer; margin: 0; text-transform: none; font-family: inherit;
}
 
body.appify-checkout-active #payment .payment_box {
    background: transparent; padding: 8px 0 0; margin: 0;
    font-size: 13px; color: var(--ap-muted);
}
 
body.appify-checkout-active #payment .payment_box::before { display: none; }
 
/* ── Bottone conferma ordine ─────────────────────────────────────── */
 
body.appify-checkout-active #place_order {
    display: block; width: 100%; height: 46px;
    background: var(--ap-accent); color: #fff;
    border: none; border-radius: var(--ap-radius);
    font-size: 15px; font-weight: 600; cursor: pointer;
    -webkit-appearance: none; margin-top: 14px; font-family: inherit;
    transition: transform .08s var(--ap-ease), opacity .12s;
}
 
body.appify-checkout-active #place_order:active { transform: scale(.98); opacity: .85; }
 
/* ── Termini ─────────────────────────────────────────────────────── */
 
body.appify-checkout-active .woocommerce-terms-and-conditions-wrapper {
    font-size: 13px; color: var(--ap-muted); margin-top: 10px;
}
 
body.appify-checkout-active .woocommerce-terms-and-conditions-wrapper a { color: var(--ap-accent); }
 
/* ── Messaggi ────────────────────────────────────────────────────── */
 
body.appify-checkout-active .woocommerce-error {
    margin: 0 0 12px; border-left: none; padding: 10px 14px;
    font-size: 14px; background: #fff2f2; border: 1px solid #ffcdd2;
    color: #c62828; list-style: none; border-radius: var(--ap-radius-sm);
}
 
body.appify-checkout-active .woocommerce-message {
    margin: 0 0 12px; border-left: none; padding: 10px 14px;
    font-size: 14px; background: #fff8e1; border: 1px solid #ffe082;
    color: var(--ap-text); border-radius: var(--ap-radius-sm);
}
 
/* ── Dark mode ───────────────────────────────────────────────────── */
 
body.appify-dark .appify-co-screen { background: #111111; }
body.appify-dark .appify-co-footer { background: #111111; border-top-color: #2c2c2e; }
body.appify-dark #payment { background: #1c1c1e; }
body.appify-dark .appify-co-fields p.form-row { background: #1c1c1e; }
body.appify-dark .appify-co-review { background: #1c1c1e; border-color: #2c2c2e; }
body.appify-dark .appify-co-review-item { border-bottom-color: #2c2c2e; }
body.appify-dark .appify-co-review-row { border-bottom-color: #2c2c2e; }
body.appify-dark .appify-co-review-totals table.shipping th,
body.appify-dark .appify-co-review-totals table.shipping td { border-bottom-color: #2c2c2e; }