/* =============================================================
   ECEF Front CSS v4.0
   Base: uploaded v3.3 CSS (DM Sans, position:absolute steps).
   Chip alignment: CSS grid so options align in even columns.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* ── Font ── */
#ecef-btn, #ecef-btn-m,
#ecef-btn-wrap, #ecef-btn-wrap-m,
#ecef-overlay, #ecef-overlay * {
    font-family: 'DM Sans', sans-serif;
}

/* =============================================================
   FLOATING CTA
   ============================================================= */
#ecef-btn-inner,
#ecef-btn-inner-m {
    display: inline-block;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: transform 0.55s cubic-bezier(0.34,1.7,0.64,1), opacity 0.40s ease;
    will-change: transform, opacity;
}
#ecef-btn-inner:not(.ecef-in),
#ecef-btn-inner-m:not(.ecef-in) {
    opacity: 0;
    transform: translateY(90px) scale(0.8);
    transition: transform 0.28s cubic-bezier(0.4,0,1,1), opacity 0.20s ease;
}
#ecef-btn-inner.ecef-in,
#ecef-btn-inner-m.ecef-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: transform 0.55s cubic-bezier(0.34,1.7,0.64,1), opacity 0.40s ease;
}

#ecef-btn,
#ecef-btn-m {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    padding: 15px 28px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1.5px solid rgba(0,0,0,0.13) !important;
    border-radius: 0 !important;
    color: #111111 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', sans-serif !important;
    letter-spacing: 0.2px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07) !important;
    text-decoration: none !important;
    outline: none !important;
    line-height: 1 !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: box-shadow 0.18s ease, background-color 0.15s ease !important;
}
#ecef-btn svg, #ecef-btn-m svg { display: block; flex-shrink: 0; }
#ecef-btn:hover, #ecef-btn-m:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.20), 0 3px 10px rgba(0,0,0,0.10) !important;
    color: #111111 !important;
    text-decoration: none !important;
}
#ecef-btn:active, #ecef-btn-m:active { background-color: #f2f2f2 !important; }

#ecef-btn-wrap {
    position: fixed !important;
    bottom: 32px !important;
    right: 28px !important;
    left: auto !important;
    z-index: 2147483647 !important;
    pointer-events: none;
}
#ecef-btn-wrap.ecef-live { pointer-events: auto; }

#ecef-btn-wrap-m {
    display: none !important;
    position: fixed !important;
    bottom: 24px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2147483647 !important;
    text-align: center !important;
    pointer-events: none;
}
#ecef-btn-wrap-m.ecef-live { pointer-events: auto; }
#ecef-btn-m { min-width: 220px !important; }

@media (max-width: 767px) {
    #ecef-btn-wrap   { display: none !important; }
    #ecef-btn-wrap-m { display: block !important; }
}

/* =============================================================
   OVERLAY
   ============================================================= */
#ecef-overlay {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.45) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    backdrop-filter: blur(6px) !important;
    box-sizing: border-box !important;
    opacity: 0;
    transition: opacity 0.28s ease;
}
#ecef-overlay.ecef-showing { display: flex; }
#ecef-overlay.ecef-open    { display: flex; opacity: 1; }

/* =============================================================
   MODAL
   ============================================================= */
#ecef-modal {
    position: relative !important;
    width: 100% !important;
    max-width: 640px !important;
    height: min(88vh, 680px) !important;
    max-height: 88vh !important;
    margin: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e8e8e8 !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08) !important;
    transform: translateY(28px) scale(0.97);
    transition: transform 0.36s cubic-bezier(0.34,1.45,0.64,1);
    box-sizing: border-box !important;
    color: #1a1a1a !important;
}
#ecef-overlay.ecef-open #ecef-modal { transform: translateY(0) scale(1); }

/* ── Progress header ── */
#ecef-header {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 22px 62px 0 26px !important;
}
#ecef-track {
    flex: 1 !important;
    height: 2px !important;
    background: #e8e8e8 !important;
    border-radius: 2px !important;
    overflow: hidden !important;
}
#ecef-bar {
    height: 100% !important;
    width: 25% !important;
    background: #111111 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    transition: width 0.40s ease !important;
}
#ecef-step-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.10em !important;
    text-transform: uppercase !important;
    color: #aaaaaa !important;
    white-space: nowrap !important;
    min-width: 68px !important;
    text-align: right !important;
}

