/* WordWoo Checkout Map Custom Styling */

.wordwoo-map-section {
  font-family: 'Poppins', sans-serif;
  color: var(--dark, #050505);
}

.wordwoo-map-search-row input:focus {
  border-color: var(--primary, #18d5f7) !important;
  box-shadow: 0 0 0 3px rgba(24, 213, 247, 0.15) !important;
  outline: none;
}

#wordwoo-map-detect-btn:hover {
  background-color: var(--dark, #050505) !important;
  color: var(--primary, #18d5f7) !important;
  transform: translateY(-2px);
}

/* Fix for Leaflet Map Panes and Layout */
#wordwoo-checkout-map {
  background-color: #f6f7f7;
  overflow: hidden;
}

/* Custom styles for Leaflet elements to look elegant and premium */
.leaflet-bar {
  border: none !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
}

.leaflet-bar a {
  background-color: #ffffff !important;
  color: #050505 !important;
  border: 1px solid rgba(0,0,0,0.05) !important;
  border-radius: 6px !important;
  margin-bottom: 2px;
}

.leaflet-bar a:hover {
  background-color: #18d5f7 !important;
  color: #050505 !important;
}

/* --- Premium Checkout Wizard Payment Methods Styling --- */

/* Hide the duplicate purple place order button inside Step 4 */
.woocommerce-checkout-payment button#place_order,
#payment button#place_order,
#payment-gateways-wizard .form-row.place-order button#place_order {
    display: none !important;
}

/* Remove default dark grey backgrounds and paddings */
.woocommerce-checkout-payment,
#payment {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.woocommerce-checkout-payment ul.payment_methods,
#payment ul.payment_methods {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Style payment options as clean white cards */
.woocommerce-checkout-payment li.wc_payment_method,
#payment li.wc_payment_method {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.07) !important;
    border-radius: 12px !important;
    padding: 18px 24px !important;
    margin-bottom: 12px !important;
    list-style: none !important;
    transition: all 0.25s ease-in-out !important;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01) !important;
}

/* Active gateway card state */
.woocommerce-checkout-payment li.wc_payment_method:has(input[type="radio"]:checked),
.woocommerce-checkout-payment li.wc_payment_method.active-gateway,
#payment li.wc_payment_method.active-gateway {
    border-color: #18D5F7 !important;
    box-shadow: 0 4px 15px rgba(24, 213, 247, 0.12) !important;
    background: rgba(24, 213, 247, 0.02) !important;
}

/* Make gateway label text bold */
.woocommerce-checkout-payment li.wc_payment_method label,
#payment li.wc_payment_method label {
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    color: #050505 !important;
    cursor: pointer;
    margin-left: 8px !important;
}

/* Custom styled description boxes inside payment cards */
.woocommerce-checkout-payment div.payment_box,
#payment div.payment_box {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 8px !important;
    padding: 15px 18px !important;
    margin-top: 12px !important;
    color: #555555 !important;
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
}

/* Hide the default WooCommerce pointer arrow */
.woocommerce-checkout-payment div.payment_box::before,
#payment div.payment_box::before {
    display: none !important;
}

/* Style the bottom privacy policy terms block */
.woocommerce-checkout-payment .woocommerce-terms-and-conditions-wrapper,
#payment .woocommerce-terms-and-conditions-wrapper,
.woocommerce-checkout-payment .form-row.place-order,
#payment .form-row.place-order {
    margin-top: 20px !important;
    padding: 18px !important;
    background: rgba(24, 213, 247, 0.03) !important;
    border: 1px solid rgba(24, 213, 247, 0.1) !important;
    border-radius: 12px !important;
    font-size: 0.88rem !important;
    color: #555555 !important;
    line-height: 1.6 !important;
    box-shadow: none !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce-checkout-payment .woocommerce-privacy-policy-text p,
#payment .woocommerce-privacy-policy-text p {
    margin: 0 !important;
}

/* Fix side-by-side checkout fields touching borders using CSS Grid */
#thebudget-billing-fields-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 24px !important;
    row-gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

#thebudget-billing-fields-wrapper .form-row {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
}

/* Span columns */
#thebudget-billing-fields-wrapper .col-md-6 {
    grid-column: span 1 !important;
    width: 100% !important;
}

#thebudget-billing-fields-wrapper .col-12,
#thebudget-billing-fields-wrapper .col-12.address-field {
    grid-column: span 2 !important;
    width: 100% !important;
}

/* Mobile responsive fallback to stack single column */
@media (max-width: 767px) {
    #thebudget-billing-fields-wrapper {
        grid-template-columns: 1fr !important;
    }
    #thebudget-billing-fields-wrapper .col-md-6 {
        grid-column: span 2 !important;
    }
}

/* Force checkout text inputs and wrappers to expand and fill full grid column width */
#thebudget-billing-fields-wrapper input.input-text,
#thebudget-billing-fields-wrapper select,
#thebudget-billing-fields-wrapper .woocommerce-input-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

@media (min-width: 768px) {
  #thebudget-billing-fields-wrapper .col-md-6.form-row {
    width: 100% !important;
  }
}
