/* Signing up, step by step (workspaces/signing_up.py): a white page, Firmdesk's name top left, the progress bar
   under it from edge to edge, one question in a centred column, no card. Linked after the page's other sheets by
   both of the bases these pages can have: templates/signup_base.html (the new front end not in front) and
   templates/look/firm.html (in front, after look.css), so it draws only with the values both give their custom
   properties: Cloudscape's (look.css, new-look.css), light and dark alike.

   Chosen is Cloudscape's selected: a 2px border in the accent over --primary-soft. A tile or chip is a real radio
   or tick box: it works without JavaScript, and where the browser can't tell a box is ticked from its label
   (:has), the box itself stays in sight. No gradient, no picture, no shadow; an accent edge never meets a rounded
   corner (the chosen border goes all the way round). */

.signup-body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }

/* Firmdesk's name, then the bar: 60px from the top of the page to the bar's foot, 80% of the 75px it first had
   (55px on a phone, of 69px), the mark and the name at their own size. The name is a block, so no line of text
   around it adds space under it. */
.signup-top { padding: 14px 40px 0; }
.signup-brand { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 0; font-size: 20px; line-height: 24px; font-weight: 700; color: var(--text); }
.signup-brand img { width: 28px; height: 28px; border-radius: 0; }
/* One segment a step, side by side with no gap: the steps done and this one in the accent, the rest a track. */
.signup-progress { display: flex; margin: 14px -40px 0; padding: 0; list-style: none; }
.signup-progress li { flex: 1 1 0; height: 4px; margin: 0; padding: 0; background: var(--border); }
.signup-progress li.is-done, .signup-progress li.is-current { background: var(--primary); }

/* The column, and what it holds. */
.signup-page { box-sizing: border-box; display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: 20px; width: 100%; max-width: none; margin: 0; padding: 40px 24px 24px; }
.signup-page > .messages, .signup-page > #messages, .signup-page > .service-notice { width: 100%; max-width: 440px; }
.signup-column { box-sizing: border-box; display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 440px; }
.signup-column.is-wide { max-width: 600px; }
.signup-column > * { margin-top: 0; margin-bottom: 0; }
.signup-column > form.form, .signup-column > form.form > .fields { display: flex; flex-direction: column; gap: 20px; max-width: none; }
.signup-column > form.form > * { margin: 0; }
.signup-page .signup-column h1 { margin: 0 -80px; font-weight: 400; font-size: 40px; line-height: 48px; letter-spacing: -0.02em; text-align: center; color: var(--text); }
.signup-page .signup-column h1 + .signup-lead { margin-top: -8px; }
.signup-lead { margin: 0; font-size: 16px; line-height: 24px; text-align: center; color: var(--text-2); }
.signup-note { margin: 0; font-size: 14px; line-height: 20px; text-align: center; color: var(--text-2); }
.signup-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
/* A step's buttons: a pill, larger than the app's (44px high, 16px words of normal weight), in either look.
   (0,3,0) outweighs look.css's [data-look] .btn and app.css's .btn; its focus ring follows the pill's curve. */
.signup-page .signup-actions .btn { box-sizing: border-box; min-width: 280px; min-height: 44px; padding: 10px 28px; border-radius: 999px; justify-content: center; font-size: 16px; font-weight: 400; line-height: 20px; }
.signup-page .signup-actions .btn:focus-visible::before { border-radius: 999px; }
.signup-column .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.signup-column .banner, .signup-column .plan-banner { margin: 0; }
/* Who is signed in, and Sign out, under the question: centred like the lines above it. */
.signup-column .signed-in-as { margin: 0; text-align: center; }
/* A step's fields: as large as its buttons, 44px high with 16px words (which also keeps a phone from zooming in on
   them), 8px corners. (0,6,1) outweighs look.css's (0,5,1); the code's own box (below) comes later at the same
   weight and stays larger. The right padding is left alone: a password's eye and a list's arrow sit there. */
.signup-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not(.switch), .signup-page select {
  box-sizing: border-box; min-height: 44px; padding-top: 10px; padding-bottom: 10px; padding-left: 14px;
  border-radius: 8px; font-size: 16px; line-height: 22px;
}
/* A field in focus: Cloudscape's one ring, the border in the accent thickened to 2px by a 1px shadow, as on the
   sign-in card. new-look.css gives it only inside .auth-card, and a step has no card, so without this app.css's
   3px halo showed instead. Where look.css is in front, its own rule (of more weight) draws the same ring. */
