/* Restaurant V8.1 Inline Checkout */

.restaurant-v7-checkout-frame-wrap {
    height: auto !important;
    min-height: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

.restaurant-v7-checkout-frame-wrap iframe,
iframe[data-restaurant-v7-checkout-frame] {
    display: none !important;
}

.restaurant-v8-checkout-host {
    width: 100%;
    min-height: 280px;
}

.restaurant-v7-cart.restaurant-v8-order-complete .restaurant-v7-cart__steps,
.restaurant-v7-cart.restaurant-v8-order-complete .restaurant-v7-checkout-head,
.restaurant-v7-cart.restaurant-v8-order-complete .restaurant-v7-cart__footer {
    display: none !important;
}

.restaurant-v8-checkout-loading,
.restaurant-v8-empty-checkout,
.restaurant-v8-checkout-error {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 28px;
    border: 1px solid rgba(23, 20, 18, .10);
    border-radius: 28px;
    background: rgba(255, 255, 255, .78);
}

.restaurant-v8-checkout-loading span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 3px solid rgba(23, 20, 18, .14);
    border-top-color: #d92d20;
    animation: restaurantV8Spin .75s linear infinite;
    display: inline-block;
    margin-bottom: 14px;
}

@keyframes restaurantV8Spin {
    to { transform: rotate(360deg); }
}

.restaurant-v8-inline-checkout {
    --restaurant-v8-red: #d92d20;
    --restaurant-v8-text: #171412;
    --restaurant-v8-muted: #776d66;
    --restaurant-v8-border: rgba(23, 20, 18, .11);
    --restaurant-v8-surface: #fff;
    --restaurant-v8-soft: #fff8ef;

    color: var(--restaurant-v8-text);
    font-family: inherit;
    padding-bottom: 78px;
}

.restaurant-v8-inline-checkout .woocommerce {
    margin: 0 !important;
}

.restaurant-v8-inline-checkout .woocommerce-notices-wrapper,
.restaurant-v8-inline-checkout .woocommerce-NoticeGroup {
    margin-bottom: 12px;
}

.restaurant-v8-inline-checkout .woocommerce-error,
.restaurant-v8-inline-checkout .woocommerce-message,
.restaurant-v8-inline-checkout .woocommerce-info {
    margin: 0 0 12px !important;
    padding: 15px 18px !important;
    border: 1px solid var(--restaurant-v8-border) !important;
    border-radius: 22px !important;
    background: #fff !important;
    color: var(--restaurant-v8-text) !important;
    box-shadow: none !important;
}

.restaurant-v8-inline-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
    display: none !important;
    min-height: auto !important;
    line-height: 1.35 !important;
}

.restaurant-v8-inline-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before {
    display: none !important;
}

.restaurant-v8-inline-checkout .woocommerce-form-coupon-toggle a {
    color: var(--restaurant-v8-red) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.restaurant-v8-inline-checkout .checkout_coupon {
    display: none !important;
}

.restaurant-v8-inline-checkout .woocommerce-form-login-toggle,
.restaurant-v8-inline-checkout form.woocommerce-form-login {
    display: none !important;
}

.restaurant-v8-inline-checkout form.checkout {
    display: grid !important;
    gap: 14px !important;
    margin: 0 !important;
    padding-bottom: 96px !important;
}

.restaurant-v8-inline-checkout #wc-stripe-express-checkout-element {
    margin: 0 0 10px !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.restaurant-v8-inline-checkout #wc-stripe-express-checkout-element .StripeElement {
    min-height: 48px !important;
}

.restaurant-v8-inline-checkout #wc-stripe-express-checkout-button-separator {
    margin: 12px 0 18px !important;
    text-align: center !important;
    color: rgba(23, 20, 18, .78) !important;
    font-weight: 700 !important;
}

.restaurant-v8-inline-checkout #customer_details,
.restaurant-v8-inline-checkout #order_review {
    width: 100% !important;
    float: none !important;
}

.restaurant-v8-inline-checkout .col2-set {
    width: 100% !important;
    float: none !important;
    display: grid !important;
    gap: 14px !important;
}

