/* ============================================================
   Energiewest Stroomwijzer — v1
   Brand colours pulled from energiewest.be Elementor kit:
     primary navy    #26336E
     secondary/accent #E8D300 (yellow)
     text             #5E585C
     light bg         #FAFAFA
   Typography (set by Elementor kit, inherited via font-family: inherit):
     headings → Poppins
     body     → Open Sans (16px)
   Adjust the CSS custom properties below to retune the palette.
   ============================================================ */

:root {
    --ews-primary:      #E8D300;
    --ews-primary-dark: #C4B100;
    --ews-navy:         #26336E;
    --ews-green:        #7AB929;
    --ews-blue:         #26336E;
    --ews-bluedark:     #26336E;
    --ews-gray:         #9CA3AF;
    --ews-bg:           #ffffff;
    --ews-border:       #e5e7eb;
    --ews-text:         #5E585C;
    --ews-muted:        #8A8488;
    --ews-radius:       14px;
    --ews-shadow:       0 4px 32px rgba(0,0,0,.09);
}

/* ── Wrapper ───────────────────────────────────────────────── */
.ews-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 36px;
    background: var(--ews-bg);
    border-radius: var(--ews-radius);
    box-shadow: var(--ews-shadow);
    font-family: inherit;
    color: var(--ews-text);
    box-sizing: border-box;
}

/* ══ TOP SECTION: sliders + flow diagram ══════════════════════ */
.ews-top {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: center;
    margin-bottom: 40px;
}

/* ── Slider column ─────────────────────────────────────────── */
.ews-sliders {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ews-field:not(:last-child) {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ews-border);
}

.ews-field-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Icon circle */
.ews-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EAEBF3;
    border: 2px solid var(--ews-navy);
    color: var(--ews-navy);
    margin-top: 2px;
}
.ews-icon svg {
    width: 44px;
    height: 44px;
}
.ews-icon i {
    font-size: 20px;
    line-height: 1;
}
/* Match colours from the flow diagram */
.ews-icon--home    { background: #EAEBF3; border-color: var(--ews-navy);   color: var(--ews-navy); }
.ews-icon--solar   { background: #FAF3CC; border-color: #D4BD00;           color: #D4BD00; }
.ews-icon--battery { background: #EAEBF3; border-color: var(--ews-navy);   color: var(--ews-navy); }
.ews-icon--ev      { background: #EFF7E1; border-color: var(--ews-green);  color: var(--ews-green); }

.ews-field-controls {
    flex: 1;
    min-width: 0;
}

.ews-field-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 8px;
}

.ews-field-header label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ews-navy);
    cursor: default;
    line-height: 1.3;
}

.ews-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ews-navy);
    white-space: nowrap;
}

.ews-range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--ews-muted);
    margin-top: 4px;
}

.ews-ev-extra,
.ews-household-extra {
    font-size: 1rem;
    color: var(--ews-muted);
    margin-top: 5px;
}
.ews-ev-extra strong,
.ews-household-extra strong {
    color: var(--ews-navy);
    font-weight: 700;
    margin-left: 4px;
}

/* ── Range input ───────────────────────────────────────────── */
.ews-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: var(--ews-border);
    outline: none;
    cursor: pointer;
}

.ews-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ews-navy);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--ews-navy);
    transition: box-shadow .15s;
}
.ews-wrap input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 5px rgba(38,51,110,.22);
}

.ews-wrap input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ews-navy);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--ews-navy);
    cursor: pointer;
}
.ews-wrap input[type="range"]::-moz-range-track {
    height: 5px;
    border-radius: 3px;
    background: var(--ews-border);
}
.ews-wrap input[type="range"]:focus-visible {
    outline: 2px solid var(--ews-primary);
    outline-offset: 4px;
}

/* ── Flow diagram column ───────────────────────────────────── */
.ews-flow {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FA icons inside SVG foreignObject nodes */
.ews-flow-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ews-flow-icon i { line-height: 1; }
.ews-flow-icon--stacked {
    flex-direction: column;
    gap: 4px;
}
#ews-flow-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
}

/* ══ RESULTS: 3 donut charts ══════════════════════════════════ */
.ews-results {
    border-top: 1px solid var(--ews-border);
    padding-top: 36px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.ews-donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ews-chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ews-navy);
    margin: 0 0 14px;
}

/* Donut SVG */
.ews-donut-area {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 16px;
}
.ews-donut-svg {
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
}

/* r=60, C=377 */
.ews-d-bg {
    fill: none;
    stroke: var(--ews-border);
    stroke-width: 22;
}
.ews-d-seg {
    fill: none;
    stroke-width: 22;
    stroke-linecap: butt;
    transition: stroke-dasharray .5s cubic-bezier(.4,0,.2,1),
                stroke-dashoffset .5s cubic-bezier(.4,0,.2,1);
}
.ews-d-green    { stroke: var(--ews-green); }
.ews-d-blue     { stroke: var(--ews-blue); }
.ews-d-bluedark { stroke: var(--ews-bluedark); }
.ews-d-gray     { stroke: var(--ews-gray); }