.signup-page input:not([type="checkbox"]):not([type="radio"]):focus, .signup-page select:focus, .signup-page textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* The foot: Back on the left, the fine print, the policies. */
.signup-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 40px 28px; text-align: center; }
.signup-fine form { display: inline; }
.signup-fine { max-width: 600px; margin: 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.signup-fine:empty { display: none; }
.signup-back { align-self: flex-start; margin: 0; }
.signup-foot .auth-links { justify-content: center; }

/* The emailed code (step 2) and the texted one (step 8): one wide box, its digits large and spaced. The :not()s
   weigh it over every page's box (app.css) and the new front end's look (look.css, under [data-look]): (0,6,1)
   against their (0,4,1) and (0,5,1). */
.signup-code input[name="code"]:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.switch) {
  box-sizing: border-box; width: 100%; min-height: 56px; padding: 9px 12px;
  font-size: 28px; font-weight: 400; line-height: 36px; letter-spacing: 0.4em; text-indent: 0.4em;
  text-align: center; font-variant-numeric: tabular-nums;
}

/* Tiles (one choice) and chips (any number). */
.signup-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; }
.signup-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; border: 0; }
.signup-tile, .signup-chip { position: relative; box-sizing: border-box; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.signup-tile { justify-content: center; min-height: 60px; padding: 17px; border-radius: 12px; font-size: 16px; line-height: 22px; text-align: center; }
.signup-chip { padding: 10px 17px; border-radius: 999px; font-size: 15px; line-height: 20px; }
.signup-chip small { font-size: 13px; color: var(--muted); }
.signup-tile:hover, .signup-chip:hover { border-color: var(--control-border); }
@supports selector(:has(*)) {
  .signup-tile input, .signup-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
  .signup-tile:has(input:checked), .signup-chip:has(input:checked) { border: 2px solid var(--primary); padding: 16px; background: var(--primary-soft); font-weight: 700; color: var(--primary-hover); }
  .signup-chip:has(input:checked) { padding: 9px 16px; }
  .signup-tile:has(input:focus-visible), .signup-chip:has(input:focus-visible) { outline: 2px solid var(--focus-ring, var(--primary)); outline-offset: 2px; }
}

/* Inviting the team (step 10): a row a person, first and last name side by side, the address under them. The rows
   after the first wait behind "Add another person" where JavaScript runs (app.js); without it, all are shown. */
.signup-invite { display: flex; flex-direction: column; gap: 20px; }
.signup-invite-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.signup-invite-row[hidden], .signup-invite [data-invite-add][hidden] { display: none; }
.signup-invite-row > .is-wide, .signup-invite-row > .errorlist { grid-column: 1 / -1; }
.signup-invite-row .field { margin: 0; }
.signup-invite [data-invite-add] { align-self: flex-start; }

/* How strong a new password is: four bars, one for each rule met (app.js, "New passwords"), and a word. Without
   JavaScript it isn't drawn: the rules under the field say the same. */
.strength-meter { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.strength-meter .strength-bars { display: grid; flex: 1 1 auto; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength-meter i { height: 4px; border-radius: 2px; background: var(--border); }
.strength-meter.is-1 i:nth-child(-n+1) { background: var(--danger); }
.strength-meter.is-2 i:nth-child(-n+2), .strength-meter.is-3 i:nth-child(-n+3) { background: var(--warning, var(--primary)); }
.strength-meter.is-4 i { background: var(--success); }
.strength-meter .strength-word { min-width: 56px; font-size: 12px; line-height: 16px; color: var(--muted); text-align: right; }

/* Moving between steps: the browser's own view transition from one step's page to the next (Chrome, Edge, Safari;
   elsewhere the next step just appears). Only step pages ask for it, so leaving for Home doesn't slide. Firmdesk's
   name and the bar stay put while the question slides: forward to the left, back to the right (static/js/steps.js
   tells which; without it, forward), and not at all when the same step comes again. With less motion asked for,
   the question only fades. */
@view-transition { navigation: auto; }
.signup-top { view-transition-name: signup-top; }
.signup-column { view-transition-name: signup-step; }
::view-transition-group(signup-step) { animation-duration: 280ms; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-old(signup-step) { animation: 140ms ease-in both signup-fade-out; }
::view-transition-new(signup-step) { animation: 220ms ease-out 60ms both signup-fade-in; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(signup-step) { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both signup-out-left; }
  ::view-transition-new(signup-step) { animation: 280ms cubic-bezier(0.2, 0.8, 0.2, 1) 40ms both signup-in-right; }
  html:active-view-transition-type(signup-back)::view-transition-old(signup-step) { animation-name: signup-out-right; }
  html:active-view-transition-type(signup-back)::view-transition-new(signup-step) { animation-name: signup-in-left; }
}
html:active-view-transition-type(signup-same)::view-transition-group(signup-step),
html:active-view-transition-type(signup-same)::view-transition-old(signup-step),
html:active-view-transition-type(signup-same)::view-transition-new(signup-step) { animation: none; }
@keyframes signup-fade-out { to { opacity: 0; } }
@keyframes signup-fade-in { from { opacity: 0; } }
@keyframes signup-out-left { to { opacity: 0; transform: translateX(-32px); } }
@keyframes signup-in-right { from { opacity: 0; transform: translateX(32px); } }
@keyframes signup-out-right { to { opacity: 0; transform: translateX(32px); } }
@keyframes signup-in-left { from { opacity: 0; transform: translateX(-32px); } }

@media (max-width: 600px) {
  .signup-top { padding: 12px 20px 0; }
  .signup-progress { margin: 11px -20px 0; }
  .signup-page .signup-column h1 { margin: 0; font-size: 30px; line-height: 38px; }
  .signup-foot { padding: 0 20px 24px; }
  .signup-column .form-grid { grid-template-columns: 1fr; }
}

/* Book a demo (demos/): the same steps, with a few pieces of their own. */
/* A line over a step's question ("Getting your demo ready"). */
.signup-kicker { margin: 0 0 -8px; font-size: 16px; line-height: 24px; text-align: center; color: var(--text-2); }
/* A field shown but not changed here (the address given at the first step). */
.signup-page input.signup-readonly { background: var(--surface-2, var(--border)); border-color: transparent; color: var(--text-2); }
/* A field no person fills, out of sight and of reach (demos/templates/demos/_hidden.html). */
.signup-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Tick boxes in a column, each with its words: what they want to see. */
.signup-checks { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; }
.signup-checks legend { margin: 0 0 12px; padding: 0; font-size: 14px; font-weight: 700; line-height: 20px; }
.signup-check { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 20px; cursor: pointer; }
.signup-check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--primary); }

/* The times page: Week or Month, the days, the times as pills (the chips' own look), the time zone. */
.demo-views { display: flex; align-self: center; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2, var(--border)); }
.demo-views a { padding: 5px 17px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--text); text-decoration: none; }
.demo-views a[aria-current] { background: var(--bg); border-color: var(--control-border); font-weight: 700; }
.demo-calendar { display: grid; grid-template-columns: 36px 1fr 36px; gap: 6px; align-items: center; }
.demo-arrow { display: flex; align-items: center; justify-content: center; height: 36px; border: 1px solid var(--border); border-radius: 8px; font-size: 20px; color: var(--text-2); text-decoration: none; }
.demo-arrow.is-off { color: var(--muted); opacity: 0.4; }
.demo-days { display: flex; flex-direction: column; gap: 4px; }
.demo-month { margin: 0 0 6px; font-weight: 700; text-align: center; }
.demo-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.demo-names span { font-size: 12px; line-height: 16px; text-align: center; color: var(--muted); }
.demo-day { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 10px; font-size: 13px; line-height: 18px; color: var(--text); text-decoration: none; }
.demo-day b { font-size: 17px; line-height: 22px; }
.demo-calendar.is-month .demo-day > span { display: none; }
.demo-day.is-off { color: var(--muted); }
.demo-day.is-off b { font-weight: 400; }
.demo-day.is-other { opacity: 0.5; }
a.demo-day:hover { background: var(--primary-soft); }
.demo-day.is-chosen, a.demo-day.is-chosen:hover { background: var(--primary); color: var(--bg); }
/* A day is a link: look.css colours every link ([data-look] a:not(.btn), (0,2,1)), which made the days blue and the
   chosen one blue on blue. These outweigh it: a free day in the text's colour, the chosen one in white on the accent. */