.restaurant-v8-inline-checkout .col2-set .col-1,
.restaurant-v8-inline-checkout .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
}

.restaurant-v8-inline-checkout .woocommerce-billing-fields,
.restaurant-v8-inline-checkout .woocommerce-shipping-fields,
.restaurant-v8-inline-checkout .woocommerce-additional-fields,
.restaurant-v8-inline-checkout #order_review {
    border: 1px solid var(--restaurant-v8-border);
    border-radius: 28px;
    background: var(--restaurant-v8-surface);
    padding: 22px;
}

.restaurant-v8-inline-checkout .woocommerce-shipping-fields:empty,
.restaurant-v8-inline-checkout #customer_details > div.col-2 > div.woocommerce-shipping-fields:empty,
.restaurant-v8-inline-checkout #customer_details > div.col-2 > div.woocommerce-shipping-fields.restaurant-empty-shipping-fields {
    display: none !important;
}

.restaurant-v8-inline-checkout h3,
.restaurant-v8-inline-checkout #order_review_heading {
    margin: 0 0 16px !important;
    font-size: var(--restaurant-v8-font-size-checkout-title, clamp(22px, 2.6vw, 30px)) !important;
    line-height: 1.05 !important;
    letter-spacing: -.04em !important;
    font-weight: var(--restaurant-v8-font-weight-checkout-title, 650) !important;
}

.restaurant-v8-inline-checkout .woocommerce-billing-fields__field-wrapper,
.restaurant-v8-inline-checkout .woocommerce-shipping-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.restaurant-v8-inline-checkout .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.restaurant-v8-inline-checkout .form-row-wide {
    grid-column: 1 / -1;
}

.restaurant-v8-inline-checkout label {
    display: block;
    margin: 0 0 7px;
    font-weight: 700;
    color: var(--restaurant-v8-text);
}

.restaurant-v8-inline-checkout input.input-text,
.restaurant-v8-inline-checkout textarea,
.restaurant-v8-inline-checkout select,
.restaurant-v8-inline-checkout .select2-selection {
    width: 100% !important;
    min-height: 52px !important;
    border: 1px solid rgba(23, 20, 18, .16) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: var(--restaurant-v8-text) !important;
    padding: 13px 15px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.restaurant-v8-inline-checkout textarea {
    min-height: 105px !important;
    resize: vertical;
}

.restaurant-v8-inline-checkout .select2-selection__rendered {
    line-height: 26px !important;
    padding: 0 !important;
}

.restaurant-v8-inline-checkout .select2-selection__arrow {
    height: 50px !important;
}

.restaurant-v8-inline-checkout table.shop_table {
    border: 0 !important;
    margin: 0 !important;
    border-collapse: collapse !important;
}

.restaurant-v8-inline-checkout table.shop_table th,
.restaurant-v8-inline-checkout table.shop_table td {
    border: 0 !important;
    border-bottom: 1px solid rgba(23, 20, 18, .08) !important;
    padding: 12px 0 !important;
    color: var(--restaurant-v8-text);
}

.restaurant-v8-inline-checkout table.shop_table tfoot tr:last-child th,
.restaurant-v8-inline-checkout table.shop_table tfoot tr:last-child td {
    border-bottom: 0 !important;
    font-size: 18px;
}

.restaurant-v8-inline-checkout #payment {
    border: 1px solid var(--restaurant-v8-border) !important;
    border-radius: var(--restaurant-v8-checkout-payment-card-radius, 28px) !important;
    background: var(--restaurant-v8-surface) !important;
    overflow: visible !important;
}

.restaurant-v8-inline-checkout #payment ul.payment_methods {
    display: grid !important;
    gap: 10px !important;
    margin: 0 !important;
    list-style: none !important;
    padding: 18px !important;
    border-bottom: 1px solid rgba(23, 20, 18, .08) !important;
}

