/* QLIQQI Booking: the businesses' public pages (docs/m4-plan.md, design call 4, and the look
   of docs/booking-page-design.md): a light grey page with white cards, about 760 px wide,
   so it also sits well in a frame on the business's own site.
   The business's colours, font and corners arrive as variables from
   /<slug>/theme/<key>.css, loaded after this file; the values below are the defaults
   (app/colors.py, app/look.py). Text on the header and on the main colour is black or
   white, whichever contrasts more; --link is the main colour, or a darker shade of it where
   it is too light for text on this page. */

:root {
  color-scheme: light;
  --header: #ffffff;
  --header-text: #000000;
  --primary: #1a5fb4;
  --primary-text: #ffffff;
  --link: #1a5fb4;
  --font: "QB Clean", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;        /* cards and the photo */
  --radius-small: 10px;  /* buttons, fields and days */
  --text: #1c1b1d;
  --muted: #4f4b51;
  --line: #e3e1e2;
  --field: #8e8a8f;
  --page: #f5f5f4;  /* --link is chosen to reach 4.5:1 on it, and so on white */
  --card: #ffffff;
  --shut: #efedee;  /* days that are full or closed */
  --shut-text: #5e5a60;
  --error: #b3261e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 1rem/1.5 var(--font); color: var(--text); background: var(--page); }
img { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.75rem; }
h3 { font-size: 1.125rem; line-height: 1.3; margin: 0 0 0.25rem; }
p { margin: 0.5rem 0; }
@media (max-width: 30rem) { h1 { font-size: 1.375rem; } }

.wrap { width: 100%; max-width: 47.5rem; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 30rem) { .wrap { padding: 0 1rem; } }
main.wrap { padding-top: 1.25rem; padding-bottom: 2rem; }
main.wrap > * + * { margin-top: 1.25rem; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.5rem 1rem;
        background: var(--card); color: var(--text); border-radius: var(--radius-small); }
.skip:focus { top: 0.5rem; }

/* Header: the business's logo, name and colour, and the language links. Nothing else. */
.site-header { background: var(--header); color: var(--header-text);
               border-bottom: 1px solid var(--line); }
.site-header a { color: inherit; }
.site-header :focus-visible { outline-color: var(--header-text); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
              gap: 0.5rem 1.5rem; padding-top: 0.875rem; padding-bottom: 0.875rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand .logo { display: block; max-height: 48px; width: auto; border-radius: var(--radius-small); }
.brand .name { font-size: 1.2rem; line-height: 1.25; font-weight: 700; margin: 0;
               overflow-wrap: anywhere; }
.brand .name a { text-decoration: none; }
.brand .name a:hover { text-decoration: underline; }
.languages ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0;
                list-style: none; font-size: 0.9375rem; }
.languages a, .languages span { display: inline-block; padding: 0.25rem 0; }
.languages [aria-current] { font-weight: 700; }
/* Inside the box on a business's own website (docs/m7-plan.md): no header strip, only the
   language links above the page, and less space around it. */
.embed-languages { padding-top: 0.75rem; }
.embed-languages .languages ul { justify-content: flex-end; }
.embed-languages .languages a { color: var(--link); }
.embed main.wrap { padding-top: 1rem; padding-bottom: 1.5rem; }
.embed .site-footer .wrap { padding-bottom: 1rem; }
/* data-background="clear": the website's own background shows through the box. Only for a
   light website, as the admin page says: the text outside the cards stays dark. */
.embed.clear { background: transparent; }

/* Cards: white boxes on the grey page. */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 1rem; overflow-wrap: anywhere; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* The optional photo, cut to a wide strip. */
.photo { display: block; width: 100%; height: 11.25rem; object-fit: cover;
         border-radius: var(--radius); }
@media (max-width: 30rem) { .photo { height: 8rem; } }

/* Step 1: the services. */
.page-intro { margin-bottom: 0.75rem; }
.page-intro .title { font-size: 1.5rem; line-height: 1.2; margin: 0; }
@media (max-width: 30rem) { .page-intro .title { font-size: 1.375rem; } }
.page-intro p { margin: 0.4rem 0 0; }
.cards { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
/* Compact, so the list stays short and the contact details come into view. */
.card.service { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
                padding: 0.75rem 1rem; }
.service h3 { font-size: 1rem; margin: 0; }
.service-text { flex: 1 1 10rem; min-width: 0; }
.service-text p { margin: 0.125rem 0 0; font-size: 0.9375rem; }
.service .length { color: var(--muted); font-size: 0.875rem; }
.service .description { white-space: pre-line; }
.service .action { margin: 0; }
.service .button { padding: 0.5rem 1rem; }
.intro p { margin: 0.25rem 0 0; }
.intro .description { white-space: pre-line; }
.intro .length { color: var(--muted); }
.together h2 { font-size: 1.125rem; }

/* About us and opening hours: closed until the customer opens it. */
.about summary { font-weight: 600; cursor: pointer; min-height: 1.5rem; }
.about-body { margin-top: 0.75rem; }
.about .description { white-space: pre-line; }
.about h3 { font-size: 1rem; margin-top: 1rem; }
.hours { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.25rem; margin: 0; }
.hours dd { margin: 0; }

/* Contact details (the booking's page). */
.contact dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem;
              margin: 0; }
.contact dt { font-weight: 600; }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.contact .address { white-space: pre-line; }

/* Footer: the privacy notice and "Powered by QLIQQI". */
.site-footer { color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { padding-top: 0; padding-bottom: 2rem; }
.footer-row { display: grid; gap: 1rem; }
.footer-row p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

/* Shared pieces of the booking steps. */
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px;
                   padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
                   border: 0; }
.muted { color: var(--muted); }
.back { margin: 0; font-weight: 600; }
.lead { font-size: 1.1rem; }
.button { display: inline-block; padding: 0.5rem 1.125rem; border: 2px solid var(--link);
          border-radius: var(--radius-small); background: var(--primary);
          color: var(--primary-text); font: inherit; font-weight: 600; line-height: 1.25;
          text-decoration: none; cursor: pointer; }
.button:hover { text-decoration: underline; }
.button.secondary { background: var(--card); color: var(--link); border-color: var(--link); }
.calendar-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 0.125rem 1rem;
           margin: 0; padding: 0.75rem 1rem; background: var(--card); border: 1px solid var(--line);
           border-radius: var(--radius); }
