/* ─── WooCommerce Product Configurator ────────────────────────── */
/* Theme colors: Primary Blue #4DA8DA, Dark Navy #203647, Accent Navy #2A455A */

/* ─── Mode toggle (Standard / Custom) ─────────────────────────── */

.wpc-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border: 2px solid #4DA8DA;
    border-radius: 8px;
    overflow: hidden;
    max-width: 640px;
}

.wpc-mode-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    background: #fff;
    color: #203647;
    transition: background 0.2s, color 0.2s;
    line-height: 1.3;
}

.wpc-mode-btn:not(:last-child) {
    border-right: 2px solid #4DA8DA;
}

.wpc-mode-btn:hover {
    background: #e8f4fb;
}

.wpc-mode-btn.wpc-mode-active {
    background: #4DA8DA;
    color: #fff;
}

.wpc-mode-btn.wpc-mode-active:hover {
    background: #3a93c2;
}

/* ─── Configurator container ──────────────────────────────────── */

.wpc-configurator {
    max-width: 640px;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
}

.wpc-title {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: #203647;
}

.wpc-subtitle {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #203647;
}

/* ─── Form layout ─────────────────────────────────────────────── */

.wpc-field-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wpc-field {
    flex: 1 1 100%;
}

.wpc-field-half {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 200px;
}

.wpc-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2A455A;
}

.wpc-field label .required {
    color: #c00;
}

.wpc-field input,
.wpc-field select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #F7F8F8;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wpc-field input:focus,
.wpc-field select:focus {
    outline: none;
    border-color: #4DA8DA;
    box-shadow: 0 0 0 2px rgba(77, 168, 218, 0.2);
    background: #fff;
}

.wpc-field select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Matched product confirmation ───────────────────────────── */

.wpc-matched-product {
    margin-top: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #065f46;
    font-weight: 500;
}

.wpc-matched-product::before {
    content: "\2713\0020";
    font-weight: 700;
}

/* ─── Treatments section ──────────────────────────────────────── */

.wpc-treatments {
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.wpc-treatments .wpc-subtitle {
    flex: 1 1 100%;
    margin-bottom: 0.25rem;
}

/* ─── Certification options ───────────────────────────────────── */

.wpc-certifications {
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    flex-direction: column;
}

.wpc-certifications .wpc-subtitle {
    margin-bottom: 0.5rem;
}

.wpc-cert-option {
    flex: 1 1 100%;
}

.wpc-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2A455A;
    line-height: 1.45;
}

.wpc-radio-label input[type="radio"] {
    flex-shrink: 0;
    margin-top: 0.2rem;
    accent-color: #4DA8DA;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.wpc-radio-label strong {
    color: #203647;
    font-weight: 700;
}

/* ─── Pricing breakdown ───────────────────────────────────────── */

.wpc-pricing {
    margin: 1.25rem 0;
    padding: 1rem;
    background: #F7F8F8;
    border: 1px solid #d8dee4;
    border-radius: 8px;
}

.wpc-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.wpc-price-table td {
    padding: 0.55rem 0.75rem;
    color: #2A455A;
    vertical-align: middle;
}

.wpc-price-table tbody tr:nth-child(even) td {
    background: #eff2f5;
    border-radius: 4px;
}

.wpc-price-table .wpc-price-label {
    font-weight: 500;
}

.wpc-price-table .wpc-price-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
}

.wpc-price-table tfoot {
    border-top: 2px solid #4DA8DA;
}

.wpc-total-row td {
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #203647;
}

/* ─── Messages ────────────────────────────────────────────────── */

.wpc-message {
    margin: 0.75rem 0;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.wpc-msg-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.wpc-msg-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.wpc-message .wpc-view-cart {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 600;
    color: #4DA8DA;
    text-decoration: underline;
}

/* ─── Buttons ─────────────────────────────────────────────────── */

.wpc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

.wpc-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.8rem 1.75rem !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    border-radius: 8px !important;
    border: 2px solid transparent !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box;
}

.wpc-btn:hover:not(:disabled):not([disabled]) {
    box-shadow: 0 2px 8px rgba(77, 168, 218, 0.28);
    transform: translateY(-1px);
    text-decoration: none;
}

.wpc-btn:active:not(:disabled):not([disabled]) {
    transform: translateY(0);
    box-shadow: none;
}

.wpc-btn:disabled,
.wpc-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Calculate Price — pale blue outlined */
.wpc-btn-outline {
    background: #fff !important;
    color: #4DA8DA !important;
    border-color: #4DA8DA !important;
}

.wpc-btn-outline:hover:not(:disabled) {
    background: #4DA8DA !important;
    color: #fff !important;
}

/* Add to Cart — solid pale blue */
.wpc-btn-primary {
    background: linear-gradient(180deg, #4DA8DA 0%, #3a93c2 100%) !important;
    color: #fff !important;
    border-color: #4DA8DA !important;
}

.wpc-btn-primary:hover:not(:disabled):not([disabled]) {
    background: linear-gradient(180deg, #3a93c2 0%, #2f7da6 100%) !important;
    border-color: #3a93c2 !important;
}

/* Add to Quote — pale blue outlined, slightly lighter feel */
.wpc-btn-quote {
    background: #e8f4fb !important;
    color: #2A455A !important;
    border-color: #4DA8DA !important;
}

.wpc-btn-quote:hover:not(:disabled):not([disabled]) {
    background: #4DA8DA !important;
    color: #fff !important;
    border-color: #4DA8DA !important;
}

.wpc-btn-quote.wpc-btn-loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* ─── Responsive ──────────────────────────────────────────────── */

@media (max-width: 480px) {
    .wpc-configurator {
        padding: 1rem;
    }

    .wpc-field-half {
        flex: 1 1 100%;
    }

    .wpc-mode-btn {
        font-size: 0.8125rem;
        padding: 0.6rem 0.5rem;
    }
}