.restaurant-v8-inline-checkout #payment ul.payment_methods li {
    position: relative;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid rgba(23, 20, 18, .10) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: var(--restaurant-v8-text) !important;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.restaurant-v8-inline-checkout #payment ul.payment_methods li:has(input:checked) {
    border-color: color-mix(in srgb, var(--restaurant-v8-red) 42%, rgba(23, 20, 18, .10)) !important;
    background: color-mix(in srgb, var(--restaurant-v8-red) 5%, #fff) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--restaurant-v8-red) 10%, transparent);
}

.restaurant-v8-inline-checkout #payment ul.payment_methods li > input {
    width: 18px !important;
    height: 18px !important;
    margin: 2px 10px 0 0 !important;
    accent-color: var(--restaurant-v8-red);
    vertical-align: top;
}

.restaurant-v8-inline-checkout #payment ul.payment_methods li > label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    color: var(--restaurant-v8-text) !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
}

.restaurant-v8-inline-checkout #payment div.payment_box {
    margin: 12px 0 0 !important;
    padding: 12px 14px !important;
    border-radius: 18px !important;
    background: var(--restaurant-v8-soft) !important;
    color: var(--restaurant-v8-text) !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

.restaurant-v8-inline-checkout #payment div.payment_box p {
    margin: 0 !important;
}

.restaurant-v8-inline-checkout #payment div.payment_box::before {
    display: none !important;
}

.restaurant-v8-inline-checkout #payment .place-order {
    position: sticky !important;
    bottom: 0 !important;
    z-index: var(--restaurant-z-sticky, 100) !important;
    margin: 12px -1px -1px !important;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom)) !important;
    border-radius: 0 0 28px 28px !important;
    border-top: 1px solid rgba(23, 20, 18, .10) !important;
    background: rgba(255, 255, 255, .92) !important;
    backdrop-filter: blur(18px);
    box-shadow: 0 -12px 30px rgba(23, 20, 18, .06);
}

.restaurant-v8-inline-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 10px !important;
    color: var(--restaurant-v8-muted);
    font-size: 13px;
    line-height: 1.45;
}

.restaurant-v8-inline-checkout #place_order,
.restaurant-v8-inline-checkout button.button,
.restaurant-v8-inline-checkout .button.alt {
    width: 100% !important;
    min-height: min(var(--restaurant-v8-button-height, 58px), 50px) !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--restaurant-v8-red) !important;
    color: #fff !important;
    font-size: var(--restaurant-v8-button-font-size, 16px) !important;
    font-weight: var(--restaurant-v8-button-font-weight, 700) !important;
    letter-spacing: -.01em !important;
    box-shadow: none !important;
}

.restaurant-v8-inline-checkout #place_order:hover,
.restaurant-v8-inline-checkout button.button:hover,
.restaurant-v8-inline-checkout .button.alt:hover {
    filter: brightness(.96);
}

.restaurant-v8-inline-checkout .blockUI.blockOverlay {
    border-radius: 28px !important;
}

.restaurant-v8-is-processing {
    pointer-events: none;
    opacity: .68;
}

.restaurant-v8-pill {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(217, 45, 32, .10);
    color: #d92d20;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .10em;
    font-size: 12px;
}

.restaurant-v8-thankyou {
    border: 1px solid rgba(23, 20, 18, .10);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(217, 45, 32, .10), transparent 36%),
        #fff;
    padding: 24px;
}

.restaurant-v8-thankyou h3 {
    margin: 14px 0 8px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: .95;
    letter-spacing: -.06em;
    font-weight: 700;
}

.restaurant-v8-thankyou p {
    color: #776d66;
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.45;
}

.restaurant-v8-order-summary,
.restaurant-v8-order-items {
    display: grid;
    gap: 10px;
}

.restaurant-v8-order-items {
    margin-top: 18px;
}

.restaurant-v8-order-items h4 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.restaurant-v8-order-summary div,
.restaurant-v8-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #fff8ef;
}

.restaurant-v8-order-summary span,
.restaurant-v8-order-item span {
    color: #776d66;
}

.restaurant-v8-done-button {
    margin-top: 20px !important;
    width: 100% !important;
    min-height: 58px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #171412 !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
}