.summary dt { font-weight: 600; }
.summary dd { margin: 0; overflow-wrap: anywhere; }

/* Forms. */
.field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.hint { color: var(--muted); margin: 0; font-size: 0.9375rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select,
textarea { font: inherit; color: var(--text); background: #ffffff; min-height: 2.5rem;
           padding: 0.4rem 0.75rem; border: 1px solid var(--field);
           border-radius: var(--radius-small); width: 100%; }
textarea { min-height: 3.75rem; resize: vertical; }
/* Each question is as wide as a short answer needs, not the whole card; on a phone it is the
   width of the card. */
.ask .fields { display: grid; gap: 0.75rem; align-items: end;
               grid-template-columns: repeat(auto-fill, minmax(10rem, 15rem)); }
@media (max-width: 36rem) {
  .ask .fields { grid-template-columns: minmax(0, 1fr); }
}
.form-grid { display: grid; gap: 0.75rem; margin-bottom: 0.75rem; }
@media (min-width: 40rem) {
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-grid .wide { grid-column: 1 / -1; }
}
.check { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.35rem 0; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; }
fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
legend { padding: 0; margin-bottom: 0.5rem; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Errors. */
.error-text { color: var(--error); font-weight: 600; margin: 0; }
.has-error input, .has-error textarea { border: 2px solid var(--error); }
.error-summary, .alert { background: var(--card); border: 2px solid var(--error);
                         border-radius: var(--radius); padding: 1rem 1.25rem; }
.error-summary h2 { margin-bottom: 0.5rem; }
.error-summary ul { margin: 0; padding-left: 1.25rem; }
.error-summary a { color: var(--error); font-weight: 600; }
.note-box { background: var(--card); border: 1px solid var(--line);
            border-left: 4px solid var(--link); border-radius: var(--radius-small);
            padding: 0.75rem 1rem; overflow-wrap: anywhere; }

/* A restaurant's page: lunch or dinner, and the number of people, as rows of buttons. */
.choices { display: grid; gap: 0.75rem; margin-bottom: 0.75rem; }
.choices .description { margin: 0; white-space: pre-line; }
.choice-group .label { margin: 0 0 0.375rem; font-weight: 600; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.choice { display: inline-flex; align-items: baseline; gap: 0.5rem; padding: 0.3125rem 0.75rem;
          border: 1.5px solid #8e8a8f; border-radius: var(--radius-small); background: var(--card);
          color: var(--text); text-decoration: none; font-size: 0.9375rem; font-weight: 600;
          line-height: 1.25; }
.choice.number { justify-content: center; min-width: 2.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.choice:hover { text-decoration: underline; }
.choice[aria-current] { background: var(--primary); border-color: var(--link); color: var(--primary-text); }

/* Step 2: a month of days, each marked free, full or closed, and the free times as
   buttons, compact so the step fits a laptop's or a phone's screen (Eric, 2026-10-27). A day
   only shows its number; the key under the month says what the border, the grey and the line
   through mean (the words stay for screen readers). On a wide screen the month and the times
   sit side by side. */
.zone-note { color: var(--muted); font-size: 0.9375rem; }
.month.card { margin-bottom: 0.5rem; }
@media (min-width: 44rem) {
  .month-times { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
                 gap: 0.75rem; align-items: start; }
  .month-times .month.card { margin-bottom: 0; }
}
.month-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
              margin-bottom: 0.25rem; }
.month-head h2 { font-size: 1.0625rem; margin: 0; text-align: center; }
.month-step { display: inline-flex; align-items: center; justify-content: center;
              width: 2.25rem; height: 2.25rem; flex: none; border-radius: var(--radius-small);
              font-size: 1.375rem; line-height: 1; text-decoration: none; }
a.month-step { border: 1.5px solid var(--link); color: var(--link); background: var(--card); }
a.month-step:hover { background: var(--page); }
.month-days { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0.1875rem; }
.month-days th { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.month-days abbr { text-decoration: none; }
.month-days td { padding: 0; text-align: center; vertical-align: top; }
.month-days a, .month-days .out { display: flex; flex-direction: column; align-items: center;
              justify-content: center; min-height: 2.25rem; padding: 0;
              position: relative; border: 1.5px solid transparent;
              border-radius: var(--radius-small); line-height: 1.2; text-decoration: none; }
.month-days .number { font-size: 0.9375rem; font-weight: 700; }
.month-days .state { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
                     overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.month-days .out { color: var(--shut-text); }
.month-days .out, .month-days a.closed .number { font-weight: 400; }
.month-days a.free { border-color: var(--link); background: var(--card); color: var(--text); }
.month-days a.full { background: var(--shut); color: var(--shut-text); }
.month-days a.full .number { text-decoration: line-through; }
.month-days a.closed { border-color: var(--line); color: var(--shut-text); }
.month-days a:hover .number { text-decoration: underline; }
.month-days a[aria-current] { background: var(--primary); border-color: var(--link);
                              color: var(--primary-text); }
.month-key { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.375rem 0 0;
             font-size: 0.8125rem; color: var(--muted); }
.month-key span { display: inline-flex; align-items: center; gap: 0.375rem; }
.month-key span::before { content: ""; width: 1rem; height: 1rem; border-radius: 4px;
                          border: 1.5px solid transparent; }
.month-key .free::before { border-color: var(--link); background: var(--card); }
.month-key .full::before { background: var(--shut); }
.month-key .closed::before { border-color: var(--line); }
@media (max-width: 36rem) {
  .month.card { padding: 0.75rem 0.5rem; }
  .month-days { border-spacing: 0.125rem; }
}
.times h2 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr)); gap: 0.375rem;
         margin: 0; padding: 0; list-style: none; }
.slot { display: flex; flex-direction: column; align-items: center; justify-content: center;
        width: 100%; min-height: 2.25rem; padding: 0.25rem; border: 1.5px solid var(--link);
        border-radius: var(--radius-small); background: var(--card); color: var(--link);
        font: inherit; font-size: 0.9375rem; font-weight: 700; line-height: 1.2;
        text-decoration: none; cursor: pointer; }
.slot:hover { background: var(--primary); color: var(--primary-text); }
.slot .few { font-size: 0.75rem; font-weight: 400; }

/* A gym's timetable: a row per class with its time and length, the class, its instructor and
   room, the places left and Book. On a phone the places and Book move under the class. */
.classes { margin: 0; padding: 0; list-style: none; }
.class-row { display: grid; grid-template-columns: 5rem 1fr auto auto; align-items: center;
             gap: 0.25rem 1rem; padding: 0.625rem 0; border-top: 1px solid var(--line); }
.class-row:first-child { border-top: 0; padding-top: 0.25rem; }
.class-row p { margin: 0; }
.class-when { display: flex; flex-direction: column; }
.class-when .clock { font-size: 1.125rem; font-weight: 700; }
.class-when .length, .class-who { color: var(--muted); font-size: 0.875rem; }
.class-name { font-weight: 600; }
.places { font-size: 0.9375rem; font-weight: 700; }
.places.full { color: var(--muted); font-weight: 600; }
.class-row .button { padding: 0.5rem 1.125rem; }
@media (max-width: 30rem) {
  .class-row { grid-template-columns: 4.25rem 1fr auto; }
  .class-row .places { grid-column: 2; }
  .class-row .button { grid-column: 3; grid-row: 1 / span 2; }
}

/* The privacy notice. */
.privacy { color: var(--muted); }
.notice { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
          padding: 1.5rem; overflow-wrap: anywhere; }
.notice > :first-child { margin-top: 0; }
.notice h2 { margin-top: 1.75rem; }
.notice ul { padding-left: 1.25rem; }
.notice li { margin: 0.25rem 0; }
.notice .purposes p { margin: 0.25rem 0; }
.notice .basis { color: var(--muted); }
.notice .basis .label { font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0.5rem 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.facts .address { white-space: pre-line; }

/* The booking's 3 steps (docs/booking-changes-plan.md, design calls 6 to 9): the step bar,
   step 1's choices in a line on step 2, and the links back to change them. */
.steps ol { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0;
            list-style: none; }
.steps { margin-bottom: 0.75rem; }
.step { display: flex; align-items: center; color: var(--muted); font-size: 0.875rem; }
.step a { display: inline-flex; align-items: center; color: var(--link); font-weight: 600; }
.step-number { display: inline-grid; place-items: center; flex: none; width: 1.5rem;
               height: 1.5rem; margin-right: 0.5rem; border: 2px solid currentColor;
               border-radius: 50%; font-size: 0.8125rem; font-weight: 700; line-height: 1; }
.step.current { color: var(--text); font-weight: 600; }
.step.current .step-number { background: var(--primary); border-color: var(--link);
                             color: var(--primary-text); }
@media (max-width: 30rem) {
  .steps ol { gap: 0.5rem 1rem; }
}
.chosen { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
          gap: 0.25rem 1rem; margin-bottom: 0; }
.chosen.card { padding: 0.625rem 1rem; font-size: 0.9375rem; }
.change { font-weight: 600; white-space: nowrap; }
.summary .change { margin-left: 0.5rem; }
.continue { margin: 0; }
form.ask .continue { margin-top: 0.75rem; }
/* The heading takes the focus so a screen reader starts there; it isn't something to press. */
#step-heading:focus { outline: none; }
