/**
 * app.css - gedeeld door index.html, reserve.html, modify.html en overview.html.
 * Alle generieke chrome (layout, knoppen, modal, tags, spinner) staat hier
 * met dezelfde maten/kleuren op elke pagina. Wat overblijft in de losse
 * <style>-blokken per pagina is echt paginaspecifiek (accordions, tabellen,
 * het reserveringsformulier, het startmenu).
 */

:root{
  /* let op: dit pad is t.o.v. dít bestand (assets/app.css), dus '../'
     om bij bg.webp in de webroot te komen — niet t.o.v. de HTML-pagina */
  --bg-url: url('../bg.webp');
  --input-fs: 16px;
  --input-h: 48px;
}

html, body { min-height:100%; margin:0; }
body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#111827; font-size:15px;
}
body::before{ content:""; position:fixed; inset:0; background:var(--bg-url) center/cover no-repeat; z-index:-2; }
body::after{ content:""; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:-1; }

.container{ max-width: 920px; margin: 32px auto; padding: 0 16px; }

.card{
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.2) blur(6px);
  border:1px solid #e5e7eb; border-radius:16px; padding:22px;
  box-shadow:0 10px 24px rgba(0,0,0,.10);
  max-width:840px; margin:0 auto;
}
h1{
  color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.35);
  margin: 8px 0 16px; text-align:center;
}

/* Kop met "wie ben ik" + terugknop (reserve/modify/overview) */
.cardTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.whoLine{
  font-weight:500;
  color:#6b7280;
  opacity:.9;
  font-size:14px;
  line-height:1.3;
  max-width:65%;
}
.backBtn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  height:44px;
  padding: 0 14px;
  border-radius:14px;
  border:1px solid #111827;
  background:#111827;
  color:#fff;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
  white-space:nowrap;
}
.backBtn:active{ transform: scale(.99); }
.backIcon{ width:18px; height:18px; flex: 0 0 auto; }

.row{ margin-bottom:14px; max-width:760px; margin-left:auto; margin-right:auto; }
label{ display:block; font-weight:600; margin-bottom:6px; }

input[type="text"], input[type="email"], input[type="date"]{
  width:100%;
  border:2px solid #d1d5db; border-radius:10px; background:#fff;
  font-size:var(--input-fs); font-family:inherit; box-sizing:border-box;
  height:var(--input-h);
  padding:12px; line-height:1.4;
  transition:border-color .15s ease;
}
input.valid{ border-color:#16a34a; }
input.invalid{ border-color:#dc2626; }

input[readonly], input[disabled]{
  background:#f3f4f6;
  color:#111827;
  opacity:1;
  cursor:not-allowed;
}
input[type="date"]{
  -webkit-appearance:none; appearance:none;
  padding:12px 40px 12px 12px;
}

.note{
  background:#f3f4f6; color:#000; border:1px solid #000;
  border-radius:12px; padding:12px 16px; margin:0 auto 14px;
  max-width:760px;
}
.note ul{ margin:0; padding-left:20px; list-style-type:square; }
.note li{ margin-bottom:6px; }

.tag{
  display:inline-block;
  padding:6px 10px;
  border-radius:9999px;
  font-weight:700;
  font-size:13px;
  border:1px solid #e5e7eb;
  margin-right:8px;
}
.tag.ok{ background:#ecfdf5; border-color:#d1fae5; color:#065f46; }
.tag.err{ background:#fee2e2; border-color:#fecaca; color:#991b1b; }
.tag.info{ background:#eff6ff; border-color:#dbeafe; color:#1d4ed8; }

.btnRow{
  max-width:760px;
  margin:0 auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.btn{
  height:44px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid #d1d5db;
  color: #000;
  background:#fff;
  font-weight:700;
  font-size: 15px;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn.primary{ border:none; background:#111827; color:#fff; }
.btn[disabled]{ opacity:.6; cursor:not-allowed; }

.muted{ color:#6b7280; font-weight:600; font-size:15px; }
.mono{ font-variant-numeric: tabular-nums; white-space:nowrap; }

/* Modal */
.modal-overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  z-index:9999;
  padding:18px;
  box-sizing:border-box;
}
.modal-overlay.open{ display:flex; align-items:center; justify-content:center; }
.modal{
  width:min(520px, 100%);
  background:#fff;
  border-radius:16px;
  border:1px solid #e5e7eb;
  box-shadow:0 18px 40px rgba(0,0,0,.25);
  overflow:hidden;
  max-height: calc(100dvh - 36px);
  display:flex;
  flex-direction:column;
}
.modal-header{
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #e5e7eb;
}
.modal-title{ font-weight:700; }
.modal-close{
  border:none;
  background:transparent;
  font-size:22px;
  cursor:pointer;
  line-height:1;
  padding:6px 10px;
  border-radius:10px;
}
.modal-body{ padding:14px 16px; overflow:auto; }
.modal-actions{
  padding:12px 16px;
  border-top:1px solid #e5e7eb;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

.loaderRow{
  display:flex;
  align-items:center;
  gap:12px;
  padding:6px 0;
}
.spinner{
  width:22px; height:22px;
  border-radius:9999px;
  border:3px solid #d1d5db;
  border-top-color:#111827;
  animation: spin 0.8s linear infinite;
  flex:0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width:900px){
  body{ font-size:17px; }
  :root{ --input-fs:17px; --input-h:48px; }
  .container{ margin:0; padding:0; max-width:100vw; width:100vw; }
  .card{
    border-radius:12px;
    width:calc(100vw - 32px);
    margin:16px auto;
    min-height:auto;
    box-shadow:0 6px 18px rgba(0,0,0,.12);
    padding:16px;
    max-width:none;
  }
  h1{ margin:12px 12px 8px; font-size:22px; }
  .row, .note, .btnRow{ max-width:none; }
  body::before, body::after{ position:fixed; }

  .cardTop{ flex-direction:column; align-items:stretch; }
  .whoLine{ max-width:100%; }
  .backBtn{ width:100%; justify-content:center; height:48px; font-size:16px; }
}