/* ── Close button ── */
#ecef-close {
    position: absolute !important;
    top: 16px !important; right: 16px !important;
    z-index: 10 !important;
    width: 32px !important; height: 32px !important;
    display: flex !important;
    align-items: center !important; justify-content: center !important;
    background: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 50% !important;
    color: #888888 !important;
    cursor: pointer !important;
    padding: 0 !important; outline: none !important;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease !important;
}
#ecef-close:hover {
    background: #ebebeb !important;
    border-color: #ccc !important;
    color: #111 !important;
    transform: rotate(90deg) !important;
}
#ecef-close svg { display: block !important; }

/* ── Scrollable body ── */
#ecef-body {
    position: relative !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #dddddd transparent;
}
#ecef-body::-webkit-scrollbar { width: 3px; }
#ecef-body::-webkit-scrollbar-thumb { background: #dddddd; border-radius: 2px; }

/* =============================================================
   STEPS — position:absolute so all steps occupy same space
   No layout shift, clean fade/slide in/out
   ============================================================= */
#ecef-overlay .ecef-step {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 28px 28px 32px !important;
    box-sizing: border-box !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow-y: auto !important;
}
#ecef-overlay .ecef-step.ecef-active:not(.ecef-back) {
    animation: ecef-in 0.30s ease both !important;
}
#ecef-overlay .ecef-step.ecef-active.ecef-back {
    animation: ecef-back 0.30s ease both !important;
}
#ecef-overlay .ecef-step.ecef-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@keyframes ecef-in   { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes ecef-back { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }

#ecef-overlay .ecef-spacer { flex: 1 !important; min-height: 16px !important; }

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
#ecef-overlay .ecef-kicker,
#ecef-overlay .ecef-kicker * {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.13em !important;
    text-transform: uppercase !important;
    color: #777777 !important;
    margin: 0 0 12px !important;
    line-height: 1 !important;
}
#ecef-overlay .ecef-heading,
#ecef-overlay .ecef-heading * {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    line-height: 1.24 !important;
    margin: 0 0 8px !important;
}
#ecef-overlay .ecef-hint,
#ecef-overlay .ecef-hint * {
    font-size: 13px !important;
    color: #555555 !important;
    margin: 0 0 22px !important;
    line-height: 1.55 !important;
}
#ecef-overlay .ecef-sublabel,
#ecef-overlay .ecef-sublabel * {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase !important;
    color: #333333 !important;
    margin: 0 0 14px !important;
    display: block !important;
}

/* =============================================================
   CHIPS — CSS grid for perfect column alignment
   - repeat(3,1fr): all cells in a row are equal width
   - align-items: stretch on the grid: all cells in a row are
     equal HEIGHT (tallest cell sets the row height)
   - No fixed height on span — grows with content
   - Checkbox chips: left-aligned so tick always top-left
   - Radio chips: centred (short single-line text always)
   ============================================================= */
#ecef-overlay .ecef-chips {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
}
#ecef-overlay .ecef-chip {
    display: block !important;
    margin: 0 !important; padding: 0 !important;
    border: none !important; background: transparent !important;
    cursor: pointer !important;
    /* stretch to fill the grid row height */
    height: 100% !important;
}
#ecef-overlay .ecef-chip input[type="radio"],
#ecef-overlay .ecef-chip input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important; width: 0 !important; height: 0 !important;
    pointer-events: none !important;
}
/* Base span — fills full height of its grid cell */
#ecef-overlay .ecef-chip span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 11px 14px !important;
    min-height: 44px !important;
    height: 100% !important;
    background: #f7f7f7 !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #222222 !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    user-select: none !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}
/* Checkbox chips: left-align so tick is always top-left */
#ecef-overlay .ecef-chip-cb span {
    justify-content: flex-start !important;
    text-align: left !important;
    align-items: flex-start !important;
}
#ecef-overlay .ecef-chip:hover span {
    background: #efefef !important;
    border-color: #bbbbbb !important;
    color: #111111 !important;
}
#ecef-overlay .ecef-chip input:checked + span {
    background: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
/* Checkbox tick box — always top-left, never shifts */
#ecef-overlay .ecef-chip-cb span::before {
    content: '' !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    border-radius: 3px !important;
    border: 1.5px solid #cccccc !important;
    background: transparent !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    margin-top: 1px !important; /* optical alignment with text cap-height */
    transition: all 0.13s ease !important;
}
#ecef-overlay .ecef-chip-cb input:checked + span::before {
    background: #ffffff !important;
    border-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-size: 9px 7px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* =============================================================
   FORM FIELDS
   ============================================================= */
