/* Demo booking page (/demo/) and its confirmation. Sits on the home page's
   .hc-page tokens so it reads as part of the marketing site. */

/* Same side padding as the home page's sections, so the page lines up with the nav. */
.hc-page .demo-shell{
  padding-block: clamp(2rem, 5vw, 3.5rem);
  padding-inline: clamp(1.5rem, 3vw, 4rem);
}
/* Content sits in a narrower centred column; the nav above keeps the full width. */
.demo-wrap{ max-width: 72rem; margin-inline: auto; }
.demo-heading{ margin-bottom: 2rem; max-width: 42rem; }
/* Staff only: a shortcut to the staff demos page, set to the right of the heading. */
.demo-staff-bar{ float: right; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; margin: 0.5rem 0 0 1rem; }
.demo-staff-note{ font-size: 0.75rem; color: var(--varial-gray-600); }
.demo-staff-link{
  display: inline-flex; align-items: center;
  padding: 0.5rem 1rem; border-radius: 8px;
  border: 1.5px solid var(--hc-accent); color: var(--hc-accent) !important;
  font-weight: 600; text-decoration: none;
}
.demo-staff-link:hover{ background: var(--hc-accent); color: var(--varial-white) !important; }
.demo-heading h1{
  font-family: var(--hc-font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}
.demo-heading p{ color: var(--varial-gray-700); font-size: 1.05rem; }

.demo-form{
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  /* Both cards take the height of the taller one, so the pair reads as one block. */
  align-items: stretch;
}
@media (max-width: 860px){
  .demo-form{ grid-template-columns: minmax(0, 1fr); }
}

.demo-card{
  background: var(--hc-surface);
  border: 1px solid var(--varial-border);
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 0;
}
/* The legend floats (Bootstrap) so it sits inside the card; everything after it clears. */
.demo-card > :not(legend){ clear: both; }
.demo-card-title{
  font-family: var(--hc-font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
/* The picker card is tinted teal so the two steps read as separate panels;
   its buttons stay white so the choices stand out against it. */
.demo-picker{
  background: color-mix(in srgb, var(--varial-marketing-energy) 6%, var(--hc-surface));
  border-color: color-mix(in srgb, var(--varial-marketing-energy) 22%, transparent);
}
.demo-zone{ color: var(--varial-gray-600); font-size: 0.9rem; margin-bottom: 1rem !important; }

/* Days laid out as working weeks: a label column, then one column per weekday. */
.demo-day-tabs{
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.demo-week{
  display: grid;
  grid-template-columns: 6.5rem repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: center;
}
.demo-weeks--6 .demo-week{ grid-template-columns: 6.5rem repeat(6, minmax(0, 1fr)); }
.demo-weeks--7 .demo-week{ grid-template-columns: 6.5rem repeat(7, minmax(0, 1fr)); }
.demo-week-day-name{
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--varial-gray-600);
}
.demo-week-label{ font-size: 0.85rem; font-weight: 600; color: var(--varial-gray-700); }
.demo-day-tab{
  padding: 0.55rem 0.25rem;
  border: 1px solid var(--varial-border);
  border-radius: 8px;
  background: var(--hc-surface);
  color: var(--varial-gray-900);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}
.demo-day-tab{ display: flex; justify-content: center; align-items: baseline; gap: 0.3em; }
.demo-day-tab strong{ font-weight: 600; }
.demo-day-tab:not(:disabled):hover{ border-color: var(--hc-accent); }
.demo-day-tab:disabled{
  background: transparent;
  border-style: dashed;
  color: var(--varial-gray-400, #9aa3ab);
  cursor: default;
}
.demo-day-tab[aria-pressed="true"]{
  border-color: var(--hc-accent);
  background: var(--hc-accent);
  color: var(--varial-white);
}
@media (max-width: 560px){
  .demo-week,
  .demo-weeks--6 .demo-week,
  .demo-weeks--7 .demo-week{ grid-template-columns: repeat(var(--demo-cols, 5), minmax(0, 1fr)); }
  .demo-week-label{ grid-column: 1 / -1; margin-top: 0.4rem; }
  .demo-day-tab{ flex-direction: column; align-items: center; gap: 0; padding: 0.4rem 0.1rem; line-height: 1.15; }
  .demo-day-tab span{ font-size: 0.75rem; }
  .demo-week--head > span:first-child{ display: none; }
  .demo-weeks--6{ --demo-cols: 6; }
  .demo-weeks--7{ --demo-cols: 7; }
}

.demo-day + .demo-day{ margin-top: 1.25rem; }
.demo-days.is-paged .demo-day{ margin-top: 0; }
.demo-days.is-paged .demo-day:not(.is-current){ display: none; }
.demo-days.is-paged .demo-day-title{ display: none; }
.demo-day-title{ font-size: 1rem; font-weight: 600; margin-bottom: 0.6rem !important; }

.demo-times{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.5rem;
}
.demo-time,
.demo-product{
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--varial-border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--varial-gray-900);
  background: var(--hc-surface);
}
.demo-time:hover,
.demo-product:hover{ border-color: var(--hc-accent); }
.btn-check:checked + .demo-time,
.btn-check:checked + .demo-product{
  background: var(--hc-accent);
  border-color: var(--hc-accent);
  color: var(--varial-white);
}
.btn-check:focus-visible + .demo-time,
.btn-check:focus-visible + .demo-product{
  outline: 2px solid var(--hc-accent);
  outline-offset: 2px;
}

.demo-products{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.demo-product{ min-height: 3.25rem; font-weight: 600; }
/* A time is always one line; the grid gives each one room for the longest label. */
.demo-time{ white-space: nowrap; font-size: 0.9rem; }
@media (max-width: 560px){
  .demo-times{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-time{ font-size: 0.8rem; padding-inline: 0.25rem; }
}

/* Each product choice wears its brand colour: Energy teal, X violet, Both ink. */
.demo-product--energy{ --demo-brand: var(--varial-marketing-energy); }
.demo-product--x{ --demo-brand: var(--varial-marketing-x-action-on-light); }
.demo-product--both{ --demo-brand: var(--varial-marketing-ink); }
.demo-products .demo-product{
  color: var(--demo-brand);
  border-color: color-mix(in srgb, var(--demo-brand) 35%, transparent);
}
.demo-products .demo-product:hover{ border-color: var(--demo-brand); }
.demo-products .btn-check:checked + .demo-product{
  background: var(--demo-brand);
  border-color: var(--demo-brand);
  color: var(--varial-white);
}
.demo-field-row{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 480px){
  .demo-field-row{ grid-template-columns: minmax(0, 1fr); }
}

.demo-picked{
  background: var(--hc-bg-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem !important;
  font-weight: 500;
}
.demo-empty{ color: var(--varial-gray-700); }

.demo-sent{ max-width: 40rem; margin: 0 auto; }
.demo-sent h1{ font-family: var(--hc-font-serif); font-size: 2rem; margin-bottom: 1rem; }
.demo-sent p + p{ margin-top: 0.75rem; }

/* Change-or-cancel page (/demo/manage/<token>/). */
.demo-manage-actions{ display: flex; flex-direction: column; }
.demo-manage-actions .demo-card-title{ font-family: var(--hc-font-serif); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.demo-cancel-btn{
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: #b42318;
  font-weight: 600;
  text-decoration: underline;
}
