/**
 * eGateweb — Offerte aanvragen wizard.
 * Colours come from the central tokens (:root --eg-*), so it re-skins per site.
 */

/* ---------- Compact centred hero ---------- */
/* Top padding leaves room for the breadcrumbs that float over the hero top. */
.eg-ohero { padding: 62px 0 8px; text-align: center; }
.eg-ohero__eyebrow {
    display: inline-block;
    padding: 7px 16px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--eg-brand-soft);
    color: var(--eg-brand);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.eg-ohero__title {
    margin: 0 auto 14px;
    max-width: 18ch;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    color: var(--eg-heading);
}
.eg-ohero__title .eg-hl { color: var(--eg-brand); }
.eg-ohero__text {
    max-width: 560px;
    margin: 0 auto;
    color: var(--eg-text);
    font-size: 17px;
    line-height: 1.6;
}
@media (max-width: 600px) {
    .eg-ohero { padding: 50px 0 4px; }
}

.eg-offerte { max-width: 900px; margin-inline: auto; }

/* The [hidden] attribute must win over the display of .eg-btn / .eg-ostep etc.
   (author display rules otherwise override the UA [hidden] rule). This is what
   hides "Next" on the last step, "Previous" on the first, and the success panel. */
.eg-offerte [hidden] { display: none !important; }

/* ---------- Stepper ---------- */
.eg-osteps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    counter-reset: none;
}
.eg-osteps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
    color: var(--eg-muted);
}
.eg-osteps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--eg-bg-alt);
    border: 1px solid var(--eg-border);
    font-weight: 800;
    font-size: 15px;
    color: var(--eg-muted);
    transition: all .25s ease;
}
.eg-osteps__label { font-size: 13px; font-weight: 600; line-height: 1.3; }
.eg-osteps__item.is-active { color: var(--eg-brand); }
.eg-osteps__item.is-active .eg-osteps__num {
    background: var(--eg-brand);
    border-color: var(--eg-brand);
    color: var(--eg-brand-ink);
    box-shadow: 0 8px 20px rgba(var(--eg-brand-rgb), .3);
}
.eg-osteps__item.is-done .eg-osteps__num {
    background: var(--eg-accent);
    border-color: var(--eg-accent);
    color: #fff;
}

/* ---------- Progress bar ---------- */
.eg-oprogress {
    height: 6px;
    border-radius: 999px;
    background: var(--eg-bg-alt);
    overflow: hidden;
    margin-bottom: 30px;
}
.eg-oprogress > span {
    display: block;
    height: 100%;
    background: var(--eg-brand);
    border-radius: 999px;
    transition: width .35s cubic-bezier(.22,1,.36,1);
}

/* ---------- Cards & steps ---------- */
.eg-ocard { padding: 26px; margin-bottom: 22px; }
.eg-oaddr__title {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 18px; padding-bottom: 14px;
    border-bottom: 1px solid var(--eg-border);
    font-size: 18px; color: var(--eg-heading);
}

.eg-ostep[hidden] { display: none; }

/* Two addresses side by side on desktop, stacked on mobile. */
.eg-oaddr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.eg-oaddr-grid .eg-ocard { margin-bottom: 0; }

/* ---------- Fields ---------- */
.eg-field { margin-bottom: 16px; }
.eg-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--eg-heading);
}
.eg-req { color: var(--eg-danger); }
.eg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.eg-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--eg-border);
    border-radius: 12px;
    background: var(--eg-bg);
    color: var(--eg-heading);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.eg-input::placeholder { color: var(--eg-muted); opacity: .8; }
.eg-input:focus {
    outline: none;
    border-color: var(--eg-brand);
    box-shadow: 0 0 0 3px rgba(var(--eg-brand-rgb), .15);
}
select.eg-input { appearance: none; -webkit-appearance: none; background-image:
    linear-gradient(45deg, transparent 50%, var(--eg-muted) 50%),
    linear-gradient(135deg, var(--eg-muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.eg-input.is-invalid { border-color: var(--eg-danger); background: var(--eg-danger-soft); }
.eg-err { display: none; margin-top: 5px; font-size: 13px; color: var(--eg-danger); }
.eg-err.is-shown { display: block; }

/* ---------- Switch ---------- */
.eg-field--switch { display: flex; align-items: center; }
.eg-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.eg-switch label,
.eg-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--eg-text); }
.eg-switch__track {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: var(--eg-border);
    transition: background .25s ease;
}
.eg-switch__track::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: transform .25s ease;
}
.eg-switch input:checked ~ label .eg-switch__track,
.eg-switch input:checked + .eg-switch__track { background: var(--eg-brand); }
.eg-switch input:checked ~ label .eg-switch__track::after,
.eg-switch input:checked + .eg-switch__track::after { transform: translateX(18px); }
.eg-switch input:focus-visible ~ label .eg-switch__track,
.eg-switch input:focus-visible + .eg-switch__track { box-shadow: 0 0 0 3px rgba(var(--eg-brand-rgb), .25); }