#ecef-overlay .ecef-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 22px !important;
}
#ecef-overlay .ecef-span2 { grid-column: 1 / -1 !important; }
#ecef-overlay .ecef-field {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 18px !important;
}
#ecef-overlay .ecef-field label {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #222222 !important;
    margin: 0 0 8px !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
#ecef-overlay .ecef-field label .req { color: #999999 !important; }
#ecef-overlay .ecef-field label .opt {
    font-style: italic !important;
    color: #999999 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}
#ecef-overlay .ecef-field input[type="text"],
#ecef-overlay .ecef-field input[type="email"],
#ecef-overlay .ecef-field input[type="tel"],
#ecef-overlay .ecef-field textarea {
    display: block !important;
    width: 100% !important;
    padding: 10px 0 11px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1.5px solid #d0d0d0 !important;
    border-radius: 0 !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    caret-color: #111111 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    font-family: 'DM Sans', sans-serif !important;
    line-height: 1.4 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-appearance: none !important;
    transition: border-color 0.18s ease !important;
    box-sizing: border-box !important;
}
#ecef-overlay .ecef-field input::placeholder,
#ecef-overlay .ecef-field textarea::placeholder {
    color: #aaaaaa !important;
    -webkit-text-fill-color: #aaaaaa !important;
}
#ecef-overlay .ecef-field input:hover,
#ecef-overlay .ecef-field textarea:hover { border-bottom-color: #aaaaaa !important; }
#ecef-overlay .ecef-field input:focus,
#ecef-overlay .ecef-field textarea:focus {
    border-bottom-color: #111111 !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}
#ecef-overlay .ecef-field input.ecef-inv,
#ecef-overlay .ecef-field textarea.ecef-inv {
    border-bottom-color: #e53e3e !important;
    caret-color: #e53e3e !important;
}
#ecef-overlay .ecef-field input:-webkit-autofill,
#ecef-overlay .ecef-field input:-webkit-autofill:hover,
#ecef-overlay .ecef-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #111111 !important;
    transition: background-color 9999s !important;
}
#ecef-overlay .ecef-field textarea { resize: vertical !important; min-height: 80px !important; }

#ecef-overlay .ecef-field-err {
    display: none !important;
    font-size: 11px !important;
    color: #e53e3e !important;
    margin-top: 5px !important;
    font-weight: 500 !important;
}
#ecef-overlay .ecef-field-err.ecef-visible { display: block !important; }

/* =============================================================
   STEP ERROR BANNER
   ============================================================= */
#ecef-overlay .ecef-step-err {
    display: none !important;
    margin-top: 14px !important;
    padding: 10px 14px !important;
    background: #fff5f5 !important;
    border: 1px solid #feb2b2 !important;
    border-radius: 8px !important;
    color: #c53030 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}
#ecef-overlay .ecef-step-err.ecef-visible { display: block !important; }

/* =============================================================
   NAV BUTTONS
   ============================================================= */
#ecef-overlay .ecef-nav {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 24px !important;
    flex-shrink: 0 !important;
}
#ecef-overlay .ecef-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 12px 18px !important;
    background: #f5f5f5 !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 8px !important;
    color: #555555 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', sans-serif !important;
    cursor: pointer !important;
    outline: none !important; line-height: 1 !important;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease !important;
}
#ecef-overlay .ecef-back:hover {
    background: #ebebeb !important;
    border-color: #cccccc !important;
    color: #111111 !important;
}
#ecef-overlay .ecef-next,
#ecef-overlay .ecef-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-left: auto !important;
    padding: 13px 26px !important;
    background: #111111 !important;
    background-color: #111111 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: 'DM Sans', sans-serif !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.20) !important;
    outline: none !important; line-height: 1 !important;
    transition: transform 0.18s cubic-bezier(0.34,1.45,0.64,1), box-shadow 0.18s ease, background-color 0.15s ease !important;
}
#ecef-overlay .ecef-next:hover,
#ecef-overlay .ecef-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.26) !important;
    background-color: #222222 !important;
    color: #ffffff !important;
}
#ecef-overlay .ecef-next:active,
#ecef-overlay .ecef-submit-btn:active { transform: translateY(0) !important; }
#ecef-overlay .ecef-submit-btn:disabled {
    opacity: 0.55 !important; cursor: not-allowed !important; transform: none !important;
}
#ecef-overlay .ecef-next svg,
#ecef-overlay .ecef-back svg,
#ecef-overlay .ecef-submit-btn svg { display: block !important; flex-shrink: 0 !important; }