.signup-page a.demo-day { color: var(--text); text-decoration: none; }
.signup-page a.demo-day.is-chosen, .signup-page a.demo-day.is-chosen:hover { color: var(--on-primary, #fff); }
.demo-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; border: 0; }
.demo-slots .signup-chip { justify-content: center; min-height: 44px; }
.demo-zone { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.demo-zone select { width: auto; max-width: 100%; }
.demo-zone [hidden] { display: none; }

/* Booked: what, the two buttons side by side, what to expect. */
.demo-summary { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 15px; line-height: 22px; }
.demo-summary div { display: flex; gap: 12px; }
.demo-summary dt { flex: none; width: 80px; color: var(--muted); }
.demo-summary dd { margin: 0; }
.signup-page .signup-actions.demo-pair { flex-direction: row; justify-content: center; }
.signup-page .signup-actions.demo-pair .btn { flex: 1 1 0; min-width: 0; }
.signup-column h2.demo-heading { margin: 8px 0 -8px; font-size: 18px; line-height: 24px; }
.demo-expect { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 20px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.demo-expect li::marker { color: var(--primary); font-weight: 700; }

@media (max-width: 600px) {
  .demo-slots { grid-template-columns: repeat(2, 1fr); }
  .demo-week { gap: 2px; }
  .signup-page .signup-actions.demo-pair { flex-direction: column; }
  .signup-page .signup-actions.demo-pair .btn { width: 100%; }
}