.ews-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.ews-donut-pct {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ews-navy);
    line-height: 1;
}

/* ── Legend ────────────────────────────────────────────────── */
.ews-legend {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    width: max-content;
    max-width: 100%;
}
.ews-legend li {
    display: grid;
    grid-template-columns: 14px 44px 1fr;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--ews-muted);
    margin-bottom: 4px;
    text-align: left;
}
.ews-legend li span:nth-child(2) {
    font-weight: 700;
    color: var(--ews-text);
}
.ews-dot {
    flex-shrink: 0;
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.ews-dot--green    { background: var(--ews-green); }
.ews-dot--blue     { background: var(--ews-blue); }
.ews-dot--bluedark { background: var(--ews-bluedark); }
.ews-dot--gray     { background: var(--ews-gray); }

.ews-ev-note {
    font-size: 0.95rem;
    color: var(--ews-muted);
    margin: 8px 0 0;
    font-style: italic;
}

/* ── Disclaimer ─────────────────────────────────────────────── */
.ews-disclaimer {
    font-size: 0.95rem;
    color: var(--ews-muted);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ── CTA ────────────────────────────────────────────────────── */
.ews-cta { display: flex; justify-content: center; margin-top: 8px; }

/* Lock the button styling to the Energiewest palette regardless of
   whatever Elementor global colors are set on the site.
   Yellow background + navy text for the strongest brand-accurate CTA. */
.ews-cta .elementor-button,
.ews-cta a.elementor-button {
    background-color: var(--ews-primary);
    border: 2px solid var(--ews-primary);
    color: var(--ews-navy);
    fill: var(--ews-navy);
    font-weight: 700;
    letter-spacing: .02em;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.ews-cta .elementor-button .elementor-button-text,
.ews-cta .elementor-button i {
    color: var(--ews-navy);
}
.ews-cta .elementor-button:hover,
.ews-cta .elementor-button:focus,
.ews-cta a.elementor-button:hover,
.ews-cta a.elementor-button:focus {
    background-color: var(--ews-primary-dark);
    border-color: var(--ews-primary-dark);
    color: var(--ews-navy);
    box-shadow: 0 6px 18px rgba(232,211,0,.35);
}
.ews-cta .elementor-button:hover .elementor-button-text,
.ews-cta .elementor-button:hover i,
.ews-cta .elementor-button:focus .elementor-button-text,
.ews-cta .elementor-button:focus i {
    color: var(--ews-navy);
}
.ews-cta .elementor-button:focus-visible {
    outline: 3px solid rgba(38,51,110,.35);
    outline-offset: 2px;
}

/* Button content layout: text first, icon after, with breathing room. */
.ews-cta .elementor-button-content-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.ews-cta .elementor-button-icon {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.ews-cta .elementor-button-icon i {
    font-size: 0.9em;
}

/* ══ SUMMARY CARD (contact page) ═════════════════════════════ */
.ews-summary {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: var(--ews-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(38,51,110,.13);
    margin-bottom: 32px;
    border: none;
}

/* Left zone — inputs */
.ews-summary-inputs {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-left: 5px solid var(--ews-primary);
    padding: 22px 28px;
    box-sizing: border-box;
}

.ews-summary-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ews-navy);
    margin: 0 0 14px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

.ews-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px 20px;
}

.ews-summary-item  { display: flex; flex-direction: column; gap: 2px; }
.ews-summary-label {
    font-size: 0.7rem;
    color: var(--ews-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.35;
}
.ews-summary-val   {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ews-text);
    line-height: 1.3;
}

/* Right zone — results panel */
.ews-summary-results {
    background: var(--ews-navy);
    display: flex;
    align-items: center;
    gap: 0;
    padding: 22px 32px;
    flex-shrink: 0;
}

.ews-summary-result-item {
    text-align: center;
    padding: 0 24px;
}

.ews-summary-result-pct {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--ews-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.ews-summary-result-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.75);
    line-height: 1.3;
}

.ews-summary-result-divider {
    width: 1px;
    height: 48px;
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
}

/* Responsive summary */
@media (max-width: 580px) {
    .ews-summary { flex-direction: column; }
    .ews-summary-inputs { border-left: none; border-top: 5px solid var(--ews-primary); }
    .ews-summary-results { justify-content: center; padding: 20px; }
    .ews-summary-result-pct { font-size: 2rem; }
}

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 720px) {
    .ews-top {
        grid-template-columns: 1fr;
    }
    .ews-flow {
        order: -1; /* diagram above sliders on mobile */
    }
    #ews-flow-svg { max-width: 220px; }
    .ews-results {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .ews-donut-wrap { max-width: 280px; margin: 0 auto; width: 100%; }
}
.form-shortcode .wpcf7-form{
    max-width: 1120px;
    margin: 0 auto;
}
@media (max-width: 480px) {
    .ews-wrap { padding: 24px; }
    .ews-field-header { flex-direction: column; gap: 1px; }
}
@media only screen and (max-width: 767px){
    .elementor-shortcode {
        margin: 0 auto;
    }
}
