/* ── Hide native WC block sections our form replaces ────────────────────── */
.wc-block-checkout__contact-fields,
.wc-block-checkout__shipping-fields,
.wc-block-checkout__billing-fields,
.wp-block-woocommerce-checkout-contact-information-block,
.wp-block-woocommerce-checkout-shipping-address-block,
.wp-block-woocommerce-checkout-billing-address-block,
.wp-block-woocommerce-checkout-shipping-method-block,
.wp-block-woocommerce-checkout-pickup-options-block,
.wc-block-checkout__use-address-for-billing,
.wc-block-components-address-form { display: none !important; }

/* Keep payment + actions visible */
.wp-block-woocommerce-checkout-payment-block,
.wp-block-woocommerce-checkout-actions-block,
.wp-block-woocommerce-checkout-terms-block,
.wp-block-woocommerce-checkout-order-note-block,
.wp-block-woocommerce-checkout-additional-information-block { display: block !important; }

/* ── GoFlow step — inherits WC blocks step width, no extra card needed ────── */
#agf2-delivery-step .wc-block-components-checkout-step__heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
}

#agf2-delivery-step .wc-block-components-checkout-step__title {
    flex: 1 !important;
    white-space: nowrap !important;
}

#agf2-checkout-form {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
    width: 100%;
    box-sizing: border-box;
}

/* ── Form header styles no longer needed — using WC blocks step heading ──── */

/* ── Fields ─────────────────────────────────────────────────────────────── */
#agf2-checkout-form .agf2-field {
    margin-bottom: 16px;
}

#agf2-checkout-form .agf2-row-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}

#agf2-checkout-form .agf2-row-2 .agf2-field {
    margin-bottom: 0 !important;
    width: 100% !important;
    float: none !important;
}

@media (max-width: 480px) {
    #agf2-checkout-form .agf2-row-2 { grid-template-columns: 1fr !important; }
}

/* Override Astra label styles */
#agf2-checkout-form .agf2-field label,
#agf2-checkout-form .agf2-field > label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 5px !important;
    line-height: 1.4 !important;
}

#agf2-checkout-form .agf2-required { color: #dc2626; }

/* Override Astra's aggressive input/select height:40px and box-shadow */
#agf2-checkout-form .agf2-field input[type="text"],
#agf2-checkout-form .agf2-field input[type="email"],
#agf2-checkout-form .agf2-field input[type="tel"],
#agf2-checkout-form .agf2-field select {
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #111827 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.15s ease;
}

#agf2-checkout-form .agf2-field input[type="text"]:focus,
#agf2-checkout-form .agf2-field input[type="email"]:focus,
#agf2-checkout-form .agf2-field input[type="tel"]:focus,
#agf2-checkout-form .agf2-field select:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12) !important;
    outline: none !important;
}

/* ── City autocomplete ──────────────────────────────────────────────────── */
#agf2-checkout-form .agf2-city-wrap { position: relative; }

ul#agf2-city-ac-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
    z-index: 99999;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

ul#agf2-city-ac-list li {
    display: block !important;
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-family: inherit !important;
    color: #374151 !important;
    background: #fff !important;
    border: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
    border-radius: 0 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    user-select: none;
}

ul#agf2-city-ac-list li *,
ul#agf2-city-ac-list li a {
    color: #374151 !important;
    text-decoration: none !important;
    pointer-events: none !important;
}

ul#agf2-city-ac-list li::before,
ul#agf2-city-ac-list li::after {
    display: none !important;
    content: '' !important;
}

ul#agf2-city-ac-list li:last-child {
    border-bottom: none !important;
}

ul#agf2-city-ac-list li:hover,
ul#agf2-city-ac-list li:hover * {
    background: #fff7ed !important;
    color: #ea6c0a !important;
}

/* ── Delivery type buttons ─────────────────────────────────────────────── */
#agf2-checkout-form .agf2-dtype-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#agf2-checkout-form .agf2-dtype-btn,
#agf2-checkout-form .agf2-dtype-btn:not(.agf2-active):not(:disabled) {
    width: 100% !important;
    padding: 14px 10px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    cursor: pointer !important;
    border: 2px solid #e5e7eb !important;
    background: #f9fafb !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    text-align: center !important;
    line-height: 1.4 !important;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

