/**
 * WooCommerce Get a Quote frontend styles
 */

/* CSS Variables for theme-adaptive styling */
:root {
    /* Primary colors (from theme or fallback to WooCommerce purple) */
    --wgaq-primary-color: var(--button-color, var(--accent-color, var(--theme-color, #a46497)));
    --wgaq-primary-hover: var(--button-hover-color, var(--accent-hover-color, var(--theme-hover-color, #96588a)));
    --wgaq-text-on-primary: var(--button-text-color, #fff);
    
    /* Borders and radius */
    --wgaq-border-color: var(--button-border-color, var(--border-color, #ddd));
    --wgaq-border-radius: var(--button-border-radius, 3px);
    --wgaq-box-shadow: var(--box-shadow, 0 1px 3px rgba(0,0,0,0.1));
    
    /* Background colors */
    --wgaq-bg-light: var(--background-light, var(--content-background, #f8f8f8));
    --wgaq-bg-lighter: var(--background-lighter, var(--content-background-light, #fbfbfb));
    --wgaq-bg-white: var(--background-white, var(--content-background-white, #fff));
    --wgaq-bg-secondary: var(--background-secondary, var(--secondary-background, #f7f7f7));
    --wgaq-bg-secondary-hover: var(--background-secondary-hover, var(--secondary-background-hover, #ebe9eb));
    
    /* Status colors */
    --wgaq-success-color: var(--success-color, var(--status-success, #7ad03a));
    --wgaq-pending-color: var(--pending-color, var(--status-pending, #ffeeba));
    --wgaq-pending-text: var(--pending-text-color, var(--status-pending-text, #856404));
    --wgaq-processing-color: var(--processing-color, var(--status-processing, #b8daff));
    --wgaq-processing-text: var(--processing-text-color, var(--status-processing-text, #004085));
    --wgaq-completed-color: var(--completed-color, var(--status-completed, #c3e6cb));
    --wgaq-completed-text: var(--completed-text-color, var(--status-completed-text, #155724));
    --wgaq-rejected-color: var(--rejected-color, var(--status-rejected, #f5c6cb));
    --wgaq-rejected-text: var(--rejected-text-color, var(--status-rejected-text, #721c24));
    --wgaq-error-color: var(--error-color, var(--danger-color, #a00));
    --wgaq-error-hover: var(--error-hover-color, var(--danger-hover-color, #dc3232));
    
    /* Text colors */
    --wgaq-text-color: var(--body-text-color, var(--text-color, inherit));
    --wgaq-text-light: var(--body-text-light, var(--text-light, #767676));
    --wgaq-text-secondary: var(--secondary-text-color, var(--text-secondary, #515151));
    --wgaq-heading-color: var(--heading-color, var(--title-color, inherit));
}

/* 
 * This stylesheet uses CSS variables to adapt to the theme's colors.
 * If the theme defines --button-color, --accent-color, or other standard variables,
 * the plugin will use those colors. Otherwise, it falls back to sensible defaults.
 * 
 * Class naming follows a BEM-like approach with the prefix "wgaq-" to avoid conflicts.
 */

/* Common Styles */
.wgaq-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.wgaq-container * {
    box-sizing: border-box;
}

.wgaq-container p {
    margin-bottom: 0.8em;
    padding: 0;
    line-height: 1.4;
}

.wgaq-container .wgaq-page-title,
.wgaq-container .wgaq-section-title {
    line-height: 1.2;
}

.wgaq-container .wgaq-form-row input, 
.wgaq-container .wgaq-form-row textarea {
    margin: 0;
}

.wgaq-container .wgaq-form-row input {
    line-height: 1.4;
    height: auto;
}

.wgaq-container .wgaq-form-row textarea {
    min-height: 80px;
}

.wgaq-page-header {
    margin-bottom: 1em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid var(--wgaq-border-color);
}

.wgaq-page-title {
    margin: 0 0 0.5em;
    font-size: 1.5em;
    font-weight: 600;
    color: inherit;
}

/* Shop Page and Product Page Buttons */
.wgaq-add-to-quote-button,
.wgaq-direct-inquiry-button,
.woocommerce a.wgaq-add-to-quote-button,
.woocommerce a.wgaq-direct-inquiry-button,
.woocommerce .products a.wgaq-add-to-quote-button,
.woocommerce .products a.wgaq-direct-inquiry-button {
    display: inline-block;
    margin: 0 0 0.5em 0.5em;
    padding: 0.5em 0.8em;
    background-color: var(--wgaq-primary-color);
    color: var(--wgaq-text-on-primary);
    border: 1px solid var(--wgaq-primary-color);
    border-radius: var(--wgaq-border-radius);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    font-size: 0.9em;
    transition: all 0.2s ease;
    min-height: 0;
    min-width: 0;
    box-shadow: none;
}

.wgaq-add-to-quote-button:hover,
.wgaq-direct-inquiry-button:hover,
.woocommerce a.wgaq-add-to-quote-button:hover,
.woocommerce a.wgaq-direct-inquiry-button:hover,
.woocommerce .products a.wgaq-add-to-quote-button:hover,
.woocommerce .products a.wgaq-direct-inquiry-button:hover {
    background-color: var(--wgaq-primary-hover);
    color: var(--wgaq-text-on-primary);
    border-color: var(--wgaq-primary-hover);
}

/* Fix for buttons in product listings */
.woocommerce ul.products li.product .wgaq-add-to-quote-button,
.woocommerce ul.products li.product .wgaq-direct-inquiry-button {
    margin-top: 0.5em;
    font-size: 0.85em;
    padding: 0.4em 0.7em;
}

/* General Button Styles */
.wgaq-button {
    display: inline-block;
    padding: 0.618em 1em;
    border-radius: var(--wgaq-border-radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    border: 1px solid;
    line-height: 1.2;
    font-size: 0.9em;
    box-shadow: none;
    background-image: none;
}

.wgaq-button-primary {
    background-color: var(--wgaq-primary-color);
    color: var(--wgaq-text-on-primary);
    border-color: var(--wgaq-primary-color);
}

.wgaq-button-primary:hover {
    background-color: var(--wgaq-primary-hover);
    color: var(--wgaq-text-on-primary);
    border-color: var(--wgaq-primary-hover);
}

.wgaq-button-secondary {
    background-color: var(--wgaq-bg-secondary);
    color: var(--wgaq-text-secondary);
    border-color: var(--wgaq-border-color);
}

.wgaq-button-secondary:hover {
    background-color: var(--wgaq-bg-secondary-hover);
    color: var(--wgaq-text-secondary);
    border-color: var(--wgaq-border-color);
}

.wgaq-section-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 1em;
    color: inherit;
}

/* Mini Cart Styles */
.wgaq-mini-cart-offcanvas {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background-color: var(--wgaq-bg-white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wgaq-mini-cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Ensure it covers the entire viewport */
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.wgaq-mini-cart-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.wgaq-mini-cart-offcanvas.active {
    right: 0;
}

.wgaq-mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.wgaq-mini-cart-title {
    font-size: 16px;
    font-weight: 600;
}

.wgaq-mini-cart-count {
    display: inline-block;
    background-color: var(--wgaq-primary-color);
    color: var(--wgaq-text-on-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-left: 5px;
}

.wgaq-mini-cart-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--wgaq-text-color);
}

.wgaq-mini-cart-body {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.wgaq-mini-cart-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 12px;
}

.wgaq-mini-cart-item {
    display: flex;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.wgaq-mini-cart-item-image {
    width: 50px;
    margin-right: 10px;
}

.wgaq-mini-cart-item-details {
    flex: 1;
}

.wgaq-mini-cart-item-details h4 {
    margin: 0 0 3px;
    font-size: 13px;
}

.wgaq-mini-cart-item-quantity,
.wgaq-mini-cart-item-sku,
.wgaq-mini-cart-item-variation {
    font-size: 12px;
    color: var(--wgaq-text-light);
    margin-bottom: 2px;
}

.wgaq-mini-cart-item-remove {
    position: absolute;
    top: 0;
    right: 0;
    text-decoration: none;
    font-size: 18px;
    color: #ccc;
}

.wgaq-mini-cart-item-remove:hover {
    color: var(--wgaq-error-color);
}

.wgaq-mini-cart-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    width: calc(100% - 25px);
    bottom: 10px;
}

.wgaq-mini-cart-actions .wgaq-button,
.wgaq-mini-cart-actions a.button {
    width: 100%;
    margin: 0;
    padding: 0.618em 1em;
    text-align: center;
    display: block;
    border-radius: var(--wgaq-border-radius);
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 600;
    box-sizing: border-box;
}

/* Hide the continue shopping button */
.wgaq-mini-cart-actions .wgaq-continue-shopping {
    display: none;
}

/* Style for View Request Basket - outlined button */
.wgaq-mini-cart-actions .wgaq-view-basket {
    background-color: transparent;
    color: var(--wgaq-primary-color);
    border: 1px solid var(--wgaq-primary-color);
}

.wgaq-mini-cart-actions .wgaq-view-basket:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--wgaq-primary-hover);
    border-color: var(--wgaq-primary-hover);
}

/* Style for Request a Quote - filled button */
.wgaq-mini-cart-actions .wgaq-request-quote {
    background-color: var(--wgaq-primary-color);
    color: var(--wgaq-text-on-primary);
    border: 1px solid var(--wgaq-primary-color);
}

.wgaq-mini-cart-actions .wgaq-request-quote:hover {
    background-color: var(--wgaq-primary-hover);
    color: var(--wgaq-text-on-primary);
    border-color: var(--wgaq-primary-hover);
}

.wgaq-empty-basket {
    text-align: center;
    padding: 20px 0;
    color: var(--wgaq-text-light);
}

/* Quote Basket Page */
.wgaq-basket-page {
    width: 100%;
}

.wgaq-empty-basket-message {
    text-align: center;
    padding: 1.5em 0;
    background-color: var(--wgaq-bg-light);
    border-radius: var(--wgaq-border-radius);
    margin-bottom: 1.5em;
}

.wgaq-basket-items {
    margin-bottom: 1.5em;
    border: 1px solid var(--wgaq-border-color);
    border-radius: var(--wgaq-border-radius);
}

.wgaq-basket-header {
    display: flex;
    background-color: var(--wgaq-bg-light);
    padding: 0.8em;
    font-weight: 600;
    border-bottom: 1px solid var(--wgaq-border-color);
}

.wgaq-basket-header-product {
    flex: 3;
}

.wgaq-basket-header-quantity {
    flex: 1;
    text-align: center;
}

.wgaq-basket-header-remove {
    width: 30px;
    text-align: right;
}

.wgaq-basket-item {
    display: flex;
    padding: 0.8em;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.wgaq-basket-item-product {
    display: flex;
    flex: 3;
    align-items: center;
}

.wgaq-basket-item-image {
    width: 60px;
    margin-right: 0.8em;
}

.wgaq-basket-item-image img {
    max-width: 100%;
    height: auto;
}

.wgaq-basket-item-details {
    flex: 1;
}

.wgaq-basket-item-details h3 {
    margin: 0 0 0.3em;
    font-size: 1em;
    font-weight: 600;
}

.wgaq-basket-item-sku,
.wgaq-basket-item-variation {
    font-size: 0.9em;
    color: var(--wgaq-text-light);
    margin-bottom: 0.2em;
}

.wgaq-basket-item-quantity {
    flex: 1;
    text-align: center;
}

.wgaq-basket-item-remove {
    width: 30px;
    text-align: right;
}

.wgaq-basket-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.2em;
    align-items: center;
}

.wgaq-basket-actions .wgaq-button {
    min-width: 130px;
}

/* Quantity Controls */
.wgaq-quantity {
    display: inline-flex;
    position: relative;
    border: 1px solid var(--wgaq-border-color);
    border-radius: var(--wgaq-border-radius);
    overflow: hidden;
}

.wgaq-quantity-minus,
.wgaq-quantity-plus {
    width: 25px;
    height: 32px;
    background-color: var(--wgaq-bg-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    border: none;
}

.wgaq-quantity-input {
    width: 35px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--wgaq-border-color);
    border-right: 1px solid var(--wgaq-border-color);
    text-align: center;
    font-size: 13px;
    padding: 0;
    -moz-appearance: textfield;
}

.wgaq-quantity-input::-webkit-outer-spin-button,
.wgaq-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wgaq-remove-item {
    color: var(--wgaq-error-color);
    font-size: 1.2em;
    text-decoration: none;
    display: inline-block;
    line-height: 1;
}

.wgaq-remove-item:hover {
    color: var(--wgaq-error-hover);
}

/* Checkout Page */
.wgaq-checkout-page {
    width: 100%;
}

.wgaq-checkout-container {
    margin-bottom: 1.5em;
}

.wgaq-checkout-columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.wgaq-checkout-column {
    padding: 0 10px;
    box-sizing: border-box;
}

.wgaq-checkout-form-column {
    flex: 0 0 60%;
    max-width: 60%;
}

.wgaq-checkout-summary-column {
    flex: 0 0 40%;
    max-width: 40%;
}

.wgaq-checkout-form-container,
.wgaq-checkout-summary {
    background-color: var(--wgaq-bg-light);
    padding: 1.2em;
    border-radius: var(--wgaq-border-radius);
    border: 1px solid var(--wgaq-border-color);
}

/* Form Field Layouts - Frontend Integration */
.wgaq-form-fields {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.wgaq-form-row {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.wgaq-form-row-full {
    width: 100%;
}

.wgaq-form-row-half {
    width: 48%;
    margin-right: 4%;
}

.wgaq-form-row-half:nth-child(2n) {
    margin-right: 0;
}

.wgaq-form-row-third {
    width: 30.66%;
    margin-right: 4%;
}

.wgaq-form-row-third:nth-child(3n) {
    margin-right: 0;
}

.wgaq-form-field {
    margin-bottom: 10px;
}

.wgaq-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wgaq-form-field label .required {
    color: var(--wgaq-error-color);
    margin-left: 3px;
}

.wgaq-form-field input[type="text"],
.wgaq-form-field input[type="email"],
.wgaq-form-field input[type="tel"],
.wgaq-form-field input[type="number"],
.wgaq-form-field input[type="date"],
.wgaq-form-field select,
.wgaq-form-field textarea {
    width: calc(100% - 20px);
    padding: 8px 10px;
    border: 1px solid var(--wgaq-border-color);
    border-radius: var(--wgaq-border-radius);
    font-size: 14px;
    background-color: #fff;
}

.wgaq-form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.wgaq-form-field select {
    height: 38px;
}

.wgaq-form-field-type-checkbox label,
.wgaq-form-field-type-radio label {
    font-weight: normal;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.wgaq-form-field-type-checkbox input[type="checkbox"],
.wgaq-form-field-type-radio input[type="radio"] {
    margin-right: 8px;
}

.wgaq-checkbox-label,
.wgaq-radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.wgaq-checkbox-label input,
.wgaq-radio-label input {
    margin-right: 8px;
}

/* Modal Integration */
.wgaq-modal .wgaq-form-row-half {
    width: 100%;
    margin-right: 0;
}

@media (min-width: 600px) {
    .wgaq-modal .wgaq-form-row-half {
        width: 48%;
        float: left;
        margin-right: 4%;
    }
    
    .wgaq-modal .wgaq-form-row-half:nth-child(2n) {
        margin-right: 0;
    }
    
    .wgaq-modal .wgaq-form-row-clearfix {
        clear: both;
    }
}

/* Success Styles */
.wgaq-success-modal {
    text-align: center;
    padding: 20px;
    width: 100%;
}

.wgaq-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background-color: #46b450;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wgaq-success-icon i {
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.wgaq-modal-actions {
    margin-top: 20px;
}

.wgaq-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wgaq-checkout-form-column,
    .wgaq-checkout-summary-column {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .wgaq-checkout-summary-column {
        margin-top: 20px;
    }
    
    .wgaq-form-row-half,
    .wgaq-form-row-third {
        width: 100%;
        margin-right: 0;
    }
}

/* Success Modal */
.wgaq-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.wgaq-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wgaq-modal-content {
    position: relative;
    background-color: #fff;
    margin: 0 auto;
    padding: 1.5em;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.wgaq-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.3em;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.wgaq-modal-close:hover {
    color: var(--wgaq-text-color);
}

.wgaq-success-content {
    text-align: center;
    padding: 0.8em 0;
}

.wgaq-success-content h2 {
    font-size: 1.3em;
    margin: 0 0 0.4em;
}

.wgaq-success-content p {
    margin: 0 0 0.8em;
}

.wgaq-success-content .wgaq-button {
    margin-top: 0.8em;
}

/* Loading Overlay */
.wgaq-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wgaq-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--wgaq-primary-color, #17a2b8);
    border-radius: 50%;
    animation: wgaq-spin 1s linear infinite;
}

@keyframes wgaq-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin Quote Status */
.wgaq-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: var(--wgaq-border-radius);
    font-size: 12px;
    font-weight: 600;
}

.wgaq-status-pending {
    background-color: var(--wgaq-pending-color);
    color: var(--wgaq-pending-text);
}

.wgaq-status-processing {
    background-color: var(--wgaq-processing-color);
    color: var(--wgaq-processing-text);
}

.wgaq-status-completed {
    background-color: var(--wgaq-completed-color);
    color: var(--wgaq-completed-text);
}

.wgaq-status-rejected {
    background-color: var(--wgaq-rejected-color);
    color: var(--wgaq-rejected-text);
}

/* Theme Compatibility Overrides */
/* Ensure better compatibility with various themes and page builders */

/* Container reset for theme compatibility */
.wgaq-container {
    box-sizing: border-box;
}

.wgaq-container * {
    box-sizing: border-box;
}

/* Elementor compatibility */
.elementor-element .wgaq-container,
.elementor-widget-container .wgaq-container {
    width: 100%;
    max-width: 100%;
}

/* Divi compatibility */
.et-db #et-boc .et-l .wgaq-container,
.et-db #et-boc .et-l .wgaq-container .wgaq-button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.et-db #et-boc .et-l .wgaq-form-row label {
    padding-bottom: 0.4em;
}

/* WPBakery compatibility */
.wpb_wrapper .wgaq-container {
    width: 100%;
    max-width: 100%;
}

/* Avada compatibility */
.fusion-body .wgaq-container {
    width: 100%;
    max-width: 100%;
}

/* General theme compatibility for buttons */
.theme-twentytwenty .wgaq-button,
.theme-twentytwentyone .wgaq-button,
.theme-twentytwentytwo .wgaq-button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Form field compatibility across themes */
.wgaq-container input[type="text"],
.wgaq-container input[type="email"],
.wgaq-container input[type="tel"],
.wgaq-container textarea {
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Force responsive checkout columns */
@media (min-width: 769px) {
    .wgaq-checkout-columns {
        display: flex;
    }

    .wgaq-checkout-form-column,
    .wgaq-checkout-summary-column {
        display: block;
        float: none;
    }
}

@media (max-width: 768px) {
    .wgaq-checkout-columns {
        display: block;
    }
}

/* Fix for floating issues in various themes */
.wgaq-container::after,
.wgaq-checkout-columns::after,
.wgaq-form-row::after {
    content: "";
    display: table;
    clear: both;
}

/* Hidden Price Styling */
.wgaq-price-hidden {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--wgaq-bg-light);
    border: 1px solid var(--wgaq-border-color);
    border-radius: var(--wgaq-border-radius);
    color: var(--wgaq-primary-color);
    font-weight: 600;
    font-style: italic;
    font-size: 0.9em;
    margin: 0.5em 0;
}

/* Make Request Basket button more prominent when Add to Cart is disabled */
.woocommerce div.product form.cart .wgaq-add-to-quote-button,
.woocommerce-page div.product form.cart .wgaq-add-to-quote-button,
body.wgaq-no-add-to-cart .wgaq-add-to-quote-button {
    background-color: var(--wgaq-primary-color);
    color: var(--wgaq-text-on-primary);
    border-color: var(--wgaq-primary-color);
    padding: 0.618em 1em;
    margin: 0.5em 0;
    font-weight: 700;
    min-width: 200px;
    text-align: center;
    display: inline-block;
}

body.wgaq-no-add-to-cart .wgaq-add-to-quote-button:hover {
    background-color: var(--wgaq-primary-hover);
    color: var(--wgaq-text-on-primary);
    border-color: var(--wgaq-primary-hover);
}

/* Style Direct Inquiry button when Add to Cart is disabled */
body.wgaq-no-add-to-cart .wgaq-direct-inquiry-button {
    background-color: var(--wgaq-bg-secondary);
    color: var(--wgaq-text-secondary);
    border-color: var(--wgaq-border-color);
    padding: 0.618em 1em;
    margin: 0.5em 0 0.5em 0.5em;
    font-weight: 700;
    min-width: 150px;
    text-align: center;
    display: inline-block;
}

body.wgaq-no-add-to-cart .wgaq-direct-inquiry-button:hover {
    background-color: var(--wgaq-bg-secondary-hover);
    color: var(--wgaq-text-secondary);
    border-color: var(--wgaq-border-color);
}

/* Notification Component */
.wgaq-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    max-width: 400px;
    width: calc(100% - 40px);
    padding: 15px 20px;
    background-color: #fff;
    border-left: 4px solid #000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    z-index: 99999;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 4px;
}

.wgaq-notification.active {
    transform: translateX(-50%) translateY(0);
}

.wgaq-notification-success {
    border-left-color: #46b450;
}

.wgaq-notification-error {
    border-left-color: #dc3232;
}

.wgaq-notification-message {
    flex: 1;
    padding-right: 10px;
}

.wgaq-notification-close {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
    opacity: 0.7;
}

.wgaq-notification-close:hover {
    opacity: 1;
}

/* Form validation styling */
.wgaq-invalid-field {
    border-color: #dc3232 !important;
    box-shadow: 0 0 2px rgba(220, 50, 50, 0.8) !important;
    background-color: rgba(255, 235, 235, 0.3) !important;
}

/* Quote Summary in Sidebar - Improved Styling */
.wgaq-checkout-summary {
    position: sticky;
    top: 30px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    overflow: hidden;
}

.wgaq-checkout-summary .wgaq-section-title {
    position: relative;
    padding-bottom: 10px;
    border-bottom: none;
    margin-bottom: 15px;
}

.wgaq-checkout-summary .wgaq-section-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 50px;
    background-color: var(--wgaq-primary-color);
}

.wgaq-checkout-items {
    margin-top: 15px;
    margin-bottom: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.wgaq-checkout-item {
    display: flex;
    flex-direction: row;
    padding: 12px;
    border-bottom: 1px solid var(--wgaq-border-color);
    transition: transform 0.15s ease, background-color 0.2s ease;
    align-items: flex-start;
    margin-bottom: 0;
}

.wgaq-checkout-item:last-child {
    border-bottom: none;
}

.wgaq-checkout-item-thumbnail {
    width: 60px;
    flex: 0 0 60px;
    margin-right: 15px;
}

.wgaq-checkout-item-thumbnail img {
    width: 100%;
    height: auto;
    max-width: 60px;
    border-radius: 3px;
    border: 1px solid var(--wgaq-border-color);
    transition: transform 0.2s ease;
    display: block;
}

.wgaq-checkout-item-details {
    flex: 1;
    min-width: 0; /* Prevents flexbox from overflowing */
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 2px;
}

.wgaq-checkout-item-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px;
    color: var(--wgaq-text-color);
    line-height: 1.3;
    word-break: break-word;
}

.wgaq-checkout-item-variation {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.wgaq-variation-item {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #666;
}

.wgaq-checkout-item-quantity {
    font-size: 13px;
    color: var(--wgaq-text-secondary);
    margin-top: 2px;
    margin-bottom: 5px;
}

.wgaq-checkout-summary-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--wgaq-border-color);
}

.wgaq-checkout-summary-note {
    font-size: 13px;
    color: var(--wgaq-text-secondary);
    font-style: italic;
    text-align: center;
}

.wgaq-empty-summary-message {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--wgaq-bg-lighter);
    border-radius: var(--wgaq-border-radius);
    text-align: center;
    font-style: italic;
    color: var(--wgaq-text-light);
}

/* Make sure the summary sticks properly on mobile */
@media (max-width: 768px) {
    .wgaq-checkout-summary {
        position: static;
        margin-top: 20px;
    }
    
    .wgaq-checkout-item {
        flex-wrap: nowrap;
    }
    
    .wgaq-checkout-item-thumbnail {
        width: 50px;
        flex: 0 0 50px;
    }
    
    .wgaq-checkout-item-thumbnail img {
        max-width: 50px;
    }
}

/* Enhanced loading spinner */
.wgaq-loading-spinner {
    box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.1);
}

/* Add scrollbar styling */
.wgaq-checkout-items::-webkit-scrollbar {
    width: 6px;
}

.wgaq-checkout-items::-webkit-scrollbar-track {
    background: var(--wgaq-bg-lighter);
    border-radius: 3px;
}

.wgaq-checkout-items::-webkit-scrollbar-thumb {
    background-color: var(--wgaq-border-color);
    border-radius: 3px;
}

/* Product Info Styles */
.wgaq-product-info {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.wgaq-product-info-inner {
    display: flex;
    align-items: flex-start;
}

.wgaq-product-image {
    flex: 0 0 80px;
    margin-right: 15px;
}

.wgaq-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.wgaq-product-details {
    flex: 1;
}

.wgaq-product-details h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.wgaq-product-sku {
    font-size: 13px;
    color: #666;
    margin: 0 0 5px;
}

.wgaq-product-variations {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin: 5px 0;
}

.wgaq-product-description {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.wgaq-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.wgaq-loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--wgaq-primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: wgaq-spin 1s linear infinite;
    margin: 10px auto;
}

.wgaq-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wgaq-loading-overlay .wgaq-loading-spinner {
    width: 50px;
    height: 50px;
}

#wgaq-request-success-modal{
    max-width: 100%;
}

@keyframes wgaq-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notice styles */
.wgaq-notices-wrapper {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: auto;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wgaq-notices-wrapper .woocommerce-success,
.wgaq-notices-wrapper .woocommerce-error,
.wgaq-notices-wrapper .woocommerce-info {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 100%;
}

.wgaq-notices-wrapper .woocommerce-success {
    background-color: #f7f6f7;
    color: #515151;
    border-left: 4px solid #4caf50;
}

.wgaq-notices-wrapper .woocommerce-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #f44336;
}

.wgaq-notices-wrapper .woocommerce-info {
    background-color: #e7f5ff;
    color: #0c5460;
    border-left: 4px solid #0091d9;
}

.wgaq-notice-message {
    flex-grow: 1;
    padding-right: 10px;
}

.wgaq-notice-dismiss {
    background: none;
    border: none;
    padding: 0 0 0 10px;
    margin: 0;
    cursor: pointer;
    color: inherit;
    font-size: 18px;
    line-height: 1;
}

/* Make sure notices are readable on mobile */
@media screen and (max-width: 480px) {
    .wgaq-notices-wrapper {
        width: 90%;
    }
    
    .wgaq-notices-wrapper .woocommerce-success,
    .wgaq-notices-wrapper .woocommerce-error,
    .wgaq-notices-wrapper .woocommerce-info {
        min-width: 0;
        width: 100%;
    }
}

/* Variation item styling */
.wgaq-variation-item {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #666;
}

.wgaq-mini-cart-item-variation,
.wgaq-basket-item-variation,
.wgaq-checkout-item-variation {
    margin-bottom: 8px;
    color: #777;
    font-size: 0.9em;
}

.wgaq-mini-cart-item-variation span,
.wgaq-basket-item-variation span,
.wgaq-checkout-item-variation span {
    display: inline-block;
    padding: 2px 5px;
    background-color: #f7f7f7;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* Make variation attributes stand out a bit more */
.wgaq-mini-cart-item-details h4,
.wgaq-basket-item-details h3,
.wgaq-checkout-item-title {
    margin-bottom: 5px;
}

.wgaq-mini-cart-item-sku,
.wgaq-basket-item-sku {
    margin-top: 5px;
    color: #999;
    font-size: 0.9em;
}

/* Media queries for mini cart and backdrop */
@media (max-width: 480px) {
    .wgaq-mini-cart-offcanvas {
        width: 85%;
        right: -85%;
    }
    
    .wgaq-mini-cart-backdrop {
        /* Higher z-index to ensure it's above any site elements but below the cart */
        z-index: 999990;
    }
}

@media (max-width: 768px) {
    .wgaq-mini-cart-offcanvas {
        width: 300px;
        right: -300px;
    }
}

/* File Upload Styling */
.wgaq-file-upload-wrapper {
    margin-bottom: 15px;
}

.wgaq-file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 25px;
    border: 2px dashed var(--wgaq-border-color, #ddd);
    border-radius: var(--wgaq-border-radius, 4px);
    background-color: #f8f8f8;
    transition: 0.2s;
    text-align: center;
    cursor: pointer;
}

.wgaq-file-drop-area:hover,
.wgaq-file-drop-area.is-active {
    background-color: rgba(0, 0, 0, 0.03);
    border-color: var(--wgaq-primary-color, #a46497);
}

.wgaq-file-msg {
    color: var(--wgaq-primary-color, #a46497);
    font-weight: 600;
    margin-right: 5px;
    transition: 0.2s;
}

.wgaq-file-or {
    color: var(--wgaq-text-color, #666);
    margin: 0 5px;
}

.wgaq-file-drop-msg {
    color: var(--wgaq-text-color, #666);
    font-style: italic;
}

.wgaq-file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

.wgaq-file-input:focus {
    outline: none;
}

.wgaq-file-preview {
    margin-top: 10px;
    display: none;
}

.wgaq-file-preview.has-file {
    display: block;
    padding: 10px;
    background-color: #f8f8f8;
    border: 1px solid var(--wgaq-border-color, #ddd);
    border-radius: var(--wgaq-border-radius, 4px);
}

.wgaq-file-name {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 5px;
    background-color: #fff;
    border: 1px solid var(--wgaq-border-color, #ddd);
    border-radius: var(--wgaq-border-radius, 4px);
}

.wgaq-file-name:last-child {
    margin-bottom: 0;
}

.wgaq-file-icon {
    color: var(--wgaq-primary-color, #a46497);
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.wgaq-file-text {
    flex: 1;
    max-width: calc(100% - 40px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wgaq-file-remove {
    color: #f44336;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wgaq-field-description {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
} 

/* ========================================
   Toast Notifications
   ======================================== */

   /* Toast Container */
.wgaq-toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999999; /* Erhöht von 99999 auf 9999999 */
    pointer-events: none;
}

/* Toast Base Styles */
.wgaq-toast {
    display: flex;
    align-items: stretch; /* Geändert von center zu stretch */
    min-width: 300px;
    max-width: 500px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(-400px);
    transition: transform 0.5s ease-in-out; /* Langsamer und sanfter */
    min-height: 50px; /* Mindesthöhe hinzugefügt */
}

.wgaq-toast.show {
    transform: translateX(0);
}

/* Icon Container */
.wgaq-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    min-height: 50px; /* min-height statt height */
    flex-shrink: 0;
}

/* Message Content */
.wgaq-toast-content {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    align-items: center; /* Zentriert den Text vertikal */
}

.wgaq-toast-message {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
}

/* Close Button */
.wgaq-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-height: 30px;
    margin-right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    align-self: center; /* Zentriert das X vertikal */
}

.wgaq-toast-close:hover {
    opacity: 1;
}

.wgaq-toast-close svg {
    width: 18px;
    height: 18px;
}

/* Success Toast */
.wgaq-toast-success .wgaq-toast-icon {
    background: #4CAF50;
    color: white;
}

.wgaq-toast-success {
    border-left: 4px solid #4CAF50;
}

/* Error Toast */
.wgaq-toast-error .wgaq-toast-icon {
    background: #f44336;
    color: white;
}

.wgaq-toast-error {
    border-left: 4px solid #f44336;
}

/* Warning Toast */
.wgaq-toast-warning .wgaq-toast-icon {
    background: #ff9800;
    color: white;
}

.wgaq-toast-warning {
    border-left: 4px solid #ff9800;
}

/* Info Toast */
.wgaq-toast-info .wgaq-toast-icon {
    background: #2196F3;
    color: white;
}

.wgaq-toast-info {
    border-left: 4px solid #2196F3;
}

.wgaq-grouped-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 10px;
    margin: 6px 0;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.wgaq-grouped-info strong {
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .wgaq-toast-container {
        left: 10px;
        right: 10px;
    }
    
    .wgaq-toast {
        min-width: auto;
        max-width: none;
        width: calc(100% - 20px);
    }
}

/* Dark theme support (optional) */
@media (prefers-color-scheme: dark) {
    .wgaq-toast {
        background: #2b2b2b;
    }
    
    .wgaq-toast-message {
        color: #fff;
    }
    
    .wgaq-toast-close {
        color: #fff;
    }
}