/* =========================================================================
   Chairday app additions to the Daylight kit (chairday.css).
   Only what the kit does not cover: plain pages, tooltips, admin bits.
   Tokens only, no literal colours, so both themes work.
   ========================================================================= */
.cd-plain { background: var(--cd-bg); color: var(--cd-text); }
.cd-plain__main { padding-block: clamp(32px, 8vh, 96px); display: flex; flex-direction: column; gap: 24px; }
.cd-plain__logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.cd-plain__logo img { height: 40px; width: auto; }
.cd-sidenav__form { margin: 0; }
.cd-sidenav__button { width: 100%; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }

/* Tooltips: any element with data-tip shows it on hover and keyboard focus */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 30;
  width: max-content; max-width: min(320px, 80vw); padding: 8px 10px; border-radius: 8px;
  background: var(--cd-ink); color: var(--cd-chalk); font: 500 0.8125rem/1.4 var(--cd-font-ui);
  white-space: normal; box-shadow: 0 6px 20px rgba(6, 32, 42, 0.25); pointer-events: none;
}
.cd-field__labelrow { display: flex; align-items: center; gap: 6px; }

/* Settings and system pages */
.cd-settings-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cd-kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 0; }
.cd-kv dt { color: var(--cd-text-muted); }
.cd-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cd-code { font-family: var(--cd-font-mono); font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.cd-qr-img { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 12px; }
.cd-recovery { columns: 2; font-family: var(--cd-font-mono); font-size: 1.0625rem; letter-spacing: 0.08em; padding-left: 1.2em; }
.cd-stack { display: flex; flex-direction: column; gap: 16px; }
.cd-stack--lg { gap: 32px; }
.cd-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Option cards with a long aside (the signup plan prices): on narrow screens the aside
   takes its own row under the title, so the card never runs past 320px (WCAG 1.4.10) */
@media (max-width: 599.98px) {
  .cd-option:has(> .cd-option__aside) { flex-wrap: wrap; row-gap: 4px; }
  .cd-option > .cd-option__aside { order: 10; flex: 1 1 100%; min-width: 0; }
}
/* A text link that starts with an icon ("Back to your booking", "Search the help centre"):
   a little room between the icon and the words, never glued together */
.cd-link > .cd-icon:first-child { margin-inline-end: 0.3em; vertical-align: -0.2em; }
.cd-ok { color: var(--cd-success, var(--cd-text)); }
.cd-bad { color: var(--cd-danger, var(--cd-text)); }
