/* =========================================================
   StorVault Theme — WooCommerce Checkout Styles
   Full-width rental checkout: order summary + payment only.
   ========================================================= */

/* ── Base typography ─────────────────────────────────────── */
.woocommerce,
.woocommerce-page {
    font-family: var(--svt-font-body);
    color: var(--svt-text);
}

/* ── Checkout page wrapper ───────────────────────────────── */
.woocommerce-checkout .woocommerce {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ── Step progress bar ───────────────────────────────────── */
.sv-checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto 36px;
    max-width: 680px;
    padding: 0 20px;
    font-family: var(--svt-font-body);
}
.sv-checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    z-index: 1;
}
.sv-checkout-step::before {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(-50% + 18px);
    right: calc(50% + 18px);
    height: 2px;
    background: var(--svt-border);
    z-index: -1;
}
.sv-checkout-step:first-child::before { display: none; }
.sv-checkout-step--done::before  { background: #22c55e; }
.sv-checkout-step--active::before { background: var(--svt-primary); }

.sv-checkout-step__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: #e5e7eb;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}
.sv-checkout-step--done .sv-checkout-step__num {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}
.sv-checkout-step--active .sv-checkout-step__num {
    background: var(--svt-primary);
    color: #fff;
    border-color: var(--svt-primary);
    box-shadow: 0 0 0 4px rgba(19,47,76,.15);
}
.sv-checkout-step__label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
}
.sv-checkout-step--done .sv-checkout-step__label   { color: #22c55e; }
.sv-checkout-step--active .sv-checkout-step__label { color: var(--svt-primary); }

/* ── Hide billing section completely ─────────────────────── */
/* The hidden billing fields (name + email) are auto-filled from the user
   account — WooCommerce still receives them but the user never sees them. */
#customer_details,
.woocommerce-billing-fields,
.woocommerce-billing-fields h3,
.sv-hidden-billing,
.woocommerce-checkout #order_review_heading {
    display: none !important;
}

/* ── Layout: single full-width column ────────────────────── */
.woocommerce-checkout .col2-set {
    display: block;
    width: 100%;
    float: none;
    margin-bottom: 0;
}
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100%;
    float: none;
}

/* ── Order summary card ──────────────────────────────────── */
#order_review {
    background: #fff;
    border: 1.5px solid var(--svt-border);
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
#order_review h3 {
    font-family: var(--svt-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--svt-primary);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--svt-border);
}

/* ── Order table ─────────────────────────────────────────── */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin-bottom: 4px;
}
.woocommerce-checkout-review-order-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--svt-border);
}
.woocommerce-checkout-review-order-table tbody td {
    padding: 16px 0;
    border-bottom: 1px solid var(--svt-border);
    vertical-align: middle;
}
.woocommerce-checkout-review-order-table .product-name {
    font-weight: 600;
    color: var(--svt-text);
    font-size: 16px;
}
.woocommerce-checkout-review-order-table .product-name dl,
.woocommerce-checkout-review-order-table .product-name .variation {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    margin: 4px 0 0;
}
.woocommerce-checkout-review-order-table .product-total {
    text-align: right;
    font-weight: 700;
    color: var(--svt-primary);
    font-size: 16px;
}
.woocommerce-checkout-review-order-table tfoot td,
.woocommerce-checkout-review-order-table tfoot th {
    padding: 10px 0;
    font-size: 14px;
    color: #6b7280;
    border-bottom: none;
}
.woocommerce-checkout-review-order-table tfoot .order-total td,
.woocommerce-checkout-review-order-table tfoot .order-total th {
    font-weight: 800;
    font-size: 22px;
    color: var(--svt-primary);
    padding-top: 18px;
    border-top: 2px solid var(--svt-border);
}

/* ── Coupon field ────────────────────────────────────────── */
.woocommerce-form-coupon-toggle,
.woocommerce-form-coupon {
    background: #f9fafb;
    border: 1px solid var(--svt-border);
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}
.woocommerce-form-coupon {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 10px;
}
.woocommerce-form-coupon input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--svt-font-body);
}
.woocommerce-form-coupon .button {
    padding: 10px 20px !important;
    font-size: 14px !important;
}

/* ── Payment section card ────────────────────────────────── */
#payment {
    background: #fff;
    border: 1.5px solid var(--svt-primary);
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
#payment h3,
#payment .wc_payment_methods + h3 {
    font-family: var(--svt-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--svt-primary);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--svt-border);
}

/* Payment method list */
#payment .payment_methods {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#payment .payment_methods li {
    padding: 14px 18px;
    border: 1.5px solid var(--svt-border);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color .18s, background .18s;
    background: #fff;
}
#payment .payment_methods li:has(input:checked) {
    border-color: var(--svt-primary);
    background: rgba(19,47,76,.03);
}
#payment .payment_methods li label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--svt-text);
    margin: 0;
}
#payment .payment_methods li label img {
    max-height: 24px;
    width: auto;
}
#payment .payment_box {
    margin-top: 14px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    color: #6b7280;
    border: 1px solid var(--svt-border);
}

/* ── Place order button ──────────────────────────────────── */
#payment #place_order {
    width: 100%;
    display: block;
    background: var(--svt-accent) !important;
    color: #111 !important;
    border: none !important;
    border-radius: 10px !important;
    font-family: var(--svt-font-heading) !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    padding: 18px !important;
    cursor: pointer;
    transition: background .18s, transform .1s !important;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    letter-spacing: .01em;
}
#payment #place_order:hover {
    background: var(--svt-accent-dk) !important;
    transform: translateY(-1px);
}

/* Other WC buttons */
.woocommerce .button,
.woocommerce-page .button {
    background: var(--svt-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: var(--svt-font-body) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
    cursor: pointer;
    transition: background .18s !important;
    text-decoration: none;
    display: inline-block;
}
.woocommerce .button:hover,
.woocommerce-page .button:hover {
    background: var(--svt-primary-dk) !important;
}

/* ── Privacy / terms text ────────────────────────────────── */
.woocommerce-terms-and-conditions-wrapper,
.woocommerce-privacy-policy-text {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin: 12px 0 0;
    line-height: 1.6;
}

/* ── Notices ─────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    border-radius: 8px;
    font-size: 14px;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    border-top: none !important;
    border-left: 4px solid !important;
}
.woocommerce-message { background: #d1fae5; color: #065f46; border-left-color: #34d399 !important; }
.woocommerce-error   { background: #fee2e2; color: #991b1b; border-left-color: #f87171 !important; }
.woocommerce-info    { background: #dbeafe; color: #1e40af; border-left-color: #60a5fa !important; }

/* ── Thank-you page ──────────────────────────────────────── */
.woocommerce-thankyou-order-details {
    background: #f8fafc;
    border: 1.5px solid var(--svt-border);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    list-style: none;
}
.woocommerce-thankyou-order-details li { font-size: 13px; color: #6b7280; }
.woocommerce-thankyou-order-details strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--svt-primary);
    margin-top: 4px;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .woocommerce-checkout .woocommerce { padding: 0 12px 40px; }
    #order_review, #payment { padding: 20px 16px; }
    .sv-checkout-steps { padding: 0 8px; }
    .sv-checkout-step__label { font-size: 10px; }
    .woocommerce-checkout-review-order-table tfoot .order-total td,
    .woocommerce-checkout-review-order-table tfoot .order-total th { font-size: 18px; }
}
