/* The Check availability page (inquiry.html).
 *
 * The public forms' look (new-family.css): a white sheet, section headings
 * with round icon badges in the KiddoGrid purple. Boxed fields rather than
 * ruled lines, since a family fills this in on their own phone; each child
 * in a card of their own, and the questions as tick boxes. One column on a
 * phone. A file rather than inline styles, because the page's CSP allows
 * styles from this site only. */

:root {
  --ink: #1B2545;           /* brand navy */
  --ink-soft: #5A6078;
  --accent: #6B4EE6;        /* the logo's purple */
  --accent-deep: #5A3FCC;
  --accent-soft: #EEEAFD;
  --accent-faint: #F6F4FE;
  --rule: #C9CCD8;
  --line: #E3E5EC;
  --desk: #EEF0F4;
  --paper: #FFFFFF;
  --error: #B25646;
  --focus: #6B4EE6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.sheet {
  max-width: 860px;
  margin: 24px auto;
  padding: 32px 44px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(27, 37, 69, 0.06);
}

/* ---- Masthead: the daycare's logo, name and details on the left, the title
   right (look A, 26 Nov 2026; the same in new-family.css and apply.css). The
   logo arrives trimmed and at three times this size, so it is only ever
   scaled down: up to 128 x 64 px beside the name, or 300 x 72 above it when
   it is wide (one that spells out the name, say). ---- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand.wide { flex-direction: column; align-items: flex-start; gap: 10px; }
.center-logo { display: block; flex: 0 0 auto; width: auto; height: auto; max-width: 128px; max-height: 64px; }
.brand.wide .center-logo { max-width: 300px; max-height: 72px; }
.center-id { min-width: 0; }
.center-name { margin: 0; font-weight: 700; font-size: 21px; line-height: 1.25; }
.center-line { margin: 3px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.45; overflow-wrap: anywhere; }
#center-phone:not([hidden]) + #center-email::before { content: "·"; margin: 0 7px; }
.title { flex: 1 1 220px; text-align: right; }
.title h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.subtitle { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.intro { margin: 16px 0 0; font-size: 15px; line-height: 1.55; color: #3C4460; }

/* ---- Sections ---- */
.block { padding: 20px 0; border-bottom: 1px solid var(--line); }
.block-title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; font-size: 16px; letter-spacing: 0.03em; text-transform: uppercase;
}
.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); flex: 0 0 auto;
}
.icon.small { width: 26px; height: 26px; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.small svg { width: 15px; height: 15px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; }
.grid3 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; }
.optional { color: var(--ink-soft); font-weight: 400; font-size: 13px; }