/* ---------- Extra options (step 3) ---------- */
.eg-oextras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.eg-oextra {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--eg-border);
    border-radius: 16px;
    background: var(--eg-card);
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.eg-oextra:hover { border-color: var(--eg-brand); box-shadow: 0 10px 30px rgba(var(--eg-brand-rgb), .10); }
.eg-oextra:has(input:checked) {
    border-color: var(--eg-brand);
    box-shadow: 0 0 0 2px var(--eg-brand) inset;
}
.eg-oextra__top { display: flex; align-items: center; justify-content: space-between; }
.eg-oextra .eg-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--eg-brand-soft); color: var(--eg-brand);
}
.eg-oextra__title { font-weight: 700; font-size: 16px; color: var(--eg-heading); }
.eg-oextra__text { font-size: 14px; color: var(--eg-muted); line-height: 1.55; }
.eg-switch--plain { display: inline-flex; }

/* Consent line: toggle + descriptive text with a link to the terms page. */
.eg-field--switch .eg-switch { align-items: flex-start; }
.eg-switch__toggle { flex: 0 0 auto; }
.eg-consent-text { font-size: 14px; line-height: 1.5; color: var(--eg-text); }
.eg-consent-text a { color: var(--eg-brand); font-weight: 600; text-decoration: underline; }
.eg-consent-text a:hover { color: var(--eg-brand-dark); }

/* ---------- Phone ---------- */
.eg-phone { display: flex; gap: 10px; }
.eg-phone__cc {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 14px;
    border: 1px solid var(--eg-border);
    border-radius: 12px;
    background: var(--eg-bg-alt);
    font-weight: 700; color: var(--eg-heading);
    white-space: nowrap;
}
.eg-phone .eg-input { flex: 1; }

/* ---------- Calendar (step 2) ---------- */
.eg-ocard--cal { max-width: 560px; margin-inline: auto; }
.eg-cal__hint { margin: -6px 0 18px; font-size: 14px; color: var(--eg-muted); }
.eg-cal { user-select: none; }
.eg-cal__head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.eg-cal__title {
    font-weight: 800; font-size: 16px; color: var(--eg-heading); text-transform: capitalize;
}
.eg-cal__nav {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--eg-border); background: var(--eg-bg);
    color: var(--eg-heading); font-size: 20px; line-height: 1; cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}
.eg-cal__nav:hover:not(:disabled) { border-color: var(--eg-brand); color: var(--eg-brand); }
.eg-cal__nav:disabled { opacity: .35; cursor: not-allowed; }
.eg-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.eg-cal__dow { margin-bottom: 8px; }
.eg-cal__dow span {
    text-align: center; font-size: 12px; font-weight: 700;
    color: var(--eg-muted); text-transform: uppercase; letter-spacing: .03em;
}
.eg-cal__day {
    aspect-ratio: 1 / 1; min-height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 10px;
    background: var(--eg-bg-alt); color: var(--eg-heading);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.eg-cal__day:hover:not(.is-disabled) { background: var(--eg-brand-soft); color: var(--eg-brand); }
.eg-cal__day.is-disabled { background: transparent; color: var(--eg-border); cursor: not-allowed; }
.eg-cal__day.is-selected {
    background: var(--eg-brand); color: var(--eg-brand-ink);
    box-shadow: 0 6px 16px rgba(var(--eg-brand-rgb), .35);
}
.eg-cal__day.is-today:not(.is-selected) { box-shadow: 0 0 0 1px var(--eg-brand) inset; }
.eg-field:has(input.is-invalid) .eg-cal {
    outline: 2px solid var(--eg-danger); outline-offset: 6px; border-radius: 12px;
}

/* ---------- Navigation ---------- */
.eg-onav { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.eg-onav__spacer { flex: 1; }
.eg-oform-error {
    margin-top: 14px; padding: 12px 16px;
    border-radius: 12px;
    background: var(--eg-danger-soft); color: var(--eg-danger);
    font-size: 14px;
}

/* ---------- Success ---------- */
.eg-odone { text-align: center; padding: 50px 20px; }
.eg-odone__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; border-radius: 50%;
    background: var(--eg-accent-soft); color: var(--eg-accent);
    margin-bottom: 20px;
}
.eg-odone h2 { margin: 0 0 10px; color: var(--eg-heading); }
.eg-odone p { max-width: 460px; margin-inline: auto; color: var(--eg-text); }

/* ---------- Responsive ---------- */
/* Two-up addresses need room; stack them (and their inner rows) earlier. */
@media (max-width: 860px) {
    .eg-oaddr-grid { grid-template-columns: 1fr; gap: 0; }
    .eg-oaddr-grid .eg-ocard { margin-bottom: 22px; }
}

@media (max-width: 700px) {
    .eg-grid2, .eg-oextras { grid-template-columns: 1fr; }
    .eg-osteps__label { display: none; }
    .eg-ocard { padding: 20px; }
    .eg-cal__grid { gap: 4px; }
    .eg-cal__day { min-height: 36px; }
}