/* Park Pickup active — blue */
#agf2-checkout-form #agf2-btn-park.agf2-active {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(37,99,235,0.3) !important;
}

/* Home Delivery active — orange */
#agf2-checkout-form #agf2-btn-home.agf2-active {
    border-color: #ea6c0a !important;
    background: #ea6c0a !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(234,108,10,0.3) !important;
}

#agf2-checkout-form .agf2-dtype-btn:hover:not(:disabled):not(.agf2-active) {
    border-color: #9ca3af !important;
    background: #f3f4f6 !important;
    color: #374151 !important;
}

#agf2-checkout-form .agf2-dtype-btn:disabled,
#agf2-checkout-form .agf2-dtype-btn.agf2-disabled {
    border-color: #e5e7eb !important;
    background: #f9fafb !important;
    color: #d1d5db !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.5 !important;
}

/* ── FAQ / Guide tooltip ────────────────────────────────────────────────── */
#agf2-delivery-step .agf2-guide { position: relative; }

/* Override Astra button styles on the FAQ toggle */
#agf2-delivery-step .agf2-guide-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 30px !important;
    border-radius: 6px !important;
    background: #fff7ed !important;
    border: 1.5px solid #fed7aa !important;
    color: #c2410c !important;
    cursor: pointer !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    flex-shrink: 0;
    box-shadow: none !important;
    transition: background 0.15s;
    line-height: 1 !important;
}

#agf2-delivery-step .agf2-guide-toggle:hover {
    background: #ffedd5 !important;
    color: #c2410c !important;
}

.agf2-guide-body {
    display: none;
    position: absolute;
    right: 0;
    top: 38px;
    width: 300px;
    background: #fff;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 99999;
    padding: 4px 14px 14px;
}

@media (max-width: 480px) {
    .agf2-guide-body { width: calc(100vw - 48px); right: 0; }
}

.agf2-guide-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.agf2-guide-item:last-child { border-bottom: none; }

.agf2-guide-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.agf2-guide-item strong {
    display: block;
    font-size: 13px;
    color: #111827;
    margin-bottom: 2px;
}

.agf2-guide-item p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.agf2-guide-tip {
    background: #fffbeb;
    border-radius: 6px;
    padding: 8px 10px !important;
    margin-top: 4px;
}

.agf2-guide-tip strong { color: #92400e; }

/* ── Coupon (classic only) ──────────────────────────────────────────────── */
.agf2-coupon {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.agf2-coupon-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.agf2-coupon-link {
    color: #ea6c0a;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 4px;
}

.agf2-coupon-toggle:hover .agf2-coupon-link { color: #c2410c; }

.agf2-coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#agf2-checkout-form .agf2-coupon-row input[type="text"] {
    flex: 1 !important;
    height: auto !important;
    padding: 10px 12px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #111827 !important;
    background: #fff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s;
}

#agf2-checkout-form .agf2-coupon-row input[type="text"]:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12) !important;
}

#agf2-checkout-form .agf2-coupon-btn {
    padding: 10px 18px !important;
    background: #111827 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background 0.15s;
}

#agf2-checkout-form .agf2-coupon-btn:hover { background: #374151 !important; }
#agf2-checkout-form .agf2-coupon-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Powered by GoFlow — subtle branding ─────────────────────────────────── */
/* ── Powered by GoFlow — placed after shipping option via JS ─────────────── */
#agf2-powered-by-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 12px 0 4px !important;
    user-select: none;
}

#agf2-powered-by-bar .agf2-powered-text {
    font-size: 12px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
}

#agf2-powered-by-bar .agf2-powered-logo {
    height: 18px !important;
    width: auto !important;
    max-width: 18px !important;
    vertical-align: middle !important;
    opacity: 0.85 !important;
}

#agf2-powered-by-bar .agf2-brand {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #ea6c0a !important;
}
