/* DC Termine. Override the variables on .dct (accent colour and title font also come from the settings). */
.dct {
  --dct-accent: #2e5a79;
  --dct-accent-soft: color-mix(in srgb, var(--dct-accent) 10%, #fff);
  --dct-text: #17181b;
  --dct-muted: #5d5f64;
  --dct-line: #e6e2da;
  --dct-field: #d3cec4;
  --dct-bg: #ffffff;
  --dct-soft: #f6f4ef;
  --dct-err: #b3261e;
  color: var(--dct-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  max-width: 480px;
  text-align: left;
}
.dct *, .dct *::before, .dct *::after { box-sizing: border-box; }
.dct p { margin: 0; }
.dct button { font: inherit; color: inherit; }
.dct [hidden] { display: none !important; }
.dct.is-loading .dct-bd { opacity: .55; pointer-events: none; transition: opacity .15s; }
.dct-ico { display: inline-grid; place-items: center; flex: none; }
.dct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* card */
.dct-card { background: var(--dct-bg); border: 1px solid var(--dct-line); border-radius: 20px; box-shadow: 0 1px 2px rgba(12, 13, 15, .04), 0 18px 40px -22px rgba(12, 13, 15, .28); display: flex; flex-direction: column; overflow: hidden; }

/* head */
.dct-hd { display: flex; gap: 14px; align-items: center; padding: 20px 22px 16px; }
.dct-hd__img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--dct-bg), 0 0 0 4px var(--dct-line); }
.dct-hd__txt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.dct-hd__title { font-family: var(--dct-font-head, inherit); font-size: 1.15rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.dct-hd__who { color: var(--dct-muted); font-size: .9rem; }
.dct-hd__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px !important; color: var(--dct-muted); font-size: .85rem; }
.dct-hd__meta > span { display: inline-flex; gap: 5px; align-items: center; }
.dct-hd__meta .dct-ico { color: var(--dct-accent); }
.dct-x { align-self: flex-start; width: 40px; height: 40px; margin: -6px -8px 0 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--dct-muted); }
.dct-x:hover { background: var(--dct-soft); color: var(--dct-text); }

/* steps */
.dct-steps { list-style: none; margin: 0; padding: 0 22px 14px; display: flex; gap: 8px; border-bottom: 1px solid var(--dct-line); }
.dct-steps li { flex: 1; display: flex; gap: 6px; align-items: center; padding-top: 9px; position: relative; font-size: .78rem; font-weight: 600; color: var(--dct-muted); }
.dct-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--dct-line); }
.dct-steps li span { display: none; }
.dct-steps li.is-on, .dct-steps li.is-done { color: var(--dct-text); }
.dct-steps li.is-on::before, .dct-steps li.is-done::before { background: var(--dct-accent); }