#ecef-overlay .ecef-sp { display: none; }
.ecef-spin { animation: ecef-spin 0.75s linear infinite; }
@keyframes ecef-spin { to { transform: rotate(360deg); } }

/* =============================================================
   MOBILE
   ============================================================= */
@media (max-width: 640px) {
    #ecef-overlay {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    #ecef-modal {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        height: 88vh !important;
        max-height: 88vh !important;
        border-radius: 20px !important;
        margin: 10px !important;
    }
    #ecef-header { padding: 18px 56px 0 20px !important; }
    #ecef-close  { top: 14px !important; right: 14px !important; }
    #ecef-overlay .ecef-step { padding: 22px 20px 26px !important; }
    #ecef-overlay .ecef-heading,
    #ecef-overlay .ecef-heading * { font-size: 20px !important; }
    #ecef-overlay .ecef-hint,
    #ecef-overlay .ecef-hint * { font-size: 12px !important; margin-bottom: 16px !important; }
    #ecef-overlay .ecef-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
    #ecef-overlay .ecef-span2 { grid-column: 1 !important; }
    /* Chips: 2 columns on mobile */
    #ecef-overlay .ecef-chips { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
    #ecef-overlay .ecef-field input[type="text"],
    #ecef-overlay .ecef-field input[type="email"],
    #ecef-overlay .ecef-field input[type="tel"],
    #ecef-overlay .ecef-field textarea { font-size: 16px !important; }
    #ecef-overlay .ecef-nav { flex-wrap: nowrap !important; gap: 8px !important; }
    #ecef-overlay .ecef-next,
    #ecef-overlay .ecef-submit-btn { flex: 1 !important; justify-content: center !important; }
    #ecef-overlay .ecef-back { flex: 0 0 auto !important; padding: 12px 14px !important; }
}

/* =============================================================
   THANK-YOU PAGE
   ============================================================= */
.ecef-ty {
    max-width: 600px;
    margin: 60px auto 80px;
    padding: 52px 48px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    text-align: center;
    color: #111111;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}
@media (max-width: 680px) { .ecef-ty { margin: 32px 16px 56px; padding: 36px 22px; } }
.ecef-ty-icon { display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin:0 auto 20px;border-radius:50%;background:#f4f4f4;border:1px solid #e0e0e0; }
.ecef-ty-kicker { font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#999;margin:0 0 10px;line-height:1; }
.ecef-ty-h1 { font-size:34px;font-weight:700;color:#111 !important;line-height:1.1;margin:0 0 14px; }
.ecef-ty-sub { font-size:15px;color:#555;line-height:1.7;margin:0 0 28px; }
.ecef-ty-divider { width:40px;height:1px;background:#e0e0e0;margin:0 auto 26px; }
.ecef-ty-next-label { font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#aaa;margin:0 0 16px; }
.ecef-ty-list { list-style:none;padding:0;margin:0 0 28px;display:flex;flex-direction:column;gap:10px;text-align:left; }
.ecef-ty-list li { display:flex;align-items:center;gap:14px;padding:14px 18px;background:#f8f8f8;border:1px solid #eee;border-radius:10px;font-size:14px;color:#333; }
.ecef-ty-num { flex-shrink:0;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fff;border:1px solid #ddd;font-size:10px;font-weight:700;color:#aaa; }
.ecef-ty-closing { font-size:14px;color:#888;line-height:1.75;margin:0 0 32px; }
.ecef-ty-btn { display:inline-flex;align-items:center;justify-content:center;padding:13px 32px;background:#111;color:#fff !important;font-size:14px;font-weight:700;border-radius:8px;text-decoration:none;letter-spacing:.02em;box-shadow:0 4px 16px rgba(0,0,0,.14);transition:opacity .18s ease,transform .18s cubic-bezier(.34,1.45,.64,1); }
.ecef-ty-btn:hover { opacity:.88;transform:translateY(-2px);color:#fff !important; }