/* ── Button row: Add to Basket + Order a Sample side by side ────────────────── */

/*
 * Elementor wraps the submit button in .e-atc-qty-button-holder.
 * Our sample button is the next sibling. We make the form a flex container
 * so both sit on the same row, then let each button fill equal space.
 */

.elementor-add-to-cart form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

/* The calculator and any other non-button children span full width */
.elementor-add-to-cart form.cart > *:not(.e-atc-qty-button-holder):not(.wcsc-sample-btn) {
    flex: 0 0 100%;
}

/* Button holder and sample button sit side by side */
.elementor-add-to-cart form.cart .e-atc-qty-button-holder {
    flex: 1 1 0;
    min-width: 0;
}

.elementor-add-to-cart form.cart .e-atc-qty-button-holder .single_add_to_cart_button {
    width: 100%;
    margin: 0;
}

.wcsc-sample-btn.button {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: transparent !important;
    color: inherit;
    border: 2px solid currentColor;
    font-weight: 600;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.wcsc-sample-btn.button:hover {
    background: transparent !important;
    opacity: 0.8;
}

/* ── Responsive: stack on narrow screens ────────────────────────────────────── */
@media (max-width: 480px) {
    .elementor-add-to-cart form.cart .e-atc-qty-button-holder,
    .wcsc-sample-btn.button {
        flex: 0 0 100%;
    }
}

/* ── Per m² price label ─────────────────────────────────────────────────────── */

.wcsc-per-sqm {
    font-size: 0.75em;
    font-weight: 400;
    color: #777;
    letter-spacing: 0.02em;
}

/* ── WC Size Calculator ─────────────────────────────────────────────────────── */

.wcsc-calculator {
    margin: 24px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.wcsc-calculator__title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wcsc-calculator__row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px 24px;
}

/* Labels */
.wcsc-calculator__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Width buttons */
.wcsc-width-buttons {
    display: flex;
    gap: 6px;
}

.wcsc-width-btn {
    padding: 8px 18px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 3px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1;
}

.wcsc-width-btn:hover {
    border-color: #999;
}

.wcsc-width-btn.active {
    border-color: #f5a623;
    background: #fff;
    color: #222;
}

/* Multiply symbol */
.wcsc-calculator__multiply {
    font-size: 1.4rem;
    font-weight: 300;
    color: #aaa;
    margin-bottom: 8px;
    line-height: 1;
    align-self: flex-end;
}

/* Length input */
.wcsc-length-input {
    display: block;
    width: 120px;
    padding: 8px 10px;
    border: 2px solid #ccc;
    border-radius: 3px;
    font-size: 0.95rem;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.wcsc-length-input::-webkit-outer-spin-button,
.wcsc-length-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.wcsc-length-input:focus {
    outline: none;
    border-color: #f5a623;
}

/* Totals */
.wcsc-calculator__totals {
    margin-left: auto;
    text-align: right;
}

.wcsc-totals__row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 12px;
    line-height: 1.8;
}

.wcsc-totals__label {
    font-size: 0.85rem;
    color: #333;
}

.wcsc-totals__label--light {
    color: #777;
}

.wcsc-totals__value {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 80px;
}

.wcsc-totals__value--light {
    font-size: 0.95rem;
    font-weight: 400;
    color: #777;
}

/* Validation error highlight */
.wcsc-calculator.wcsc-error .wcsc-length-input {
    border-color: #e2401c;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wcsc-calculator__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .wcsc-calculator__multiply {
        display: none;
    }

    .wcsc-calculator__totals {
        margin-left: 0;
        text-align: left;
        width: 100%;
        border-top: 1px solid #e5e5e5;
        padding-top: 12px;
    }

    .wcsc-totals__row {
        justify-content: space-between;
    }
}

/* ── Installation option ─────────────────────────────────────────────────────── */

.wcsc-installation {
    margin: 0;
    padding: 0;
}

.wcsc-installation__label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.wcsc-installation__label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
/* ── Cutting surcharge row ───────────────────────────────────────────────────── */

.wcsc-totals__label--surcharge,
.wcsc-totals__value--surcharge {
    color: #b45309; /* amber — signals an extra cost without being alarming */
}