/* body and foot */
.dct-bd { padding: 14px 22px 16px; display: grid; gap: 12px; align-content: start; }
.dct-ft { padding: 13px 22px 16px; border-top: 1px solid var(--dct-line); display: grid; gap: 10px; background: var(--dct-bg); }
.dct-ft__row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.dct-pick { color: var(--dct-muted); font-size: .9rem; }
.dct-pick.is-set { color: var(--dct-text); font-weight: 600; }
.dct-note { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--dct-muted); font-size: .85rem; }
.dct-h { font-family: var(--dct-font-head, inherit); font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; outline: none; }
.dct-msg { font-weight: 600; outline: none; }
.dct-old { color: var(--dct-muted); font-size: .9rem; }
.dct-alert { background: #fff4e5; border: 1px solid #f0c27a; border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.dct-select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--dct-field); border-radius: 12px; background: var(--dct-bg); color: inherit; font: inherit; }

/* week */
.dct-week { display: grid; gap: 10px; }
.dct-week__nav { display: flex; align-items: center; justify-content: space-between; }
.dct-week__title { font-weight: 600; font-size: .95rem; outline: none; }
.dct-week__arrows { display: flex; gap: 6px; }
.dct-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--dct-line); background: var(--dct-bg); display: grid; place-items: center; cursor: pointer; color: var(--dct-text); }
.dct-arrow:hover:not(:disabled) { border-color: var(--dct-accent); color: var(--dct-accent); }
.dct-arrow:disabled { opacity: .35; cursor: default; }
.dct-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dct-day { height: 62px; padding: 0; border-radius: 14px; border: 1px solid var(--dct-line); background: var(--dct-bg); display: grid; place-content: center; gap: 1px; text-align: center; font-variant-numeric: tabular-nums; }
button.dct-day { cursor: pointer; }
button.dct-day:hover { border-color: var(--dct-accent); }
.dct-day__dow { font-size: .72rem; font-weight: 600; color: var(--dct-muted); }
.dct-day__num { font-size: 1.08rem; font-weight: 700; line-height: 1.2; }
.dct-day.is-sel { background: var(--dct-accent); border-color: var(--dct-accent); color: #fff; box-shadow: 0 8px 18px -10px var(--dct-accent); }
.dct-day.is-sel .dct-day__dow { color: rgba(255, 255, 255, .8); }
.dct-day.is-off { border-color: transparent; background: transparent; color: var(--dct-muted); opacity: .4; }

/* times */
.dct-times { display: grid; gap: 14px; }
.dct-times__day { font-weight: 600; }
.dct-group { display: grid; gap: 8px; }
.dct-group__name { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dct-muted); }
.dct-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dct-slot { height: 42px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--dct-accent) 30%, transparent); background: var(--dct-bg); color: var(--dct-accent) !important; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .12s, color .12s; }
.dct-slot:hover { background: var(--dct-accent-soft); }
.dct-slot.is-sel { background: var(--dct-accent); border-color: var(--dct-accent); color: #fff !important; }
.dct-empty { color: var(--dct-muted); padding: 18px 0; text-align: center; }
@media (max-width: 359px) { .dct-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* buttons */
.dct-btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; border: 1.5px solid var(--dct-accent); background: var(--dct-accent); color: #fff !important; font-weight: 600; text-decoration: none; cursor: pointer; transition: filter .12s, opacity .12s; }
.dct-btn:hover:not(:disabled) { filter: brightness(1.1); }
.dct-btn:disabled { opacity: .4; cursor: default; }
.dct-btn--ghost { background: transparent; color: var(--dct-accent) !important; }
.dct-btn--wide { width: 100%; }
.dct-link { background: none; border: 0; padding: 4px 0; color: var(--dct-accent) !important; font-weight: 600; cursor: pointer; }
.dct button:focus-visible, .dct a:focus-visible, .dct input:focus-visible, .dct textarea:focus-visible, .dct select:focus-visible { outline: 3px solid color-mix(in srgb, var(--dct-accent) 45%, transparent); outline-offset: 2px; }

/* summary */
.dct-sum { display: flex; gap: 12px; align-items: center; background: var(--dct-soft); border-radius: 14px; padding: 10px 14px; }
.dct-sum > .dct-ico { color: var(--dct-accent); }
.dct-sum > div { flex: 1; min-width: 0; }
.dct-sum__day { font-weight: 600; }
.dct-sum__time { color: var(--dct-muted); font-size: .92rem; }
.dct-sum.is-cancelled .dct-sum__day, .dct-sum.is-cancelled .dct-sum__time { text-decoration: line-through; }

/* form */
.dct-form { display: grid; gap: 10px; }
.dct-field { display: grid; gap: 4px; }
.dct-field label { font-weight: 600; font-size: .88rem; }
.dct-opt { font-weight: 400; color: var(--dct-muted); }
.dct-field input[type=text], .dct-field input[type=email], .dct-field input[type=tel], .dct-field textarea {
  width: 100%; min-height: 42px; padding: 8px 13px; border: 1px solid var(--dct-field); border-radius: 11px; background: var(--dct-bg); color: inherit; font: inherit; font-size: 16px; transition: border-color .12s, box-shadow .12s;
}
.dct-field input:focus, .dct-field textarea:focus { border-color: var(--dct-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dct-accent) 18%, transparent); outline: none; }
.dct-field textarea { min-height: 56px; resize: vertical; }
.dct-field input[aria-invalid=true], .dct-field textarea[aria-invalid=true] { border-color: var(--dct-err); }
.dct-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 10px; }
.dct-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--dct-accent); }
.dct-check label { font-weight: 400; font-size: .92rem; }
.dct-check a { color: inherit; }
.dct-check .dct-err { grid-column: 1 / -1; }
.dct-policy { display: flex; gap: 8px; align-items: flex-start; padding-top: 2px; }
.dct-policy > .dct-ico { color: var(--dct-accent); margin-top: 2px; }
.dct-policy__txt { font-size: .82rem; line-height: 1.45; color: var(--dct-muted); white-space: pre-line; }
.dct-err { color: var(--dct-err); font-size: .88rem; }
.dct-err:empty { display: none; }
.dct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Room for a sticky site header when focus jumps to a field or the inline widget scrolls into view. */
.dct, .dct input, .dct textarea { scroll-margin-top: var(--dct-scroll-offset, 110px); }

