/*!
Theme Name: anntaylorarts
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: anntaylorarts
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

anntaylorarts is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/



/* Force Flexbox and strip absolute positioning from Cart Actions */
table.shop_table .actions,
.woocommerce-cart table.cart td.actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 20px !important;
    clear: both !important;
}

/* Reset the Coupon Container */
table.shop_table .actions .coupon,
.woocommerce-cart table.cart td.actions .coupon {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    float: none !important;
    margin: 0 !important;
    position: relative !important;
    width: auto !important;
}

/* Fix Input Field - Prevent Overlap */
table.shop_table .actions .coupon .input-text,
table.shop_table .actions .coupon input[name="coupon_code"] {
    float: none !important;
    position: static !important; /* Kills absolute positioning overlap */
    width: 200px !important;
    min-width: 150px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    height: 45px !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
}

/* Fix Buttons - Restore Visibility and Structure */
table.shop_table .actions .button,
table.shop_table .actions button[name="apply_coupon"],
table.shop_table .actions button[name="update_cart"] {
    float: none !important;
    position: static !important; /* Kills absolute positioning overlap */
    margin: 0 !important;
    padding: 0 20px !important;
    height: 45px !important;
    width: auto !important;
    background-color: #f0f0f0 !important; 
    color: #333 !important;
    border: 1px solid #ccc !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    table.shop_table .actions {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: stretch !important;
    }
    table.shop_table .actions .coupon {
        width: 100% !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    table.shop_table .actions .coupon .input-text,
    table.shop_table .actions .coupon button[name="apply_coupon"],
    table.shop_table .actions button[name="update_cart"] {
        width: 100% !important;
    }
}

section.custom-shortcode-section {
    margin-top: 70px;
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit.alt, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt {
    background-color: #c2233a !important;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/*CSS For Checkout page*/

/* Fix WooCommerce Checkout Form Field Widths */
.woocommerce-checkout .form-row {
    display: block !important;
    float: none !important;
    margin-bottom: 20px !important;
}

/* Force labels to stack above inputs */
.woocommerce-checkout .form-row label {
    display: block !important;
    width: 100% !important;
    margin-bottom: 8px !important;
    text-align: left !important;
    line-height: 1.5 !important;
}

/* Expand inputs, selects, and textareas to full width */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    padding: 10px 15px !important;
    min-height: 45px !important;
    float: none !important;
}

/* Fix half-width fields for desktop (First/Last Name) */
@media (min-width: 768px) {
    .woocommerce-checkout .form-row.form-row-first,
    .woocommerce-checkout .form-row.form-row-last {
        width: 48% !important;
        float: left !important;
        clear: none !important;
    }
    
    .woocommerce-checkout .form-row.form-row-last {
        float: right !important;
    }

    /* Clear the floats so subsequent full-width fields don't overlap */
    .woocommerce-checkout .form-row.form-row-wide {
        clear: both !important;
    }
}
