/* Huisstijl-invoer: kalender, dag/maand-kiezer, tijdmasker + gsm-klok, mooi keuzevak.
   Leesbaar en los van app.js. Alle kleuren uit de bestaande huisstijl-variabelen. */

/* ---- gemeenschappelijke knop (toont de gekozen waarde) ---- */
.pk-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong, #d7cdba);
  background: none;
  padding: 7px 2px;
  font: inherit;
  color: var(--ink, #1f1a14);
  cursor: pointer;
  margin-top: 3px;
}
.pk-btn:hover { border-color: var(--new, #b9753f); }
.pk-btn.pk-open { border-color: var(--new, #b9753f); }
.pk-btn .pk-ic { width: 18px; height: 18px; color: var(--muted, #8a8178); flex: none; }
.pk-btn .pk-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-btn.pk-empty .pk-val { color: var(--muted, #8a8178); }
.pk-btn .pk-caret { width: 16px; height: 16px; color: var(--muted, #8a8178); flex: none; transition: transform .15s; }
.pk-btn.pk-open .pk-caret { transform: rotate(180deg); }

/* ---- zwevend paneel ---- */
.pk-pop {
  position: fixed;
  z-index: 5200;
  background: var(--surface, #fbf8f3);
  color: var(--ink, #1f1a14);
  border: 1px solid var(--line, #e4dccd);
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(60, 40, 10, .28);
  padding: 12px;
  animation: pkPop .13s ease;
}
@keyframes pkPop { from { opacity: 0; transform: translateY(-4px); } }
.pk-backdrop { position: fixed; inset: 0; z-index: 5190; background: transparent; }

/* ---- kalender ---- */
.pk-cal { width: 268px; }
.pk-cal-top { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.pk-nav {
  width: 30px; height: 30px; border: 0; border-radius: 9px; background: none;
  color: var(--ink, #1f1a14); cursor: pointer; display: grid; place-items: center; flex: none;
}
.pk-nav:hover { background: var(--surface-2, #efe8dc); }
.pk-nav svg { width: 18px; height: 18px; }
.pk-title {
  flex: 1; text-align: center; background: none; border: 0; cursor: pointer;
  font-weight: 700; font-size: .98rem; color: var(--ink, #1f1a14); padding: 6px; border-radius: 8px;
  font-family: var(--serif, Georgia, serif);
}
.pk-title:hover { background: var(--surface-2, #efe8dc); }
.pk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.pk-dow { text-align: center; font-size: .68rem; color: var(--muted, #8a8178); font-weight: 600; padding: 2px 0; }
.pk-day {
  aspect-ratio: 1; border: 0; background: none; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: .86rem; color: var(--ink, #1f1a14); display: grid; place-items: center;
}
.pk-day:hover { background: var(--surface-2, #efe8dc); }
.pk-day.pk-other { color: var(--muted, #8a8178); opacity: .5; }
.pk-day.pk-today { box-shadow: inset 0 0 0 1.5px var(--line-strong, #d7cdba); }
.pk-day.pk-sel { background: var(--new, #b9753f); color: #fff; font-weight: 700; }
.pk-day.pk-sel:hover { background: var(--new, #b9753f); }

/* snelkeuzes onderaan de kalender */
.pk-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; border-top: 1px solid var(--line, #e4dccd); padding-top: 10px; }
.pk-quick button {
  border: 0; background: var(--surface-2, #efe8dc); color: var(--ink, #1f1a14);
  border-radius: 20px; padding: 6px 12px; font: inherit; font-size: .8rem; cursor: pointer;
}
.pk-quick button:hover { background: var(--line, #e4dccd); }
.pk-quick .pk-clear { margin-left: auto; color: var(--muted, #8a8178); background: none; }

/* jaar- en maandroosters (voor snelle sprong, o.a. geboortedatum) */
.pk-months, .pk-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 268px; }
.pk-years { max-height: 232px; overflow-y: auto; scrollbar-width: thin; }
.pk-mo, .pk-yr {
  border: 0; background: var(--surface-2, #efe8dc); color: var(--ink, #1f1a14);
  border-radius: 9px; padding: 11px 4px; font: inherit; font-size: .88rem; cursor: pointer;
}
.pk-mo:hover, .pk-yr:hover { background: var(--line, #e4dccd); }
.pk-mo.pk-sel, .pk-yr.pk-sel { background: var(--new, #b9753f); color: #fff; font-weight: 700; }

/* ---- dag/maand-kiezer (periode, geen jaar) ---- */
.pk-md { width: 268px; }

/* ---- mooi keuzevak ---- */
.pk-opts { min-width: 180px; max-width: min(92vw, 340px); max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.pk-search {
  width: 100%; border: 0; border-bottom: 1.5px solid var(--line, #e4dccd); background: none;
  padding: 6px 4px 9px; font: inherit; color: var(--ink, #1f1a14); margin-bottom: 6px;
}
.pk-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: none; border-radius: 9px; padding: 9px 10px; font: inherit;
  font-size: .92rem; color: var(--ink, #1f1a14); cursor: pointer;
}
.pk-opt:hover, .pk-opt.pk-cursor { background: var(--surface-2, #efe8dc); }
.pk-opt.pk-sel { font-weight: 700; }
.pk-opt .pk-tick { width: 16px; height: 16px; color: var(--new, #b9753f); flex: none; opacity: 0; }
.pk-opt.pk-sel .pk-tick { opacity: 1; }
.pk-opt .pk-sub { display: block; font-size: .76rem; color: var(--muted, #8a8178); font-weight: 400; }

/* ---- tijdmasker met zichtbaar uu:mm-skelet ---- */
.pk-tw {
  position: relative;
  display: block;
  margin-top: 3px;
  background: #fff;
  border: 1px solid var(--line-strong, #d7cdba);
  border-radius: 8px;
}
.pk-tw:focus-within { outline: 2px solid var(--ink-soft, #e4dccd); border-color: var(--ink, #1f1a14); }
.pk-tw > .pk-time {
  border: 0; background: transparent; position: relative; z-index: 1; width: 100%;
  font-variant-numeric: tabular-nums;
}
.pk-tw > .pk-time:focus { outline: none; }
.pk-ghost {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  padding: 9px 11px; border: 1px solid transparent;
  font: inherit; font-weight: 400; font-variant-numeric: tabular-nums;
  white-space: pre; overflow: hidden; color: var(--muted, #8a8178);
}
.pk-ghost .pk-g0 { color: transparent; }

/* ---- gsm-klok (bottom-sheet met twee kolommen) ---- */
.pk-clock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5300;
  background: var(--surface, #fbf8f3); color: var(--ink, #1f1a14);
  border-radius: 20px 20px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, .3);
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  animation: pkUp .2s ease;
}
@keyframes pkUp { from { transform: translateY(100%); } }
.pk-clock-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pk-clock-h h3 { margin: 0; font-family: var(--serif, Georgia, serif); font-size: 1.05rem; }
.pk-clock-done { border: 0; background: var(--ink, #1f1a14); color: #fff; border-radius: 20px; padding: 8px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.pk-clock-read { text-align: center; font-family: var(--serif, Georgia, serif); font-size: 2.1rem; font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.pk-clock-read b { color: var(--new, #b9753f); }
.pk-cols { display: flex; gap: 10px; }
.pk-col { flex: 1; }
.pk-col-lab { text-align: center; font-size: .72rem; color: var(--muted, #8a8178); font-weight: 600; margin-bottom: 4px; }
.pk-col-scroll {
  height: 180px; overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 12px;
  background: var(--surface-2, #efe8dc); padding: 70px 0; scrollbar-width: none;
}
.pk-col-scroll::-webkit-scrollbar { display: none; }
.pk-cell {
  height: 40px; scroll-snap-align: center; display: grid; place-items: center;
  font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--muted, #8a8178); cursor: pointer;
}
.pk-cell.pk-q { font-weight: 600; }
.pk-cell.pk-on { color: var(--new, #b9753f); font-weight: 700; font-size: 1.3rem; }
.pk-clock-back { position: fixed; inset: 0; z-index: 5290; background: rgba(20, 15, 10, .4); }

@media (max-width: 560px) {
  .pk-pop { left: 8px !important; right: 8px; width: auto; max-width: none; }
  .pk-cal, .pk-md, .pk-months, .pk-years { width: 100%; }
}
.pk-day.pk-dis, .pk-day:disabled { opacity: .28; cursor: not-allowed; background: none !important; text-decoration: line-through; }
.pk-quick button:disabled { opacity: .35; cursor: not-allowed; }
