/* =============================================================
   Elzer Optiek Afspraken – booking.css
   Mobile-first: base = telefoon, breakpoints voor groter scherm
   ============================================================= */

/* ── Reset / scope ──────────────────────────────────────────── */
#eoa-booking-widget,
#eoa-booking-widget * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

#eoa-booking-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;           /* basis voor rem-berekeningen */
    line-height: 1.5;
    color: #111827;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 4px;
}

/* ── Progress bar ─────────────────────────────────────────────
   Mobiel: kleine dots, geen labels                            */
.eoa-progress {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 4px;
}

.eoa-step-dot {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background .25s, color .25s;
}

.eoa-step-dot.active { background: var(--eoa-accent,#1a3a5c); color: #fff; }
.eoa-step-dot.done   { background: #16a34a; color: #fff; }

.eoa-step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 3px;
    transition: background .25s;
}
.eoa-step-line.done { background: #16a34a; }

/* ── Steps ────────────────────────────────────────────────────*/
.eoa-step         { display: none; }
.eoa-step-active  { display: block; }

.eoa-step-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--eoa-accent,#1a3a5c);
    margin: 0 0 6px;
}

/* ── Mode selector (stap 1) ───────────────────────────────────
   Mobiel: één kolom, volledig aanraakbaar                     */
.eoa-mode-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0 20px;
}

.eoa-mode-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px 18px;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    /* Grote aanraakzone */
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.eoa-mode-card:active,
.eoa-mode-card:focus {
    border-color: var(--eoa-accent,#1a3a5c);
    outline: none;
}

.eoa-mode-icon  { font-size: 2.6rem; margin-bottom: 10px; line-height: 1; }
.eoa-mode-title { font-size: 1.05rem; font-weight: 700; color: #1a3a5c; margin: 0 0 6px; }
.eoa-mode-sub   { font-size: .85rem; color: #6b7280; margin: 0 0 14px; line-height: 1.45; }
.eoa-mode-btn   {
    display: inline-block;
    padding: 9px 20px;
    background: var(--eoa-accent,#1a3a5c);
    color: #fff;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .01em;
}

/* ── Diensten grid ────────────────────────────────────────────
   Mobiel: 1 kolom                                             */
.eoa-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.eoa-card-opt {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .2s;
    background: #fff;
    min-height: 52px;
}
.eoa-card-opt:active,
.eoa-card-opt.selected { border-color: var(--eoa-accent,#1a3a5c); background: #f0f5ff; }

.eoa-opt-title { font-weight: 700; font-size: .95rem; margin: 0 0 3px; }
.eoa-opt-sub   { font-size: .82rem; color: #6b7280; margin: 0; }

/* ── Medewerkers grid ─────────────────────────────────────────
   Mobiel: 2 kolommen zodat foto's groot genoeg zijn          */
.eoa-staff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.eoa-staff-card {
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 10px 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}
.eoa-staff-card:active,
.eoa-staff-card.selected {
    border-color: var(--eoa-accent,#1a3a5c);
    background: #f0f5ff;
}

.eoa-staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    border: 3px solid #e5e7eb;
}
.eoa-staff-avatar-placeholder,
.eoa-staff-avatar-any {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border: 3px solid #e5e7eb;
}
.eoa-staff-card.selected .eoa-staff-avatar,
.eoa-staff-card.selected .eoa-staff-avatar-placeholder {
    border-color: var(--eoa-accent,#1a3a5c);
}

/* ── Kalender ─────────────────────────────────────────────────*/
.eoa-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.eoa-cal-title    { font-weight: 700; font-size: 1rem; color: #1a3a5c; }
.eoa-cal-nav-btn  {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    /* Grote aanraakzone op mobiel */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    color: #374151;
}
.eoa-cal-nav-btn:active { background: #f3f4f6; }

.eoa-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 16px;
}

.eoa-cal-day-header {
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
    color: #9ca3af;
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.eoa-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: .85rem;
    cursor: pointer;
    transition: background .12s;
    border: 2px solid transparent;
    /* Minimale aanraakzone */
    min-height: 40px;
    font-weight: 500;
}
.eoa-cal-day.empty   { cursor: default; }
.eoa-cal-day.past    { color: #d1d5db; cursor: not-allowed; }
.eoa-cal-day.unavail { color: #d1d5db; cursor: not-allowed; background: #fafafa; text-decoration: line-through; }
.eoa-cal-day.avail   { color: #111827; }
.eoa-cal-day.avail:active { background: #eff6ff; }
.eoa-cal-day.selected { background: var(--eoa-accent,#1a3a5c); color: #fff; border-color: var(--eoa-accent,#1a3a5c); }
.eoa-cal-day.today    { font-weight: 800; }
.eoa-cal-day.today:not(.selected) { border-color: var(--eoa-accent,#1a3a5c); color: var(--eoa-accent,#1a3a5c); }

/* ── Tijdslots ────────────────────────────────────────────────
   Mobiel: 3 per rij, groot genoeg voor vingers               */
.eoa-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.eoa-slot {
    padding: 12px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
    transition: border-color .15s, background .15s;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eoa-slot:active  { border-color: var(--eoa-accent,#1a3a5c); }
.eoa-slot.selected {
    border-color: var(--eoa-accent,#1a3a5c);
    background: var(--eoa-accent,#1a3a5c);
    color: #fff;
}

/* ── Formulier ────────────────────────────────────────────────*/
.eoa-field { margin-bottom: 16px; }
.eoa-field label {
    display: block;
    font-size: .88rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
}

.eoa-field input,
.eoa-field select,
.eoa-field textarea {
    width: 100%;
    padding: 13px 14px;  /* groot genoeg voor mobiel */
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;     /* 16px: voorkomt zoom op iOS */
    color: #111827;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.eoa-field input:focus,
.eoa-field select:focus,
.eoa-field textarea:focus {
    outline: none;
    border-color: var(--eoa-accent,#1a3a5c);
    box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}

.eoa-channel-opts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.eoa-channel-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .95rem;
    cursor: pointer;
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color .15s;
    min-height: 50px;
}
.eoa-channel-label input { display: none; }
.eoa-channel-label.selected {
    border-color: var(--eoa-accent,#1a3a5c);
    background: #f0f5ff;
}

/* ── Samenvatting ─────────────────────────────────────────────*/
.eoa-summary-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.eoa-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .9rem;
}
.eoa-summary-row:last-child { border-bottom: none; }
.eoa-summary-label { color: #6b7280; white-space: nowrap; }
.eoa-summary-value { font-weight: 700; color: #111827; text-align: right; }

/* ── Knoppen ──────────────────────────────────────────────────
   Mobiel: breed, grote aanraakzone                           */
.eoa-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.eoa-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 20px;   /* min 48px hoogte */
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background .15s, opacity .15s;
    text-align: center;
}
.eoa-btn:disabled { opacity: .5; cursor: not-allowed; }
.eoa-btn-primary   { background: var(--eoa-accent,#1a3a5c); color: #fff; }
.eoa-btn-secondary { background: #f3f4f6; color: #374151; flex: 0 0 auto; min-width: 80px; }

/* ── Bevestigingsscherm ───────────────────────────────────────*/
.eoa-success { text-align: center; padding: 24px 8px; }
.eoa-success-icon { font-size: 3.5rem; margin-bottom: 12px; display: block; }
.eoa-success h2   { font-size: 1.35rem; color: #16a34a; margin: 0 0 10px; }
.eoa-success p    { color: #6b7280; margin: 0 0 20px; font-size: .95rem; }

/* ── Laden / foutmelding ──────────────────────────────────────*/
.eoa-loading { text-align: center; padding: 32px 16px; color: #9ca3af; font-style: italic; }
.eoa-error   {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 14px;
    border: 1px solid #fca5a5;
}

/* ── Twee-koloms veldrow (naam) ───────────────────────────────*/
.eoa-field-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.eoa-field-row .eoa-field { flex: 1; }

/* ── Hulptekst ────────────────────────────────────────────────*/
.eoa-hint {
    font-size: .82rem;
    color: #9ca3af;
    margin: -10px 0 14px;
}

/* =============================================================
   Tablet & desktop (min-width: 540px)
   ============================================================= */
@media (min-width: 540px) {
    .eoa-step-dot { width: 32px; height: 32px; font-size: .82rem; }

    .eoa-mode-grid {
        flex-direction: row;
    }
    .eoa-mode-card { flex: 1; min-height: 200px; }

    .eoa-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .eoa-staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .eoa-staff-avatar,
    .eoa-staff-avatar-placeholder,
    .eoa-staff-avatar-any { width: 90px; height: 90px; }

    .eoa-slots { grid-template-columns: repeat(4, 1fr); }

    .eoa-field-row { flex-direction: row; gap: 12px; }

    .eoa-channel-opts { flex-direction: row; }
    .eoa-channel-label { flex: 1; }

    .eoa-btn { flex: 0 0 auto; }
    .eoa-btn-primary { min-width: 200px; }

    .eoa-cal-day { min-height: 44px; font-size: .88rem; }
}

@media (min-width: 700px) {
    #eoa-booking-widget { padding: 0; }
    .eoa-slots { grid-template-columns: repeat(5, 1fr); }
}