@media (max-width: 782px) {
    .restaurant-v8-inline-checkout {
        padding-bottom: 120px;
    }

    .restaurant-v8-inline-checkout form.checkout {
        padding-bottom: 112px !important;
        gap: 12px !important;
    }

    .restaurant-v8-inline-checkout .woocommerce-billing-fields,
    .restaurant-v8-inline-checkout .woocommerce-shipping-fields,
    .restaurant-v8-inline-checkout .woocommerce-additional-fields,
    .restaurant-v8-inline-checkout #order_review,
    .restaurant-v8-inline-checkout #payment {
        border-radius: 22px;
        padding: 16px;
    }

    .restaurant-v8-inline-checkout h3,
    .restaurant-v8-inline-checkout #order_review_heading {
        font-size: var(--restaurant-v8-font-size-checkout-title-mobile, 22px) !important;
    }

    .restaurant-v8-inline-checkout #payment ul.payment_methods {
        padding: 12px !important;
    }

    .restaurant-v8-inline-checkout #payment ul.payment_methods li {
        padding: 12px !important;
        border-radius: 16px !important;
    }

    .restaurant-v8-inline-checkout .woocommerce-billing-fields__field-wrapper,
    .restaurant-v8-inline-checkout .woocommerce-shipping-fields__field-wrapper {
        grid-template-columns: 1fr;
    }

    .restaurant-v8-inline-checkout #payment .place-order {
        border-radius: 0 0 22px 22px !important;
        padding: 10px 12px max(10px, env(safe-area-inset-bottom)) !important;
    }

    .restaurant-v8-inline-checkout .woocommerce-terms-and-conditions-wrapper {
        font-size: 12px;
    }

    .restaurant-v8-inline-checkout #place_order,
    .restaurant-v8-inline-checkout button.button,
    .restaurant-v8-inline-checkout .button.alt {
        min-height: var(--restaurant-v8-checkout-mobile-button-height, 44px) !important;
        font-size: var(--restaurant-v8-checkout-mobile-button-font-size, 14px) !important;
    }

    .restaurant-v8-thankyou {
        border-radius: 24px;
        padding: 20px;
    }
}

/* ── woo-pickup integration ─────────────────────────────── */
.restaurant-v8-inline-checkout #woo-pickup-checkout-fields {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--restaurant-v8-border);
    border-radius: 28px;
    background: var(--restaurant-v8-surface);
    box-shadow: none;
}

.restaurant-v8-inline-checkout .woo-pickup-checkout-title {
    margin: 0 0 14px;
    font-size: var(--restaurant-v8-font-size-checkout-title, clamp(22px, 2.6vw, 30px));
    line-height: 1.05;
    letter-spacing: -.04em;
    font-weight: 650;
    color: var(--restaurant-v8-text);
}

.restaurant-v8-inline-checkout #woo-pickup-checkout-fields .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.restaurant-v8-inline-checkout #woo-pickup-checkout-fields select {
    width: 100% !important;
    min-height: 52px !important;
    border: 1px solid rgba(23, 20, 18, .16) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: var(--restaurant-v8-text) !important;
    padding: 13px 15px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    appearance: auto;
}

.restaurant-v8-inline-checkout #woo-pickup-checkout-fields label {
    display: block;
    margin: 0 0 7px;
    font-weight: 700;
    color: var(--restaurant-v8-text);
}

.restaurant-v8-inline-checkout .woo-pickup-mode-selector,
.restaurant-v8-inline-checkout #woo_pickup_fulfillment_type {
    width: 100% !important;
    min-height: 52px !important;
    border: 1px solid rgba(23, 20, 18, .16) !important;
    border-radius: 18px !important;
    background: #fff !important;
    padding: 13px 15px !important;
    font-size: 16px !important;
    color: var(--restaurant-v8-text) !important;
    box-shadow: none !important;
}

.restaurant-v8-inline-checkout .woo-pickup-mode-summary {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--restaurant-v8-muted);
}

.restaurant-v8-inline-checkout #woo-pickup-checkout-fields.is-hidden {
    display: none !important;
}

@media (max-width: 782px) {
    .restaurant-v8-inline-checkout #woo-pickup-checkout-fields {
        border-radius: 22px;
        padding: 16px;
    }
}
