/**
 * Yamasaki Checkout Styles - MAXIMUM SPECIFICITY
 * Professional, on-brand checkout experience
 * Brand Colors: Grey #282828, Red #d70000
 */

/* ============================================
   PAGE SPACING - ADD MARGIN UNDER NAV
   ============================================ */

/* Ensure nav bar sits at top of screen */
body.woocommerce-checkout {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.woocommerce-checkout .site-header,
body.woocommerce-checkout header {
    margin-top: 0 !important;
}

/* Add modest spacing under nav for content */
body.woocommerce-checkout .site-content,
body.woocommerce-checkout main.site-main {
    padding-top: 20px !important;
    margin-top: 0 !important;
}

/* ============================================
   FORCE WHITE BACKGROUNDS - REMOVE ALL DARK SECTIONS
   ============================================ */

body.woocommerce-checkout .wc-block-components-checkout-step,
body.woocommerce-checkout .wc-block-components-checkout-step__container,
body.woocommerce-checkout .wp-block-product-blocks-checkout-shipping .wopb-product-wrapper,
body.woocommerce-checkout .wp-block-product-blocks-checkout-billing .wopb-product-wrapper,
body.woocommerce-checkout .wopb-checkout-shipping-container,
body.woocommerce-checkout .wopb-checkout-billing-container,
body.woocommerce-checkout .shipping_address,
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .wc-block-checkout__form,
body.woocommerce-checkout .wc-block-components-address-form {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* ============================================
   FORCE ALL LABELS TO BE DARK AND VISIBLE
   ============================================ */

body.woocommerce-checkout label,
body.woocommerce-checkout .woocommerce-form-row label,
body.woocommerce-checkout .woocommerce-billing-fields label,
body.woocommerce-checkout .woocommerce-shipping-fields label,
body.woocommerce-checkout .form-row label,
body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-textarea label,
body.woocommerce-checkout .wc-block-components-select label,
body.woocommerce-checkout .wc-block-checkout__form label {
    color: #282828 !important;
    font-weight: 600 !important;
    background: transparent !important;
}

/* ============================================
   SECTION HEADINGS - DARK AND BOLD
   ============================================ */

body.woocommerce-checkout .wopb-billing-title,
body.woocommerce-checkout .wopb-shipping-title,
body.woocommerce-checkout .wopb-additional-info-section-title,
body.woocommerce-checkout h2,
body.woocommerce-checkout h3,
body.woocommerce-checkout .wc-block-components-checkout-step__heading {
    color: #282828 !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    margin-bottom: 15px !important;
    background: transparent !important;
}

/* ============================================
   COUPON CODE SECTION WITH VISIBLE HEADING
   ============================================ */

body.woocommerce-checkout .wc-block-components-totals-coupon,
body.woocommerce-checkout .wc-block-components-panel,
body.woocommerce-checkout .checkout_coupon,
body.woocommerce-checkout .ydm-inline-coupon {
    background-color: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

/* Add visible "Coupon Code" heading */
body.woocommerce-checkout .wc-block-components-totals-coupon::before,
body.woocommerce-checkout .checkout_coupon::before,
body.woocommerce-checkout .ydm-inline-coupon::before {
    content: 'Coupon Code' !important;
    display: block !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #282828 !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #d70000 !important;
}

/* Coupon label styling */
body.woocommerce-checkout .ydm-inline-coupon__label {
    font-weight: 600 !important;
    color: #282828 !important;
    font-size: 16px !important;
    display: block !important;
    margin-bottom: 10px !important;
    text-transform: uppercase !important;
}

/* Coupon input styling */
body.woocommerce-checkout input#coupon_code,
body.woocommerce-checkout .wc-block-components-totals-coupon input,
body.woocommerce-checkout .ydm-inline-coupon input {
    border: 2px solid #d0d0d0 !important;
    padding: 12px 15px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    background-color: #ffffff !important;
}

body.woocommerce-checkout input#coupon_code:focus,
body.woocommerce-checkout .wc-block-components-totals-coupon input:focus,
body.woocommerce-checkout .ydm-inline-coupon input:focus {
    border-color: #d70000 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(215, 0, 0, 0.1) !important;
}

/* Apply button */
body.woocommerce-checkout button[name="apply_coupon"],
body.woocommerce-checkout .wc-block-components-totals-coupon button,
body.woocommerce-checkout .ydm-inline-coupon button {
    background-color: #d70000 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

body.woocommerce-checkout button[name="apply_coupon"]:hover,
body.woocommerce-checkout .wc-block-components-totals-coupon button:hover,
body.woocommerce-checkout .ydm-inline-coupon button:hover {
    background-color: #a00000 !important;
}

/* Coupon response messaging */
body.woocommerce-checkout .ydm-inline-coupon__message {
    display: none !important;
    width: 100% !important;
    margin-top: 12px !important;
    padding: 12px 14px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    background-color: transparent !important;
    color: #ffffff !important;
}

body.woocommerce-checkout .ydm-inline-coupon__message.has-message {
    display: inline-block !important;
    background-color: #282828 !important;
}

body.woocommerce-checkout .ydm-inline-coupon__message.has-message.is-success {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

body.woocommerce-checkout .ydm-inline-coupon__message.has-message.is-error {
    background-color: #d70000 !important;
    color: #ffffff !important;
}

body.woocommerce-checkout .ydm-inline-coupon__message.has-message a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* ============================================
   PRIVACY POLICY TEXT - DARK AND READABLE
   ============================================ */

body.woocommerce-checkout .wc-block-checkout__terms,
body.woocommerce-checkout .wc-block-components-checkout-policies,
body.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout .woocommerce-privacy-policy-text p,
body.woocommerce-checkout .wc-block-checkout__privacy-policy p {
    color: #282828 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    opacity: 1 !important;
}

body.woocommerce-checkout .wc-block-checkout__terms a,
body.woocommerce-checkout .wc-block-components-checkout-policies a,
body.woocommerce-checkout .woocommerce-privacy-policy-link {
    color: #d70000 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

/* ============================================
   ADDITIONAL INFORMATION SECTION
   ============================================ */

body.woocommerce-checkout .woocommerce-additional-fields,
body.woocommerce-checkout .wp-block-product-blocks-checkout-additional-information .wopb-product-wrapper,
body.woocommerce-checkout .wc-block-checkout__add-note,
body.woocommerce-checkout .wc-block-components-textarea {
    background-color: #ffffff !important;
}

/* ============================================
   ALERTS & NOTICES - HIGH CONTRAST
   ============================================ */

body.woocommerce-checkout .woocommerce-error,
body.woocommerce-checkout .wc-block-components-notice-banner.is-error {
    background-color: #d70000 !important;
    color: #ffffff !important;
    border: none !important;
    border-left: 4px solid #a00000 !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
    border-radius: 4px !important;
}

body.woocommerce-checkout .woocommerce-error a,
body.woocommerce-checkout .wc-block-components-notice-banner.is-error a {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .wc-block-components-notice-banner.is-info {
    background-color: #282828 !important;
    color: #ffffff !important;
    border-left: 4px solid #d70000 !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
    border-radius: 4px !important;
}

/* Success messages - green background with white text */
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .wc-block-components-notice-banner.is-success {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: none !important;
    border-left: 4px solid #1e7e34 !important;
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
}

body.woocommerce-checkout .woocommerce-message a,
body.woocommerce-checkout .wc-block-components-notice-banner.is-success a {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

body.woocommerce-checkout .woocommerce-message::before {
    color: #ffffff !important;
}

/* ============================================
   PLACE ORDER BUTTON
   ============================================ */

body.woocommerce-checkout #place_order,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    background-color: #d70000 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 15px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    width: 100% !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
}

body.woocommerce-checkout #place_order:hover,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
    background-color: #a00000 !important;
}

/* ============================================
   ORDER TOTALS
   ============================================ */

/* Only the Total footer row should have dark background */
body.woocommerce-checkout .wc-block-components-totals-footer-item {
    background-color: #282828 !important;
    padding: 15px !important;
    border-radius: 4px !important;
}

/* Total row text should be white and bold */
body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.woocommerce-checkout .wc-block-components-totals-footer-item * {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Classic checkout order total - ULTRA AGGRESSIVE */
body.woocommerce-checkout .shop_table tr.order-total,
body.woocommerce-checkout .woocommerce-checkout-review-order table.shop_table tr.order-total,
body.woocommerce-checkout table.wopb-checkout-review-table tr.order-total,
body.woocommerce-checkout .order-total {
    background-color: #282828 !important;
    padding: 15px !important;
    border-radius: 4px !important;
}

body.woocommerce-checkout .shop_table tr.order-total th,
body.woocommerce-checkout .shop_table tr.order-total td,
body.woocommerce-checkout .order-total th,
body.woocommerce-checkout .order-total td,
body.woocommerce-checkout tr.order-total th,
body.woocommerce-checkout tr.order-total td {
    color: #ffffff !important;
    font-weight: 700 !important;
    background-color: #282828 !important;
}

/* ALL nested elements in order-total must be white */
body.woocommerce-checkout tr.order-total strong,
body.woocommerce-checkout tr.order-total .woocommerce-Price-amount,
body.woocommerce-checkout tr.order-total .amount,
body.woocommerce-checkout tr.order-total bdi,
body.woocommerce-checkout tr.order-total .woocommerce-Price-currencySymbol,
body.woocommerce-checkout tr.order-total span {
    color: #ffffff !important;
}

/* ============================================
   FORM INPUTS
   ============================================ */

body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout select,
body.woocommerce-checkout textarea {
    border: 2px solid #d0d0d0 !important;
    border-radius: 4px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    background-color: #ffffff !important;
    color: #282828 !important;
}

body.woocommerce-checkout input:focus,
body.woocommerce-checkout select:focus,
body.woocommerce-checkout textarea:focus {
    border-color: #d70000 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(215, 0, 0, 0.1) !important;
}

/* ============================================
   PAYMENT METHODS
   ============================================ */

body.woocommerce-checkout .wc-block-components-radio-control__option,
body.woocommerce-checkout .wc_payment_method {
    background-color: #f8f9fa !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 12px !important;
    margin-bottom: 8px !important;
}

body.woocommerce-checkout .wc-block-components-radio-control__option:hover {
    border-color: #d70000 !important;
}

/* ============================================
   FIX DUPLICATE CHECKBOXES
   ============================================ */

/* Hide duplicate or redundant checkbox elements */
body.woocommerce-checkout .wc-block-components-checkbox input[type="checkbox"] + input[type="checkbox"],
body.woocommerce-checkout .shipping-address-checkbox:not(:first-of-type) {
    display: none !important;
}

/* Ensure single checkbox styling */
body.woocommerce-checkout .wc-block-components-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.woocommerce-checkout .wc-block-components-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

/* Fix "Ship to Different Address" checkbox */
body.woocommerce-checkout #ship-to-different-address {
    background-color: transparent !important;
    padding: 0 !important;
    margin: 20px 0 !important;
}

body.woocommerce-checkout #ship-to-different-address label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #282828 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

body.woocommerce-checkout #ship-to-different-address-checkbox {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: auto !important;
    height: auto !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    position: static !important;
    background: initial !important;
    border: initial !important;
    border-radius: 3px !important;
    transition: none !important;
}

body.woocommerce-checkout #ship-to-different-address input[type="checkbox"]::before,
body.woocommerce-checkout #ship-to-different-address input[type="checkbox"]::after {
    content: none !important;
}

body.woocommerce-checkout #ship-to-different-address label span {
    color: #282828 !important;
}

/* ============================================
   YOUR ORDER SUMMARY - READABLE TEXT
   ============================================ */

/* Make sure all order summary text (except Total) is dark and readable */
body.woocommerce-checkout .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-components-order-summary__item,
body.woocommerce-checkout .wc-block-components-order-summary h2 {
    color: #282828 !important;
}

/* Product names and pricing text */
body.woocommerce-checkout .wc-block-components-order-summary__item .wc-block-components-product-name,
body.woocommerce-checkout .cart_item,
body.woocommerce-checkout .product-name,
body.woocommerce-checkout .product-total {
    color: #282828 !important;
}

/* Coupon remove link styling */
body.woocommerce-checkout a.woocommerce-remove-coupon {
    display: inline-block !important;
    margin-left: 8px !important;
    padding: 4px 10px !important;
    background-color: #d70000 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

body.woocommerce-checkout a.woocommerce-remove-coupon:hover,
body.woocommerce-checkout a.woocommerce-remove-coupon:focus {
    background-color: #a00000 !important;
    color: #ffffff !important;
}

/* Subtotal, shipping, etc rows - dark text */
body.woocommerce-checkout .wc-block-components-totals-item:not(.wc-block-components-totals-footer-item) .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-item:not(.wc-block-components-totals-footer-item) .wc-block-components-totals-item__value {
    color: #282828 !important;
}

/* ============================================
   FIX PAYMENT METHOD WHITE BOX
   ============================================ */

/* Remove or style the white box under payment methods */
body.woocommerce-checkout .wc-block-components-radio-control-accordion-content,
body.woocommerce-checkout .wc-block-components-radio-control__option-content,
body.woocommerce-checkout .payment_box {
    background-color: #f8f9fa !important;
    padding: 15px !important;
    margin-top: 10px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
}

/* Hide empty payment method content boxes - AGGRESSIVE */
body.woocommerce-checkout .wc-block-components-radio-control__option-content:empty,
body.woocommerce-checkout .wc-block-components-payment-method__content:empty,
body.woocommerce-checkout div[class*="payment-method__content"]:empty,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-content:empty {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Also hide if only has whitespace */
body.woocommerce-checkout .wc-block-components-radio-control__option-content:not(:has(*)),
body.woocommerce-checkout .wc-block-components-payment-method__content:not(:has(*)) {
    display: none !important;
}

/* Payment method description text should be dark */
body.woocommerce-checkout .payment_box p,
body.woocommerce-checkout .wc-block-components-radio-control__option-content p {
    color: #282828 !important;
    margin: 0 !important;
}
