#qcalc-quote-builder {
    text-align: center;
    padding: 30px;
    font-family: inherit;
    color: inherit;
}

.yqb-response-block {
    margin: 20px auto;
    max-width: 820px; /* prevent super wide buttons on large screens */
}

.yqb-response-img {
    max-width: 100%;
    max-height: 200px;
    display: block;
    margin: 0 auto 10px;
}

/* === BUTTON STYLING (enforced to override Elementor) === */
.elementor-button-wrapper {
    display: block; /* each wrapper spans the container */
    width: 100%;
    margin: 10px 0;
}

.elementor-button-wrapper .yqb-response-btn,
.elementor-button-wrapper .yqb-back-btn {
    display: inline-flex;         /* center multi-line text */
    align-items: center;
    justify-content: center;
    width: 100%;                  /* fill wrapper width */
    max-width: 100%;
    padding: 0.9em 1.1em;
    font-size: 1em;
    font-family: inherit !important;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    background-color: #6cd0cd !important; /* solid turquoise */
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    line-height: 1.35;
    white-space: normal !important;  /* allow wrapping */
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Hover Effect */
.elementor-button-wrapper .yqb-response-btn:hover,
.elementor-button-wrapper .yqb-back-btn:hover {
    background-color: #5cbdbb !important;
    transform: scale(1.03);
    color: #ffffff !important;
}

/* === BACK BUTTON VARIATION === */
.yqb-back-btn {
    margin-top: 30px;
}

/* === INFO BOXES === */
.yqb-welcome-box,
.yqb-final-box {
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

/* === FORM FIELDS === */
.yqb-contact-form input,
.yqb-contact-form textarea {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
    padding: 10px;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.yqb-contact-form textarea {
    height: 100px;
}

/* === THANK YOU BOX === */
.yqb-thankyou {
    font-size: 20px;
    padding: 20px;
    background: #e7f7e7;
    border-left: 4px solid #28a745;
    margin-top: 30px;
    text-align: center;
    font-family: inherit;
    color: inherit;
}

/* === SUMMARY LIST === */
.yqb-summary ul {
    text-align: left;
    max-width: 600px;
    margin: auto;
    padding: 0;
}

.yqb-summary li {
    margin-bottom: 15px;
}

/* === NUMBER INPUT SPINNERS === */
/* Re-enable native arrows */
input[type=number] {
    -moz-appearance: auto;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button;
    margin: 0;
    opacity: 1;
    height: auto;
}

/* === HELP ICON === */
.yqb-help-icon {
    display:inline-block;
    margin-left:6px;
    cursor:help;
    color:#555;
}
.yqb-help-icon:hover {
    color:#0073aa;
}

/* === RESPONSIVE SERVICE TABLES === */
.yqb-service-table {
    width: 100%;
    border-collapse: collapse;
}
.yqb-service-table th,
.yqb-service-table td {
    padding: 8px;
    border: 1px solid #e5e7eb;
}

/* Mobile view: stack cells */
@media (max-width: 720px) {
    .yqb-service-table thead {
        display: none; /* hide header */
    }
    .yqb-service-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        padding: 10px;
        background: #f9fafb;
    }
    .yqb-service-table td {
        display: block;
        text-align: center;
        border: none;
        padding: 6px 0;
    }
    .yqb-service-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
        color: #374151;
    }
    .yqb-service-table .srv-hours {
        width: 70%;
        max-width: 220px;
        margin: 0 auto;
        text-align: center;
    }
    .yqb-service-table tfoot td {
        display: block;
        text-align: center;
        border: none;
        padding: 6px 0;
    }
}

/* --- Responsive Buttons: adjustments by screen size --- */
@media (min-width: 640px) {
    #qcalc-quote-builder .elementor-button-wrapper {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    #qcalc-quote-builder {
        padding: 16px;
    }
    #qcalc-quote-builder .elementor-button-wrapper .yqb-response-btn,
    #qcalc-quote-builder .elementor-button-wrapper .yqb-back-btn {
        font-size: 16px;
        padding: 0.95em 1em;
    }
}

/* tighter spacing between stacked buttons */
#qcalc-quote-builder .elementor-button-wrapper + .elementor-button-wrapper {
    margin-top: 8px;
}

/* =========================================================================
   Q-CALC v3 – DATA FORM STEP STYLES
   ========================================================================= */

/* Main container for both modes */
#qcalc-quote-builder {
    font-family: inherit;
    color: inherit;
    max-width: 860px;
    margin: 0 auto;
    padding: 20px;
}

/* Step header */
.qcalc-step-header {
    margin-bottom: 24px;
    border-bottom: 2px solid #6cd0cd;
    padding-bottom: 12px;
}
.qcalc-step-title {
    margin: 0 0 6px;
    font-size: 1.5em;
    color: #1a1a2e;
}
.qcalc-step-desc {
    margin: 0;
    color: #555;
    font-size: 0.95em;
}

/* Field grid */
.qcalc-form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 10px;
}