/* done */
.dct-done { display: grid; gap: 14px; justify-items: center; text-align: center; padding-top: 6px; }
.dct-done .dct-sum { width: 100%; text-align: left; }
.dct-done__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--dct-accent-soft); color: var(--dct-accent); animation: dct-pop .35s ease-out both; }
.dct-done__txt { color: var(--dct-muted); font-size: .95rem; }
@keyframes dct-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* loading */
.dct-skel { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dct-skel span { height: 62px; border-radius: 14px; background: linear-gradient(90deg, var(--dct-soft) 25%, #ece9e2 50%, var(--dct-soft) 75%); background-size: 200% 100%; animation: dct-shim 1.1s linear infinite; }
.dct-skel--times { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dct-skel--times span { height: 44px; border-radius: 12px; }
@keyframes dct-shim { to { background-position: -200% 0; } }

/* step changes fade in */
.dct-bd > * { animation: dct-fade .18s ease-out both; }
@keyframes dct-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- window over the page ---------- */
html.dct-lock { overflow: hidden; }
.dct-dialog { padding: 0; margin: auto; border: 0; background: transparent; width: min(480px, calc(100vw - 32px)); max-width: none; max-height: none; overflow: visible; color: inherit; }
.dct-dialog::backdrop { background: rgba(12, 13, 15, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dct-dialog .dct { max-width: none; }
.dct--dialog .dct-card { max-height: min(820px, calc(100dvh - 36px)); border: 0; box-shadow: 0 30px 80px -20px rgba(12, 13, 15, .55); }
.dct--dialog .dct-bd { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--dct-line) transparent; }
.dct--dialog .dct-hd, .dct--dialog .dct-steps, .dct--dialog .dct-ft { flex: none; }
.dct-dialog.is-open { animation: dct-in .22s cubic-bezier(.2, .8, .2, 1) both; }
.dct-dialog.is-open::backdrop { animation: dct-dim .22s ease-out both; }
@keyframes dct-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dct-dim { from { opacity: 0; } to { opacity: 1; } }
@keyframes dct-up { from { transform: translateY(100%); } to { transform: none; } }

/* phones: a sheet from the bottom */
@media (max-width: 560px) {
  .dct-dialog { width: 100%; margin: auto 0 0; }
  .dct--dialog .dct-card { max-height: 92dvh; border-radius: 22px 22px 0 0; }
  .dct--dialog .dct-hd { padding-top: 22px; position: relative; }
  .dct--dialog .dct-hd::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--dct-line); }
  .dct--dialog .dct-ft { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .dct-dialog.is-open { animation-name: dct-up; }
  .dct-hd, .dct-bd, .dct-ft { padding-left: 18px; padding-right: 18px; }
  .dct-hd { gap: 12px; padding-bottom: 14px; }
  .dct-hd__img { width: 44px; height: 44px; }
  .dct-hd__role { display: none; }
  .dct-hd__meta { font-size: .8rem; gap: 2px 10px; }
  .dct-bd { padding-top: 14px; gap: 14px; }
  .dct-steps { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .dct *, .dct-dialog, .dct-dialog::backdrop { animation: none !important; transition: none !important; }
}
