/* ============================================================
   public/css/booking.css  –  Afspraakvorm stijlen
   ============================================================ */

/* ── Pagina-layout ───────────────────────────────────── */
.booking-page { background: var(--bg-alt); }

.booking-main {
    min-height: calc(100vh - 120px);
    padding: 4rem 2rem;
}

.booking-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* ── Kaart ───────────────────────────────────────────── */
.booking-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.booking-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2.5rem 3rem;
    border-bottom: 1px solid var(--border);
}
.booking-card-header h1 { font-size: 2rem; color: #fff; margin-bottom: .35rem; }
.booking-card-header p  { color: rgba(255,255,255,.75); }

.booking-card-body { padding: 3rem; }

/* ── Stap-indicator ──────────────────────────────────── */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}
.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px; left: 0; right: 0;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    position: relative;
    z-index: 1;
    flex: 1;
}
.step-number {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: var(--text-light);
    transition: all .3s;
}
.step.active    .step-number { background: var(--accent);  border-color: var(--accent);  color: #fff; }
.step.completed .step-number { background: #10b981;        border-color: #10b981;        color: #fff; }
.step-label { font-size: .8rem; color: var(--text-light); }
.step.active .step-label { color: var(--accent); font-weight: 600; }

/* ── Stap secties ────────────────────────────────────── */
.bstep { display: none; animation: fadeIn .35s ease; }
.bstep.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

.booking-card-body h2 { font-size: 1.5rem; text-align: left; margin-bottom: 1.5rem; color: var(--text); }

/* ── Formulier ───────────────────────────────────────── */
.form-group { position: relative; margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: .5rem; font-weight: 600; font-size: .95rem; color: var(--text); }
.req { color: #ef4444; margin-left: 2px; }
.opt { color: var(--text-light); font-weight: 400; font-size: .875rem; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: .75rem 1rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); opacity: .6; }
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74,111,165,.15);
}
.form-group input.ok  { border-color: #10b981; }
.form-group input.err { border-color: #ef4444; }
.form-group textarea  { min-height: 100px; resize: vertical; }

.field-ok  { position: absolute; right: 12px; top: 42px; color: #10b981; font-weight: 700; display: none; }
.field-err { color: #ef4444; font-size: .875rem; margin-top: .3rem; display: none; }
.field-ok.show, .field-err.show { display: block; }

.char-count { text-align: right; font-size: .875rem; color: var(--text-light); margin-top: .25rem; }

/* ── Info strip ──────────────────────────────────────── */
.info-strip {
    background: rgba(74,111,165,.12);
    border-left: 4px solid var(--accent);
    padding: .75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    font-size: .95rem;
    color: var(--text-light);
}

/* ── Kalender ────────────────────────────────────────── */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cal-header h3 { color: var(--text); }
.cal-nav {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: .5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}
.cal-nav:hover { background: var(--border); }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .4rem;
    margin-bottom: 1.5rem;
}
.cal-grid.day-names > div { text-align: center; font-weight: 700; font-size: .8rem; color: var(--text-light); padding: .4rem 0; }

.day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--text-light);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
}
.day:hover:not(.past):not(.disabled):not(.empty) { background: var(--primary-light); border-color: var(--accent); color: var(--text); }
.day.selected   { background: var(--accent); color: #fff; font-weight: 700; border-color: var(--accent); }
.day.past       { color: var(--border); cursor: default; }
.day.disabled   { color: var(--border); cursor: default; }
.day.empty      { cursor: default; }

/* ── Tijdsloten ──────────────────────────────────────── */
.sel-date {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.timeslots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: .6rem;
    margin-bottom: 1.5rem;
}
.timeslot {
    padding: .7rem;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all .2s;
    font-size: .9rem;
}
.timeslot:hover:not(.unavail) { border-color: var(--accent); color: var(--text); background: rgba(74,111,165,.1); }
.timeslot.selected   { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeslot.unavail    { background: var(--bg); color: var(--border); cursor: not-allowed; text-decoration: line-through; }

/* ── Samenvatting ────────────────────────────────────── */
.summary {
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.sum-row {
    display: flex;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
}
.sum-row:last-child { border-bottom: none; }
.sum-lbl  { font-weight: 600; width: 110px; flex-shrink: 0; color: var(--text-light); }

/* ── Loading ─────────────────────────────────────────── */
.loading { display: flex; flex-direction: column; align-items: center; padding: 2rem; gap: 1rem; }
.loading.hidden { display: none; }
.spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Succes ──────────────────────────────────────────── */
.success-block { text-align: center; padding: 3rem 1rem; }
.success-icon {
    width: 80px; height: 80px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-size: 2.5rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 2rem;
}
.success-block h2 { font-size: 2rem; margin-bottom: 1rem; text-align: center; }
.success-block p  { color: var(--text-light); margin-bottom: .5rem; }

/* ── Knoppen ─────────────────────────────────────────── */
.btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}
.btn-next, .btn-confirm {
    padding: .875rem 2rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.btn-next:hover, .btn-confirm:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-next:disabled { background: var(--border); cursor: not-allowed; transform: none; }
.btn-back {
    padding: .875rem 2rem;
    background: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.btn-back:hover { background: var(--border); color: var(--text); }

/* ── Sidebar ─────────────────────────────────────────── */
.booking-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sbox {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}
.sbox h4    { color: var(--text); font-size: 1rem; margin-bottom: .75rem; }
.sbox p     { color: var(--text-light); font-size: .9rem; margin-bottom: .5rem; line-height: 1.6; }
.sbox .small{ font-size: .8rem; opacity: .8; }
.sbox a     { color: var(--accent); text-decoration: none; font-size: .9rem; }
.sbox a:hover { text-decoration: underline; }
.checklist  { list-style: none; }
.checklist li {
    color: var(--text-light);
    font-size: .9rem;
    padding: .35rem 0 .35rem 1.5rem;
    position: relative;
}
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .booking-wrap { grid-template-columns: 1fr; }
    .booking-sidebar { order: -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }
}
@media (max-width: 600px) {
    .booking-main { padding: 2rem 1rem; }
    .booking-card-header { padding: 2rem 1.5rem; }
    .booking-card-header h1 { font-size: 1.5rem; }
    .booking-card-body { padding: 1.5rem; }
    .step-label { font-size: .7rem; }
    .timeslots  { grid-template-columns: repeat(auto-fill, minmax(80px,1fr)); }
    .btn-row    { flex-direction: column-reverse; }
    .btn-next, .btn-back, .btn-confirm { width: 100%; text-align: center; }
}

/* ── Datum & Tijd naast elkaar ───────────────────────── */
.datetime-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.datetime-left h2,
.datetime-right h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.datetime-right .timeslots {
    max-height: 320px;
    overflow-y: auto;
}
@media (max-width: 700px) {
    .datetime-wrap {
        grid-template-columns: 1fr;
    }
}
