/* ─────────────────────────────────────────────────────────────────────────────
   eBike Lead Capture — scoped styles
   All rules are prefixed with .elp- to avoid conflicts with the WordPress theme.
   ─────────────────────────────────────────────────────────────────────────────*/

/* ── Design tokens ─────────────────────────────────────────────────────────── */
.elp-wrap {
    /* These four are overridden by wp_head inline CSS when the user picks colors
       in Appearance → Customize → eBike Lead Page. */
    --brand:        #059669;
    --brand-dark:   #047857;
    --brand-light:  #d1fae5;
    --brand-text:   #065f46;
    --btn-text:     #ffffff; /* overridden by button_text_color setting */
    --slate-50:     #f8fafc;
    --slate-100:    #f1f5f9;
    --slate-200:    #e2e8f0;
    --slate-400:    #94a3b8;
    --slate-500:    #64748b;
    --slate-700:    #334155;
    --slate-900:    #0f172a;
    --amber-100:    #fef3c7;
    --amber-700:    #b45309;
    --red-50:       #fef2f2;
    --red-200:      #fecaca;
    --red-700:      #b91c1c;
    --radius:       10px;
    --radius-lg:    16px;
    --shadow:       0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:    0 8px 40px rgba(0,0,0,0.12);
    font-family:    inherit;
    box-sizing:     border-box;
}
.elp-wrap *, .elp-wrap *::before, .elp-wrap *::after {
    box-sizing: inherit;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */

/* Centered pages (check-email, confirmed) */
.elp-centered {
    max-width: 520px;
    text-align: center;
}

/* ── Form card ─────────────────────────────────────────────────────────────── */
.elp-form-card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}

.elp-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 4px;
    padding: 0;
    border: none;
}

.elp-form-subtitle {
    font-size: .85rem;
    color: var(--slate-500);
    margin: 0 0 24px;
}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.elp-field {
    margin-bottom: 16px;
}

.elp-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.elp-field input[type="text"],
.elp-field input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    font-size: .95rem;
    color: var(--slate-900);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    -webkit-appearance: none;
}

.elp-field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5,150,105,.15);
}

/* ── Typo hint ─────────────────────────────────────────────────────────────── */
.elp-typo-hint {
    margin: 6px 0 0;
    font-size: .82rem;
    color: var(--amber-700);
}

.elp-typo-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--amber-700);
    cursor: pointer;
    text-decoration: underline;
}

/* ── Newsletter checkbox ───────────────────────────────────────────────────── */
.elp-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.elp-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--brand);
    flex-shrink: 0;
}

.elp-checkbox-row label {
    font-size: .84rem;
    color: var(--slate-500);
    line-height: 1.4;
    cursor: pointer;
}

/* ── Error message ─────────────────────────────────────────────────────────── */
.elp-error {
    background: var(--red-50);
    border: 1px solid var(--red-200);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: .875rem;
    color: var(--red-700);
    margin-bottom: 12px;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.elp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s, transform .1s;
    line-height: 1;
}

.elp-btn:active { transform: scale(.98); }

.elp-btn-primary {
    background: var(--brand);
    color: var(--btn-text) !important;
    width: 100%;
}

.elp-btn-primary:hover { background: var(--brand-dark); }

.elp-btn-primary:disabled {
    background: #6ee7b7;
    cursor: not-allowed;
}

.elp-btn-secondary {
    background: var(--slate-900);
    color: #fff !important;
    padding: 10px 18px;
    font-size: .88rem;
    white-space: nowrap;
}

.elp-btn-secondary:hover { background: var(--slate-700); }

.elp-btn-outline {
    background: #fff;
    color: var(--slate-700) !important;
    border: 1.5px solid var(--slate-200);
}

.elp-btn-outline:hover { border-color: var(--slate-400); }

.elp-btn-download {
    font-size: 1.05rem;
    padding: 14px 32px;
    box-shadow: 0 4px 16px rgba(5,150,105,.25);
}

/* ── Disclaimer ────────────────────────────────────────────────────────────── */
.elp-disclaimer {
    font-size: .75rem;
    color: var(--slate-400);
    text-align: center;
    margin: 10px 0 0;
}

/* ── Centered page typography ──────────────────────────────────────────────── */
.elp-page-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--slate-900);
    margin: 0 0 12px;
    padding: 0;
    border: none;
}

.elp-text {
    color: var(--slate-600, #475569);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 10px;
}

.elp-text-lg {
    font-size: 1.1rem;
}

.elp-text-muted {
    color: var(--slate-400);
    font-size: .88rem;
    margin: 0 0 10px;
    line-height: 1.5;
}

/* ── Icon circle ───────────────────────────────────────────────────────────── */
.elp-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.elp-icon-green {
    background: var(--brand-light);
    color: var(--brand);
}

.elp-icon-amber {
    background: var(--amber-100);
    color: var(--amber-700);
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.elp-divider {
    border: none;
    border-top: 1px solid var(--slate-200);
    margin: 28px 0;
}

/* ── Resend row ────────────────────────────────────────────────────────────── */
.elp-resend-row {
    display: flex;
    gap: 8px;
    max-width: 380px;
    margin: 0 auto;
}

.elp-resend-input {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--slate-900);
    outline: none;
    -webkit-appearance: none;
}

.elp-resend-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5,150,105,.15);
}

.elp-resend-msg {
    margin-top: 10px;
    font-size: .875rem;
    padding: 10px 14px;
    border-radius: var(--radius);
}

.elp-resend-msg.success {
    background: var(--brand-light);
    color: var(--brand-text);
}

.elp-resend-msg.error {
    background: var(--red-50);
    color: var(--red-700);
}

/* ── Back link ─────────────────────────────────────────────────────────────── */
.elp-back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: .82rem;
    color: var(--slate-400);
    text-decoration: underline;
}

.elp-back-link:hover { color: var(--slate-500); }

/* ── Error page actions ────────────────────────────────────────────────────── */
.elp-error-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

@media (min-width: 480px) {
    .elp-error-actions {
        flex-direction: row;
        justify-content: center;
    }
    .elp-error-actions .elp-btn {
        width: auto;
    }
}