/* Field wrapper widths */
.qcalc-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;
}
.qcalc-field-wrap.full   { width: 100%; }
.qcalc-field-wrap.half   { width: calc(50% - 9px); }
.qcalc-field-wrap.third  { width: calc(33.333% - 12px); }

@media (max-width: 600px) {
    .qcalc-field-wrap.half,
    .qcalc-field-wrap.third { width: 100%; }
}

/* Labels */
.qcalc-field-wrap label {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    margin-bottom: 2px;
}
.qcalc-field-wrap .req {
    color: #cc0000;
    margin-left: 2px;
}

/* Inputs */
.qcalc-field-wrap input[type="text"],
.qcalc-field-wrap input[type="email"],
.qcalc-field-wrap input[type="tel"],
.qcalc-field-wrap input[type="number"],
.qcalc-field-wrap input[type="date"],
.qcalc-field-wrap select,
.qcalc-field-wrap textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 1em;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.qcalc-field-wrap input:focus,
.qcalc-field-wrap select:focus,
.qcalc-field-wrap textarea:focus {
    outline: none;
    border-color: #6cd0cd;
    box-shadow: 0 0 0 2px rgba(108,208,205,0.2);
}

/* Postcode – uppercase */
.qcalc-field-wrap input[name*="postcode"] {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Radio group */
.qcalc-radio-group,
.qcalc-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qcalc-radio-label,
.qcalc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-weight: 400;
}
.qcalc-radio-label:hover,
.qcalc-checkbox-label:hover {
    border-color: #6cd0cd;
    background: #f0fbfb;
}
.qcalc-radio-label input,
.qcalc-checkbox-label input {
    accent-color: #6cd0cd;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* kWh Slider */
.qcalc-kwh-slider input[type="range"] {
    width: 100%;
    accent-color: #6cd0cd;
    height: 6px;
    cursor: pointer;
}
.qcalc-kwh-display {
    text-align: center;
    margin-top: 8px;
}

/* Help text */
.qcalc-help {
    font-size: 0.8em;
    color: #777;
    margin: 0;
    line-height: 1.4;
}

/* Heading field */
.qcalc-heading-field {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 5px;
}
.qcalc-field-heading {
    margin: 0 0 4px;
    font-size: 1.1em;
    color: #2271b1;
}

/* Button row */
.qcalc-btn-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Generic button base */
.qcalc-btn {
    padding: 10px 22px;
    font-size: 1em;
    font-family: inherit;
    font-weight: 700;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
/* Next/Submit button */
.qcalc-btn.yqb-response-btn {
    background: #6cd0cd;
    color: #fff;
    margin: 0 !important;
    width: auto !important;
}
.qcalc-btn.yqb-response-btn:hover {
    background: #5cbdbb;
    transform: scale(1.02);
}
/* Back button */
.qcalc-btn.yqb-back-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    margin: 0 !important;
    width: auto !important;
}
.qcalc-btn.yqb-back-btn:hover {
    background: #e8e8e8;
}

/* Validation errors */
.qcalc-validation-errors {
    background: #fff2f2;
    border: 1px solid #cc0000;
    border-radius: 4px;
    padding: 10px 15px;
    color: #cc0000;
    font-size: 0.9em;
    margin-top: 10px;
}
.qcalc-validation-errors ul {
    margin: 0;
    padding-left: 18px;
}

/* Progress indicator */
.qcalc-progress {
    background: #f0fbfb;
    border: 1px solid #6cd0cd;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85em;
    color: #2271b1;
    display: inline-block;
}

/* Final form */
.qcalc-final-contact-form {
    max-width: 620px;
    margin: 0 auto;
}
.qcalc-final-contact-form .qcalc-form-fields {
    margin-bottom: 0;
}

/* Spinner */
.qcalc-spinner {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Thank you */
.yqb-thankyou {
    padding: 30px;
    background: #e7f7e7;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    text-align: center;
}
.yqb-thankyou h3 { margin-top: 0; color: #155724; }

/* Error state */
.qcalc-error {
    padding: 15px 20px;
    background: #fff2f2;
    border: 1px solid #cc0000;
    border-radius: 4px;
    color: #cc0000;
}

/* Admin: enquiry status badges */
.qcalc-status-new      { background:#d63638; color:#fff; }
.qcalc-status-contacted{ background:#dba617; color:#fff; }
.qcalc-status-quoted   { background:#007cba; color:#fff; }
.qcalc-status-won      { background:#00a32a; color:#fff; }
.qcalc-status-lost     { background:#888; color:#fff; }


/* ── Easy PV Inline Block ───────────────────────────────────────────── */
.qcalc-epv-inline-result {
    border: 1px solid #d1faf8;
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0 20px;
    box-shadow: 0 2px 8px rgba(26,107,103,0.08);
}
.qcalc-epv-inline-result table th {
    font-weight: 600;
    font-size: 12px;
}
.qcalc-epv-inline-loading {
    margin: 16px 0;
}