/* ---- Fields ---- */
.field { min-width: 0; }
.field > label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
  width: 100%; min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: 8px;
}
textarea { height: auto; min-height: 92px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(107, 78, 230, 0.18);
}
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hint { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---- Children: one card each ---- */
.children { display: flex; flex-direction: column; gap: 12px; }
.kid { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #FAFAFD; }
.kid-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.kid-head h3 { margin: 0; font-size: 14px; color: var(--accent-deep); }
.kid-remove {
  border: none; background: none; padding: 4px 2px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.add-child {
  margin-top: 12px; height: 40px; padding: 0 16px; border: 1px dashed var(--accent); border-radius: 8px;
  background: var(--paper); color: var(--accent-deep); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ---- Questions to tick ---- */
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.topics legend { margin-bottom: 10px; font-size: 15px; color: #3C4460; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.topic {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font-size: 15px; cursor: pointer;
}
.topic input { width: 18px; height: 18px; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--accent); }
.topic.on { border-color: var(--accent); background: var(--accent-faint); font-weight: 600; }

/* ---- Sending ---- */
.send-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 18px 0 6px; }
button.primary {
  height: 48px; padding: 0 30px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
button.primary:hover:not(:disabled) { background: var(--accent-deep); }
button.primary:disabled { opacity: 0.6; cursor: default; }
button.secondary {
  height: 42px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--paper); color: var(--accent-deep); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.privacy, .fine { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

.notice { padding: 16px 18px; border-radius: 8px; background: #F4F1E8; margin: 18px 0; }
.page-loading { text-align: center; padding: 48px 16px; color: var(--ink-soft); }
.page-loading .spinner {
  display: block; width: 28px; height: 28px; margin: 0 auto 14px;
  border: 3px solid var(--rule); border-top-color: var(--accent); border-radius: 50%;
  animation: kg-spin .9s linear infinite;
}
@keyframes kg-spin { to { transform: rotate(360deg); } }
.page-loading-slow { margin-top: 10px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .page-loading .spinner { animation-duration: 2.4s; } }

.error-summary { background: #F8E9E6; color: var(--error); padding: 12px 16px; border-radius: 8px; margin: 16px 0 0; }
.field-error { color: var(--error); font-size: 13px; margin: 4px 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }

/* ---- After Send: thanks, then the daycare's answers ---- */
.done { outline: none; padding-top: 4px; }
.notice-success { background: #E8F4EC; border: 1px solid #CFE6D7; color: #1F5133; }
.notice-success h2 { margin: 0 0 6px; font-size: 19px; }
.notice-success p { margin: 0; font-size: 15px; line-height: 1.55; color: #2C5A3D; }
.qa { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 18px; }
.qa-h {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 13px 18px;
  background: var(--accent-faint); border-bottom: 1px solid #E4DEFB; font-size: 16px;
}
.qa-i { padding: 13px 18px; border-top: 1px solid #EEEFF4; }
.qa-i:first-child { border-top: none; }
.qa-i h3 { margin: 0; font-size: 15px; }
.qa-i p { margin: 5px 0 0; font-size: 15px; line-height: 1.55; color: #3C4460; white-space: pre-line; overflow-wrap: anywhere; }
.done-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 8px; }

/* ---- After Send, with the answer on screen (phase 2): a card per child ---- */
.avail { margin: 0 0 18px; }
.avail-title { margin: 0; font-size: 21px; }
.avail-intro { margin: 6px 0 14px; font-size: 15px; line-height: 1.55; color: #3C4460; }
.avail-list { display: flex; flex-direction: column; gap: 12px; }
.ans { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); break-inside: avoid; }
.ans h3 { margin: 0; font-size: 17px; }
.ans-facts { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.ans-say { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 1.5; }
.ans-say.ok { background: #E8F4EC; color: #1F5133; }
.ans-say.wait { background: #FBF3E2; color: #6B4A0E; }
.ans-say.none { background: #F1F2F5; color: #3C4460; }
.ans-price { margin: 8px 0 0; font-size: 14px; color: #3C4460; }
.avail-note, .avail-follow {
  padding: 14px 16px; border-radius: 10px; background: var(--accent-faint); border: 1px solid #E4DEFB;
  font-size: 14.5px; line-height: 1.55; color: #3C4460; overflow-wrap: anywhere;
}
.avail-note { margin: 12px 0 0; }
.avail-follow { margin: 0 0 18px; }

/* ---- After Send, when the daycare takes tours online: pick a time, then
   the booking in its place (the calendar and times: tour-picker.css) ---- */
.tour-offer { margin: 0 0 18px; padding: 16px 20px 20px; border: 1px solid var(--line); border-radius: 12px; }
.tour-offer-h { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.tour-offer-intro { margin: 6px 0 4px; font-size: 15px; line-height: 1.55; color: #3C4460; }
.tour-offer .tp-month { margin-top: 14px; }
.tour-offer.booked { border-color: #CFE6D7; background: #F4FAF6; }
.tour-offer.booked .icon { background: #2F7A4D; }
.tour-booked { outline: none; }
.tour-booked-when { margin: 10px 0 0; font-size: 16px; font-weight: 700; }
.tour-booked-line { margin: 4px 0 0; font-size: 15px; color: #3C4460; overflow-wrap: anywhere; }
.tour-booked-note {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--paper); border: 1px solid #DCEBE1;
  font-size: 14.5px; line-height: 1.5; color: #3C4460; white-space: pre-line; overflow-wrap: anywhere;
}
.tour-booked-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
a.secondary-link {
  display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--paper); color: var(--accent-deep); font-size: 14.5px; font-weight: 600; text-decoration: none;
}
a.secondary-link:hover { background: var(--accent-faint); }
.tour-booked .fine a { color: var(--accent-deep); font-weight: 600; }

/* ---- Footer: only who runs the page, on the right (the daycare's details are at the top) ---- */
.page-footer {
  display: flex; justify-content: flex-end; align-items: center;
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.page-footer .powered { display: inline-flex; align-items: center; gap: 6px; }
.page-footer .powered img { display: block; width: 88px; height: auto; }

/* "Powered by KiddoGrid" links to kiddogrid.com, in a new tab and with no
   referrer, so a family never loses the form and the link code in this
   page's address never leaves it. It keeps the foot's own colour. */
.powered-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; border-radius: 4px; }
.powered-link:hover { text-decoration: underline; }
.powered-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

[hidden] { display: none !important; }
/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- Phones ---- */
@media (max-width: 680px) {
  .sheet { margin: 0; padding: 20px 16px 18px; border: 0; box-shadow: none; }
  .brand { gap: 12px; align-items: flex-start; }
  .center-logo { max-width: 104px; max-height: 52px; }
  .brand.wide .center-logo { max-width: 100%; max-height: 60px; }
  .center-name { font-size: 19px; }
  .center-line { font-size: 13.5px; }
  .title { text-align: left; }
  .title h1 { font-size: 22px; }
  .grid2, .grid3, .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .kid { padding: 12px; }
  button.primary { width: 100%; }
  .tour-offer { padding: 14px 14px 16px; }
  .tour-booked-actions { flex-direction: column; }
  a.secondary-link { justify-content: center; }
}

/* ---- Printing the answers ---- */
@media print {
  body { background: #fff; }
  .sheet { margin: 0; border: 0; box-shadow: none; max-width: none; padding: 0; }
  .done-actions button { display: none; }
  /* A tour not booked has nothing to print; a booked one prints without its buttons. */
  .tour-offer:not(.booked), .tour-booked-actions { display: none; }
}
