/**
 * Variable Product Form Styling
 * Styles the WooCommerce add-to-cart form with variations to match design
 *
 * @package BlazeCommerce Child
 * @version 1.0.0
 */

/* ==========================================================================
   VARIATION SWATCHES STYLING - Color and SIM Options Only
   ========================================================================== */

/* Extend background to full width of parent container */
.wp-block-add-to-cart-form .variations_form {
    background: #F9F9F9;
    border-radius: 12px;
    padding: 15px;
    margin: 0 -15px; /* Negative margin to extend to container edges */
}

/* Variation swatches container styling */
.woocommerce div.product form.cart .variations {
    border-radius: 0; /* Remove border radius since parent has it */
    background: transparent; /* Remove background since parent has it */
    padding: 0; /* Remove padding since parent has it */
}

/* Variation labels styling */
.woocommerce div.product form.cart .variations label {
    font-weight: 600;
    font-size: 14px;
    /* text-align: left; */
}

/* Selected variation item name styling */
.woo-variation-swatches.wvs-show-label .variations td .woo-selected-variation-item-name,
.woo-variation-swatches.wvs-show-label .variations th .woo-selected-variation-item-name {
    font-weight: 400;
    font-size: 14px;
}

/* Reduce spacing between table rows */
.woocommerce div.product form.cart .variations td,
.woocommerce div.product form.cart .variations th {
    padding-bottom: 0px;
}


/* Add spacing between variation rows */
.woocommerce div.product form.cart .variations tbody tr:not(:last-child) {
    margin-bottom: 10px;
    display: block;
}

.woocommerce div.product form.cart .variations tbody tr:not(:last-child) th,
.woocommerce div.product form.cart .variations tbody tr:not(:last-child) td {
    display: block;
}

/* ==========================================================================
   VARIATION OPTION BUTTONS STYLING
   ========================================================================== */

/* Base styling for all variation items */
.variable-item,
.button-variable-item {
    border: 1px solid var(--wp--preset--color--safelife-primary);
    border-radius: 6px;
    background: #F9F9F9;
    padding: 8px 12px;
    margin: 4px;
    transition: all 0.3s ease;
}

.variable-item.selected,
.button-variable-item.selected {
    background: var(--wp--preset--color--safelife-secondary);
    border-color: #EB7525;
    border-radius: 6px;
}

/* ==========================================================================
   VARIATION SWATCHES SPECIFIC STYLING - Fix Double Border Issue
   ========================================================================== */

/* Base styling for variation swatches - unselected state */
.woo-variation-swatches .variable-item {
    border: 1px solid var(--wp--preset--color--safelife-primary) !important;
    border-radius: 6px !important;
    background: #F9F9F9 !important;
    padding: 8px 12px !important;
    margin: 4px !important;
    transition: all 0.3s ease !important;
}

/* Selected state - ORANGE BORDER ONLY (remove double border) */
.woo-variation-swatches .variable-item.selected {
    background: var(--wp--preset--color--safelife-secondary) !important;
    border: 1px solid #EB7525 !important; /* Orange border only */
    border-radius: 6px !important;
    color: white !important;
}

/* Remove any additional borders that might cause double border effect */
.woo-variation-swatches .variable-item.selected::before,
.woo-variation-swatches .variable-item.selected::after {
    display: none !important;
}

/* Ensure no outline or box-shadow creates additional borders */
.woo-variation-swatches .variable-item.selected:focus,
.woo-variation-swatches .variable-item.selected:active {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #EB7525 !important; /* Keep only orange border */
}

/* Target specific variation swatch types */
.woo-variation-swatches .variable-item[data-type="color"].selected,
.woo-variation-swatches .variable-item[data-type="button"].selected {
    border: 1px solid #EB7525;
    background: var(--wp--preset--color--safelife-secondary);
}

/* Remove any plugin-added borders */
.woo-variation-swatches .variable-item.selected * {
    border: none;
}

/* ==========================================================================
   ENQUIRY BUTTON STYLING FOR SINGLE PRODUCT PAGES
   ========================================================================== */

/* Enquiry button styling for single product pages */
.single-product .pi-custom-button,
.single-product .add-to-enquiry,
.single-product .add-to-enquiry-loop,
.single-product button[data-action="pi_add_to_enquiry"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    background-color: transparent !important;
    color: var(--wp--preset--color--safelife-primary) !important;
    border: 2px solid var(--wp--preset--color--safelife-primary) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 10px 0 !important;
    box-sizing: border-box !important;
    font-family: var(--wp--preset--font-family--roboto) !important;
}

/* Enquiry button hover effect */
.single-product .pi-custom-button:hover,
.single-product .add-to-enquiry:hover,
.single-product .add-to-enquiry-loop:hover,
.single-product button[data-action="pi_add_to_enquiry"]:hover {
    background-color: var(--wp--preset--color--safelife-primary) !important;
    color: white !important;
    transform: translateY(-1px) !important;
}