/* =========================================================================
   Figma-based UI design system: component classes
   -------------------------------------------------------------------------
   Cascade layers. app/assets/stylesheets/application.css is linked first and declares
   `@layer properties, theme, base, components, utilities;` (repeated below so this file
   is safe on its own). Tailwind utilities and DaisyUI's component classes compile into
   the `utilities` layer, so:

   - Component rules live in `@layer components`: a utility on the element (`w-full`,
     `pr-[44px]`, `mb-0`, `h-[36px]`, `text-[13px]`, `[&_.figma-card-body]:p-4`, `hidden`
     ...) always wins without `!important`.
   - A few rules stay UNLAYERED on purpose, because they must beat utilities, DaisyUI or
     third-party CSS: the DaisyUI `.btn` bridge, the DaisyUI primary-fill overrides and the
     phone font-size bridge for DaisyUI fields, the radio/checkbox :checked fills, the legacy
     validation colours (they remap utility classes), the .figma-choices section (choices.css
     compiles unlayered) and the selected / focused state of appointment time-slot tiles
     (they must beat the tile utilities ui.radio_group adds). Each one is marked "UNLAYERED".

   Text colours are AA on white: ink #212121, secondary #474747 (9.3:1), muted #6B6B6B
   (5.3:1), placeholder #767676 (4.5:1), primary text #005CC4 (6.3:1), error #B42318
   (6.6:1). Filled primary surfaces with white text use #0067D8 (--figma-primary-fill, 5.3:1).
   Keep these in sync with the @theme tokens in app/assets/tailwind/application.css
   (text-ink, text-ink-muted, text-primary-ink, text-error-ink, bg-primary-fill ...).

   Fonts are self-hosted (app/assets/tailwind/application.css): InterVariable (also
   registered as "Inter") and "TT Travels Medium". Do not import Google Fonts.
   ========================================================================= */

@layer properties, theme, base, components, utilities;

/* Design tokens from Figma (custom properties, so the layer only orders them). */
@layer theme {
  :root {
    /* Brand Colors (from Figma Login & Applicants frames) */
    --figma-primary: #007BFF; /* Blue: borders, focus rings, icons, accents, checked radio/checkbox fills */
    --figma-primary-hover: #0067D8; /* darker blue (outline-button border on hover) */

    /* Filled primary surfaces that carry white text: buttons, solid badges, Choices chips, the
       current page, the selected time slot, DaisyUI btn/badge/step-primary. White on #0067D8 is
       5.3:1 (AA); on the brand #007BFF it was 3.98:1. Hover 6.5:1, pressed 7.8:1. The values
       live in app/assets/tailwind/application.css (--color-primary-fill*, which also give
       bg-primary-fill utilities); the fallbacks only matter if that file is missing. */
    --figma-primary-fill: var(--color-primary-fill, #0067D8);
    --figma-primary-fill-hover: var(--color-primary-fill-hover, #005BC0);
    --figma-primary-fill-active: var(--color-primary-fill-active, #004FA8);
    --figma-secondary: #A6CE39; /* Lime green */
    --figma-secondary-hover: #94B832; /* darker lime */
    --figma-accent: #8B5CF6; /* Purple */
    --figma-accent-hover: #7C3AED; /* darker purple */

    /* Text Colors */
    --figma-text: #121212;
    --figma-text-secondary: #474747;
    --figma-text-muted: #6B6B6B; /* 5.3:1 on white (was #8F8F8F, 3.2:1) */

    /* Neutral Colors */
    --figma-border: #E9E9E9;
    --figma-border-light: #EAEAEA;
    --figma-background: #FFFFFF;
    --figma-background-page: #EBF5FF;
    --figma-background-alt: #F4F7FB;

    /* Status Colors (fills; as text use the *-ink tokens) */
    --figma-success: #A6CE39;
    --figma-info: #3B9EFF;
    --figma-warning: #F59E0B;
    --figma-error: #E7664F;

    /* Shadows */
    --figma-shadow: 10px 10px 30px 10px rgba(0, 0, 0, 0.03);
    --figma-shadow-hover: 10px 10px 30px 10px rgba(0, 0, 0, 0.1);

    /* Focus ring for fields (buttons use a 2px outline) */
    --figma-focus-ring: 0 0 0 3px rgb(0 123 255 / 0.25);
    --figma-focus-ring-error: 0 0 0 3px rgb(180 35 24 / 0.2);

    /* Radius */
    --figma-radius-button: 100px;
    --figma-radius-card: 20px;
    --figma-radius-input: 100px;
    --figma-radius-small: 10px;

    /* Type */
    --figma-font: InterVariable, "Inter", system-ui, -apple-system, sans-serif;
    --figma-font-display: "TT Travels Medium", InterVariable, "Inter", sans-serif;

    /* Buttons */
    --figma-btn-font: "InterVariable", "Inter", system-ui, -apple-system, sans-serif;
    --figma-btn-font-display: "TT Travels Medium", "InterVariable", "Inter", sans-serif;
    --figma-primary-active: #005CC4; /* also the text-safe primary (6.3:1 on white) */
    --figma-primary-soft: #EBF5FF;
    --figma-primary-soft-hover: #D6EAFF;
    --figma-neutral: #212121;
    --figma-neutral-hover: #333333;
    --figma-success-hover: #94B832;
    --figma-warning-hover: #D98A08;
    --figma-info-hover: #2589EE;
    --figma-error-hover: #D6553E;
  }
}

/* =========================================================================
   Form fields: .figma-input (input and textarea), .figma-select, .figma-form-group,
   .figma-label, .figma-required, .figma-help-text, .figma-error-text
   Markup from UiBuilder#input / #select_field (label for=id, help/error ids).
   ========================================================================= */
@layer components {
  /* max-width: never wider than the container (intrinsic-width selects with long options,
     fixed widths on phones); a width or max-w utility on the field still wins. */
  .figma-input {
    max-width: 100%;
    height: 44px;
    padding: 0 15px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #212121;
    background-color: #FFFFFF;
    border: 1px solid #E9E9E9;
    border-radius: 100px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
  }

  /* Textarea specific styling */
  textarea.figma-input {
    height: auto;
    padding: 12px 20px;
    border-radius: 20px;
    line-height: 1.5;
    resize: vertical;
  }

  .figma-input::placeholder {
    color: #767676; /* 4.5:1 (was #8F8F8F, 3.2:1) */
    opacity: 1;
  }

  /* :where() keeps the hover tint below the focus, error and disabled rules. */
  .figma-input:where(:hover:not(:disabled)) {
    border-color: #D2D2D2;
  }

  .figma-input:focus {
    border-color: var(--figma-primary);
  }

  /* Keyboard focus (text fields match on every focus): border plus a 3px ring. The
     transparent outline shows up in Windows high-contrast mode, which drops box-shadows.
     A date field whose calendar icon has focus (Tab past the year, Shift+Tab) matches only
     :focus-within; :where() keeps that selector at the :focus-visible one's specificity. */
  .figma-input:focus-visible,
  .figma-input:where([type="date"]):focus-within {
    border-color: var(--figma-primary);
    box-shadow: var(--figma-focus-ring);
    outline: 2px solid transparent;
    outline-offset: 1px;
  }

  /* Disabled state: still readable (#6B6B6B on #F5F5F5 is 4.9:1; it was #BFBFBF, 1.7:1). */
  .figma-input:disabled {
    background-color: #F5F5F5;
    color: #6B6B6B;
    -webkit-text-fill-color: #6B6B6B; /* iOS Safari fades disabled text on its own */
    opacity: 1;
    cursor: not-allowed;
  }

  .figma-input:disabled::placeholder {
    color: #8F8F8F;
    -webkit-text-fill-color: #8F8F8F;
  }

  /* Figma Select/Dropdown */
  .figma-select {
    max-width: 100%;
    height: 44px;
    padding: 0 48px 0 15px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #212121; /* the chosen value reads as an answer, not a placeholder */
    background-color: #FFFFFF;
    border: 1px solid #E9E9E9;
    border-radius: 100px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 9L12 14L17 9' stroke='%23212121' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 24px;
    cursor: pointer;
    outline: none;
  }

  /* Grey only while the empty choice ("Select…", include_blank, prompt) is selected. */
  .figma-select:has(option[value=""]:checked) {
    color: #767676;
  }

  /* The open list keeps ink options even while the closed select shows the grey prompt. */
  .figma-select option {
    color: #212121;
  }

  .figma-select:where(:hover:not(:disabled)) {
    border-color: #D2D2D2;
  }

  .figma-select:focus {
    border-color: var(--figma-primary);
  }

  .figma-select:focus-visible {
    border-color: var(--figma-primary);
    box-shadow: var(--figma-focus-ring);
    outline: 2px solid transparent;
    outline-offset: 1px;
  }

  .figma-select:disabled {
    background-color: #F5F5F5;
    color: #6B6B6B;
    opacity: 1;
    cursor: not-allowed;
  }

  /* Errors (ui.input / ui.select_field error:, or aria-invalid on hand-written fields):
     red border at rest, red ring on focus. */
  .figma-input.figma-input-error,
  .figma-input[aria-invalid="true"],
  .figma-select.figma-select-error,
  .figma-select[aria-invalid="true"] {
    border-color: #B42318;
  }

  .figma-input.figma-input-error:focus-visible,
  .figma-input[aria-invalid="true"]:focus-visible,
  .figma-input.figma-input-error:where([type="date"]):focus-within,
  .figma-input[aria-invalid="true"]:where([type="date"]):focus-within,
  .figma-select.figma-select-error:focus-visible,
  .figma-select[aria-invalid="true"]:focus-visible {
    border-color: #B42318;
    box-shadow: var(--figma-focus-ring-error);
  }

  /* Figma Form Group (for inputs with labels). min-width: 0 lets a group shrink when it is a
     flex or grid item (two dates side by side, a "$ min to max per hour" row): with the default
     min-width:auto (min-content on a <fieldset>) it never got narrower than its field (a 16px
     phone date input is ~150px), so on phones the row ran out of its card. */
  .figma-form-group {
    margin-bottom: 24px;
    min-width: 0;
  }

  /* Fields fill their group (they were ~200px wide) and shrink with it. A width utility on the
     field (w-[120px]) still sets its size where there is room (max-width: 100% caps it to the
     group), and one on the group (wrapper_class: "max-w-[300px]") still wins. */
  .figma-form-group > .figma-input,
  .figma-form-group > .figma-select,
  .figma-form-group > .relative > .figma-input,
  .figma-form-group > .relative > .figma-select {
    width: 100%;
  }

  /* Real fields can also shrink when they sit directly in a flex row (the wizard's "$ [min] to
     [max] [unit]" row): min-width:auto held a w-[120px] field at 120px and pushed the row out
     of its card on phones. The 4rem floor keeps a flex-1 field (flex-basis 0, e.g. the custom
     meeting "Value" input) usable instead of collapsing to its padding. Not on div.figma-input
     wrappers (the date-range pill), whose bare inputs keep their size. A min-w-* utility wins
     (min-w-0 for a field meant to be narrower than 4rem). */
  :is(.figma-input, .figma-select):where(input, select, textarea) {
    min-width: min(100%, 4rem);
  }

  /* Labels: 14px/500 secondary ink (9.3:1), above the field; same look inside and outside
     a .figma-form-group (and on <legend class="figma-label">). */
  .figma-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #474747;
  }

  .figma-required {
    margin-left: 2px;
    color: #B42318;
    font-weight: 500;
  }

  .figma-help-text {
    display: block;
    margin: 6px 0 0;
    font-family: var(--figma-font);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
    color: #6B6B6B;
  }

  .figma-error-text {
    display: block;
    margin: 6px 0 0;
    font-family: var(--figma-font);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    color: #B42318;
  }

  /* iOS Safari zooms into any focused field whose text is under 16px. Only real controls
     (and controls nested in a .figma-input pill) grow: a display-only div.figma-input (a
     read-only email box) keeps 14px, so long values don't push past their card. */
  @media (max-width: 767px) {
    :is(.figma-input, .figma-select):where(input, select, textarea),
    :is(.figma-input, .figma-select):not(input, select, textarea) :where(input, select, textarea) {
      font-size: 16px;
    }
  }

  /* Native date pickers keep their calendar icon (it was hidden on every date input), except
     fields that open the picker themselves (date-picker controller) or opt out. */
  input[type="date"][data-controller~="date-picker"]::-webkit-calendar-picker-indicator,
  input.figma-hide-date-indicator::-webkit-calendar-picker-indicator,
  .figma-hide-date-indicator input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
  }

  input[type="date"]::-webkit-inner-spin-button,
  input[type="date"]::-webkit-outer-spin-button {
    display: none;
    -webkit-appearance: none;
  }

  /* Narrow date fields. The default calendar icon (a 1em glyph in a 1em + 4px box) and the 1px
     padding around each segment clipped "mm/dd/yyyy" and wide dates such as 08/08/2028 in the
     campaigns date-range pill (bare 96px inputs inside a .figma-input wrapper) and in standalone
     fields that fill a narrow cell (5-6 column filter rows at 1024-1366px, two columns on
     phones). Segments lose their padding everywhere; typing and the picker work as before. */
  .figma-input input[type="date"]::-webkit-datetime-edit-month-field,
  .figma-input input[type="date"]::-webkit-datetime-edit-day-field,
  .figma-input input[type="date"]::-webkit-datetime-edit-year-field,
  input.figma-input[type="date"]::-webkit-datetime-edit-month-field,
  input.figma-input[type="date"]::-webkit-datetime-edit-day-field,
  input.figma-input[type="date"]::-webkit-datetime-edit-year-field {
    padding-inline: 0;
  }

  /* Pill inputs (96px, fixed): always the compact 12px icon. */
  .figma-input input[type="date"]::-webkit-calendar-picker-indicator {
    width: 12px;
    height: 12px;
    margin-inline-start: 2px;
    padding: 0;
  }

  /* Standalone fields: the default icon (1em glyph, 2px padding) while there is room, shrinking
     to a 12px glyph only when the text needs the space. Percentages here resolve against the
     field's content box; 5.75em is "mm/dd/yyyy" (80.5px at 14px). min-width keeps the icon in
     the width of content-sized fields. */
  input.figma-input[type="date"]::-webkit-calendar-picker-indicator {
    width: clamp(12px, calc(100% - 5.75em - 4px), 1em);
    min-width: 12px;
    height: auto;
    aspect-ratio: 1;
    margin-inline-start: 2px;
    padding: clamp(0px, calc((100% - 6.75em - 4px) / 2), 2px);
  }

  /* A date field with the icon that fills its group (100% is then its own width) also trades
     side padding for text as it narrows: the fields' usual 15px down to about 128px wide
     (140px at the 16px phone size), then less, to 6px, so "mm/dd/yyyy" still fits at about
     109px (120px). Fields without the icon need no room for it and keep 15px (content-sized
     ones would otherwise come out narrower). A padding utility on the field still wins. */
  .figma-form-group > input.figma-input[type="date"]:not([data-controller~="date-picker"], .figma-hide-date-indicator, .figma-hide-date-indicator *),
  .figma-form-group > .relative > input.figma-input[type="date"]:not([data-controller~="date-picker"], .figma-hide-date-indicator, .figma-hide-date-indicator *) {
    padding-inline: clamp(6px, calc((100% - 6em - 14px) / 2), 15px);
  }

  /* The wrapper carries the field look, so it shows the field focus ring while one of its
     bare inputs has focus (they remove their own outline). :focus-within, because a focused
     calendar icon (Shift+Tab, or a click on it) matches neither :focus nor :focus-visible on
     the input; the :not() keeps this off input/select/textarea.figma-input themselves. */
  .figma-input:not(input, select, textarea):focus-within {
    border-color: var(--figma-primary);
    box-shadow: var(--figma-focus-ring);
    outline: 2px solid transparent;
    outline-offset: 1px;
  }
}

/* =========================================================================
   Buttons
   -------------------------------------------------------------------------
   Rendered by UiBuilder#button / #submit_button / #icon_button, or used
   directly as classes on <a>, <button> and <input type="submit">.

   Base:      .figma-btn                     (defaults to the primary look)
   Variants:  .figma-btn-primary  .figma-btn-secondary  .figma-btn-outline
              .figma-btn-ghost    .figma-btn-link       .figma-btn-neutral
              .figma-btn-accent   .figma-btn-success    .figma-btn-warning
              .figma-btn-info     .figma-btn-error
   Modifier:  .figma-btn-soft     tinted background for the coloured variants
   Sizes:     .figma-btn-xs 28px  .figma-btn-sm 36px  (default) 44px
              .figma-btn-lg 56px  .figma-btn-xl 64px (display font, hero CTAs)
   Shapes:    .figma-btn-icon     icon-only, square (pill radius => circle)
              .figma-btn-block    full width
   States:    :hover  :active  :focus-visible  :disabled  [aria-disabled="true"]
              .figma-btn-loading  spinner, blocks clicks

   Text colours on transparent or tinted backgrounds are AA (outline, link and soft primary
   #005CC4, info/success/warning dark text). The solid primary fills #0067D8 (white text 5.3:1;
   hover #005BC0, pressed #004FA8, see --figma-primary-fill); its focus ring and the outline
   border stay the brand #007BFF. The error fill (#E7664F) keeps white text (3.28:1); prefer
   `soft` for destructive actions.

   Every rule lives in the `components` cascade layer so plain Tailwind
   utilities on the element (`w-full`, `h-[48px]`, `hidden`, `mt-3`, ...)
   still win without needing `!important`.
   ========================================================================= */
@layer components {
  .figma-btn {
    /* size tokens (overridden by size classes) */
    --btn-h: 44px;
    --btn-px: 24px;
    --btn-fs: 14px;
    --btn-icon: 18px;
    --btn-gap: 8px;
    /* colour tokens (overridden by variant classes) */
    --btn-bg: var(--figma-primary-fill);
    --btn-bg-hover: var(--figma-primary-fill-hover);
    --btn-bg-active: var(--figma-primary-fill-active);
    --btn-fg: #FFFFFF;
    --btn-fg-hover: var(--btn-fg);
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(0, 123, 255, 0.28);
    --btn-ring: var(--figma-primary);

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--btn-gap);
    box-sizing: border-box;
    height: var(--btn-h);
    padding: 0 var(--btn-px);
    margin: 0;
    font-family: var(--figma-btn-font);
    font-size: var(--btn-fs);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;      /* labels never wrap inside the fixed height; use `whitespace-normal` to opt out */
    flex-shrink: 0;
    color: var(--btn-fg);
    background-color: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: var(--figma-radius-button);
    box-shadow: var(--btn-shadow);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    vertical-align: middle;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  }

  /* ---- interaction states ------------------------------------------------ */
  .figma-btn:hover:not(:disabled):not([aria-disabled="true"]):not(.figma-btn-loading) {
    color: var(--btn-fg-hover);
    background-color: var(--btn-bg-hover);
    border-color: var(--btn-border-hover);
    box-shadow: var(--btn-shadow-hover);
  }

  .figma-btn:active:not(:disabled):not([aria-disabled="true"]):not(.figma-btn-loading) {
    background-color: var(--btn-bg-active);
    box-shadow: var(--btn-shadow);
    transform: scale(0.98);
  }

  .figma-btn:focus-visible {
    outline: 2px solid var(--btn-ring);
    outline-offset: 2px;
  }

  .figma-btn:disabled,
  .figma-btn[aria-disabled="true"],
  .figma-btn.figma-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
  }

  /* links cannot be natively disabled: block the click as well */
  .figma-btn[aria-disabled="true"],
  .figma-btn.figma-btn-disabled {
    pointer-events: none;
  }

  .figma-btn.figma-btn-loading {
    color: transparent;
    pointer-events: none;
  }

  .figma-btn.figma-btn-loading > * {
    visibility: hidden;
  }

  .figma-btn.figma-btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--btn-icon);
    height: var(--btn-icon);
    margin: calc(var(--btn-icon) / -2) 0 0 calc(var(--btn-icon) / -2);
    border: 2px solid var(--btn-fg);
    border-right-color: transparent;
    border-radius: 50%;
    animation: figma-btn-spin 0.7s linear infinite;
  }

  @keyframes figma-btn-spin {
    to { transform: rotate(360deg); }
  }

  /* ---- icons ------------------------------------------------------------- */
  .figma-btn svg,
  .figma-btn img {
    width: var(--btn-icon);
    height: var(--btn-icon);
    flex-shrink: 0;
  }

  /* ---- sizes ------------------------------------------------------------- */
  .figma-btn-xs { --btn-h: 28px; --btn-px: 12px; --btn-fs: 12px; --btn-icon: 14px; --btn-gap: 6px; }
  .figma-btn-sm { --btn-h: 36px; --btn-px: 16px; --btn-fs: 13px; --btn-icon: 16px; --btn-gap: 6px; }
  .figma-btn-md { --btn-h: 44px; --btn-px: 24px; --btn-fs: 14px; --btn-icon: 18px; --btn-gap: 8px; }
  .figma-btn-lg { --btn-h: 56px; --btn-px: 32px; --btn-fs: 16px; --btn-icon: 20px; --btn-gap: 10px; }
  .figma-btn-xl {
    --btn-h: 64px; --btn-px: 40px; --btn-fs: 18px; --btn-icon: 22px; --btn-gap: 10px;
    font-family: var(--figma-btn-font-display);
    letter-spacing: -0.03em;
  }

  /* ---- shapes ------------------------------------------------------------ */
  .figma-btn-icon {
    --btn-px: 0;
    width: var(--btn-h);
    padding: 0;
  }

  .figma-btn-block {
    width: 100%;
  }

  /* ---- variants ---------------------------------------------------------- */
  /* white on #0067D8 5.3:1, hover #005BC0 6.5:1, pressed #004FA8 7.8:1; ring stays #007BFF */
  .figma-btn-primary {
    --btn-bg: var(--figma-primary-fill);
    --btn-bg-hover: var(--figma-primary-fill-hover);
    --btn-bg-active: var(--figma-primary-fill-active);
    --btn-fg: #FFFFFF;
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(0, 123, 255, 0.28);
    --btn-ring: var(--figma-primary);
  }

  .figma-btn-secondary {
    --btn-bg: #FFFFFF;
    --btn-bg-hover: #F7F7F7;
    --btn-bg-active: #EFEFEF;
    --btn-fg: var(--figma-neutral);
    --btn-border: var(--figma-border);
    --btn-border-hover: #D9D9D9;
    --btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --btn-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.08);
    --btn-ring: var(--figma-primary);
  }

  /* text #005CC4 (6.3:1; #007BFF was 3.98:1), border stays the brand blue */
  .figma-btn-outline {
    --btn-bg: transparent;
    --btn-bg-hover: var(--figma-primary-soft);
    --btn-bg-active: var(--figma-primary-soft-hover);
    --btn-fg: var(--figma-primary-active);
    --btn-border: var(--figma-primary);
    --btn-border-hover: var(--figma-primary-hover);
    --btn-shadow: none;
    --btn-shadow-hover: none;
    --btn-ring: var(--figma-primary);
  }

  .figma-btn-ghost {
    --btn-bg: transparent;
    --btn-bg-hover: rgba(18, 18, 18, 0.06);
    --btn-bg-active: rgba(18, 18, 18, 0.1);
    --btn-fg: var(--figma-text-secondary);
    --btn-fg-hover: var(--figma-text);
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: none;
    --btn-ring: var(--figma-primary);
  }

  .figma-btn-link {
    --btn-bg: transparent;
    --btn-bg-hover: transparent;
    --btn-bg-active: transparent;
    --btn-fg: var(--figma-primary-active);
    --btn-fg-hover: var(--figma-primary-active);
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: none;
    --btn-ring: var(--figma-primary);
    --btn-px: 4px;
    height: auto;
  }

  .figma-btn-link:hover:not(:disabled):not([aria-disabled="true"]) {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .figma-btn-neutral {
    --btn-bg: var(--figma-neutral);
    --btn-bg-hover: var(--figma-neutral-hover);
    --btn-bg-active: #000000;
    --btn-fg: #FFFFFF;
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.2);
    --btn-ring: var(--figma-neutral);
  }

  .figma-btn-accent {
    /* White label at 5.7:1, hover 7.1:1, pressed 9.0:1 (lead decision). */
    --btn-bg: #7C3AED;
    --btn-bg-hover: #6D28D9;
    --btn-bg-active: #5B21B6;
    --btn-fg: #FFFFFF;
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(139, 92, 246, 0.3);
    --btn-ring: var(--figma-accent);
  }

  /* Focus rings on the light fills use the darker ink of the tone, so they show on white. */
  .figma-btn-success {
    --btn-bg: var(--figma-success);
    --btn-bg-hover: var(--figma-success-hover);
    --btn-bg-active: #82A22C;
    --btn-fg: var(--figma-text);           /* lime is light: dark text for contrast */
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(166, 206, 57, 0.35);
    --btn-ring: #3F6212;
  }

  .figma-btn-warning {
    --btn-bg: var(--figma-warning);
    --btn-bg-hover: var(--figma-warning-hover);
    --btn-bg-active: #B45309;
    --btn-fg: var(--figma-text);           /* amber is light: dark text for contrast */
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(245, 158, 11, 0.3);
    --btn-ring: #B45309;
  }

  .figma-btn-info {
    --btn-bg: var(--figma-info);
    --btn-bg-hover: var(--figma-info-hover);
    --btn-bg-active: #1D7BE0;
    --btn-fg: #212121;                     /* 5.8:1 on the light blue (white was 2.8:1) */
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(59, 158, 255, 0.3);
    --btn-ring: #1D4ED8;
  }

  .figma-btn-error {
    /* Darker than the --figma-error coral (still used for status dots and fills) so the
       white label passes WCAG AA: 5.3:1, hover 6.6:1, pressed 8.2:1 (lead decision). */
    --btn-bg: #C23B22;
    --btn-bg-hover: #B42318;
    --btn-bg-active: #9A1C12;
    --btn-fg: #FFFFFF;
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: 0 4px 12px rgba(231, 102, 79, 0.3);
    --btn-ring: #B42318;
  }

  /* ---- soft (tinted) modifier: pairs with any coloured variant ----------- */
  /* primary soft text #005CC4: 5.7:1 at rest, 5.1:1 hovered, 4.6:1 pressed (#0067D8 fell to
     4.3:1 and 3.9:1 on the hover and pressed tints) */
  .figma-btn-soft,
  .figma-btn-primary.figma-btn-soft {
    --btn-bg: var(--figma-primary-soft);
    --btn-bg-hover: var(--figma-primary-soft-hover);
    --btn-bg-active: #C2E0FF;
    --btn-fg: var(--figma-primary-active);
    --btn-fg-hover: var(--figma-primary-active);
    --btn-border: transparent;
    --btn-border-hover: transparent;
    --btn-shadow: none;
    --btn-shadow-hover: none;
  }

  .figma-btn-neutral.figma-btn-soft,
  .figma-btn-secondary.figma-btn-soft {
    --btn-bg: #F3F4F6;
    --btn-bg-hover: #E5E7EB;
    --btn-bg-active: #D1D5DB;
    --btn-fg: var(--figma-neutral);
    --btn-fg-hover: var(--figma-neutral);
  }

  .figma-btn-accent.figma-btn-soft {
    --btn-bg: #EDE9FE;
    --btn-bg-hover: #DDD6FE;
    --btn-bg-active: #C4B5FD;
    --btn-fg: #5B21B6;
    --btn-fg-hover: #5B21B6;
  }

  .figma-btn-success.figma-btn-soft {
    --btn-bg: #DCFCE7;
    --btn-bg-hover: #BBF7D0;
    --btn-bg-active: #86EFAC;
    --btn-fg: #166534;
    --btn-fg-hover: #166534;
  }

  .figma-btn-warning.figma-btn-soft {
    --btn-bg: #FEF3C7;
    --btn-bg-hover: #FDE68A;
    --btn-bg-active: #FCD34D;
    --btn-fg: #92400E;
    --btn-fg-hover: #92400E;
  }

  .figma-btn-info.figma-btn-soft {
    --btn-bg: #DBEAFE;
    --btn-bg-hover: #BFDBFE;
    --btn-bg-active: #93C5FD;
    --btn-fg: #1E40AF;
    --btn-fg-hover: #1E40AF;
  }

  .figma-btn-error.figma-btn-soft {
    --btn-bg: #FEE2E2;
    --btn-bg-hover: #FECACA;
    --btn-bg-active: #FCA5A5;
    --btn-fg: #991B1B;
    --btn-fg-hover: #991B1B;
  }
}

/* -------------------------------------------------------------------------
   DaisyUI `.btn` bridge (UNLAYERED: DaisyUI compiles into the utilities layer)
   Legacy views still use DaisyUI buttons. Align them with the Figma scale and
   pill shape so both systems look the same side by side. Only DaisyUI's own
   CSS variables are set (plus type), so utilities such as `h-[56px]`,
   `rounded-[8px]` or `px-6` on those buttons keep working.
   ------------------------------------------------------------------------- */
.btn {
  --radius-field: var(--figma-radius-button);
  --size: 44px;
  --btn-p: 20px;
  --fontsize: 14px;
  gap: 8px;
  font-family: var(--figma-btn-font);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.btn-xs { --size: 28px; --btn-p: 12px; --fontsize: 12px; }
.btn-sm { --size: 36px; --btn-p: 16px; --fontsize: 13px; }
.btn-md { --size: 44px; --btn-p: 20px; --fontsize: 14px; }
.btn-lg { --size: 56px; --btn-p: 28px; --fontsize: 16px; }
.btn-xl { --size: 64px; --btn-p: 36px; --fontsize: 18px; }

/* DaisyUI primary fills (UNLAYERED, like the bridge above: they must beat DaisyUI's
   .btn-primary / .badge-primary / .step-primary). They take the AA primary fill behind their
   white labels (5.3:1; the theme's #007BFF is 3.98:1); DaisyUI darkens it for hover and press.
   The focus ring stays the brand blue. Outline/soft btn-primary text gets the same #0067D8
   (5.3:1 on white). */
.btn-primary {
  --btn-color: var(--figma-primary-fill);
}

.btn-primary:focus-visible {
  outline-color: var(--figma-primary);
}

.badge-primary {
  --badge-color: var(--figma-primary-fill);
}

.steps .step-primary + .step-primary::before,
.steps .step-primary::after,
.steps .step-primary > .step-icon {
  --step-bg: var(--figma-primary-fill);
}

/* DaisyUI field bridge for phones (UNLAYERED, beats DaisyUI's 14px and size variants):
   iOS Safari zooms into any focused field under 16px. Only real controls (and controls
   nested in a label.input wrapper) grow; a display-only div.input keeps DaisyUI's size. */
@media (max-width: 767px) {
  :is(input, select, textarea):is(.input, .select, .textarea),
  :is(.input, .select, .textarea) :is(input, select, textarea) {
    font-size: 16px;
  }
}

/* =========================================================================
   Cards, badges, alerts, links
   ========================================================================= */
@layer components {
  /* Figma Card. Static by default; only cards that are links lift on hover. */
  .figma-card {
    background-color: var(--figma-background);
    border: 1px solid var(--figma-border);
    border-radius: var(--figma-radius-card);
    box-shadow: var(--figma-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .figma-card-interactive:hover,
  a.figma-card:hover {
    box-shadow: var(--figma-shadow-hover);
  }

  .figma-card-interactive:focus-visible,
  a.figma-card:focus-visible {
    outline: 2px solid var(--figma-primary);
    outline-offset: 2px;
  }

  /* Body padding: today's 40px (20px on phones), then the ui.card padding: modifiers, in this
     order so they win: none 0, sm 16px, md 24px (20px on phones), lg 40px (24px on phones). */
  .figma-card .figma-card-body {
    padding: 40px;
  }

  @media (max-width: 639px) {
    .figma-card .figma-card-body {
      padding: 20px;
    }
  }

  .figma-card .figma-card-body-none {
    padding: 0;
  }

  .figma-card .figma-card-body-sm {
    padding: 16px;
  }

  .figma-card .figma-card-body-md {
    padding: 24px;
  }

  .figma-card .figma-card-body-lg {
    padding: 40px;
  }

  @media (max-width: 639px) {
    .figma-card .figma-card-body-md {
      padding: 20px;
    }

    .figma-card .figma-card-body-lg {
      padding: 24px;
    }
  }

  .figma-card .figma-card-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--figma-border);
    font-family: var(--figma-font-display);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.54px;
    color: var(--figma-text);
  }

  .figma-card .figma-card-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--figma-border);
  }

  /* Figma Badge: 24px pill, 12px/500 text (it was 36px with 10px text).
     Sizes: -sm 20px/11px, -lg 32px/13px. Solid: primary, dark. Tinted: secondary, neutral,
     success, warning, error, info; `-soft` tints primary and dark too. Outline: hairline ring. */
  .figma-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    height: 24px;
    padding: 0 10px;
    font-family: var(--figma-font);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: var(--figma-radius-button);
  }

  .figma-badge.figma-badge-sm {
    height: 20px;
    padding: 0 8px;
    font-size: 11px;
  }

  .figma-badge.figma-badge-lg {
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
  }

  .figma-badge.figma-badge-dark {
    color: #FFFFFF;
    background-color: var(--figma-text);
  }

  .figma-badge.figma-badge-primary {
    color: #FFFFFF;
    background-color: var(--figma-primary-fill); /* #0067D8, 5.3:1 with white (#007BFF was 3.98:1) */
  }

  .figma-badge.figma-badge-primary.figma-badge-soft {
    color: #005CC4;
    background-color: #EBF5FF;
  }

  .figma-badge.figma-badge-dark.figma-badge-soft {
    color: #212121;
    background-color: #F3F4F6;
  }

  .figma-badge.figma-badge-secondary,
  .figma-badge.figma-badge-neutral {
    color: #4B5563;
    background-color: #F3F4F6;
  }

  .figma-badge.figma-badge-outline {
    color: #474747;
    background-color: transparent;
    box-shadow: inset 0 0 0 1px #E9E9E9;
  }

  .figma-badge.figma-badge-success {
    color: #166534;
    background-color: #DCFCE7;
  }

  .figma-badge.figma-badge-warning {
    color: #92400E;
    background-color: #FEF3C7;
  }

  .figma-badge.figma-badge-error {
    color: #991B1B;
    background-color: #FEE2E2;
  }

  .figma-badge.figma-badge-info {
    color: #1E40AF;
    background-color: #DBEAFE;
  }

  /* leading status dot (ui.badge dot: true) */
  .figma-badge .figma-badge-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 9999px;
    background-color: currentColor;
  }

  /* count chip (ui.badge count:) */
  .figma-badge .figma-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-inline-start: -6px;
    border-radius: 9999px;
    background-color: color-mix(in srgb, currentColor 16%, transparent);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
  }

  .figma-badge.figma-badge-sm .figma-badge-icon {
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    margin-inline-start: -5px;
    font-size: 10px;
  }

  .figma-badge.figma-badge-lg .figma-badge-icon {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-inline-start: -9px;
    font-size: 12px;
  }

  /* Alerts (ui.alert, toasts): soft tone fill, matching border, dark tone text (8.7:1+).
     Links inside take the tone colour and stay underlined. */
  .figma-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 16px;
    font-family: var(--figma-font);
    font-size: 14px;
    line-height: 1.5;
    text-align: start;
  }

  .figma-alert.figma-alert-success {
    color: #14532D;
    background-color: #F0FDF4;
    border-color: #BBF7D0;
  }

  .figma-alert.figma-alert-error {
    color: #7F1D1D;
    background-color: #FEF2F2;
    border-color: #FECACA;
  }

  .figma-alert.figma-alert-warning {
    color: #78350F;
    background-color: #FFFBEB;
    border-color: #FDE68A;
  }

  .figma-alert.figma-alert-info {
    color: #1E3A8A;
    background-color: #EFF6FF;
    border-color: #BFDBFE;
  }

  .figma-alert a:not(.figma-btn) {
    color: inherit;
    font-weight: 500;
    text-decoration-line: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 3px;
  }

  /* Text link: 6.3:1 blue, soft underline that turns solid on hover. */
  .figma-link {
    color: #005CC4;
    font-weight: 500;
    text-decoration-line: underline;
    text-decoration-color: rgb(0 92 196 / 0.35);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    border-radius: 2px;
    cursor: pointer;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
  }

  .figma-link:hover {
    text-decoration-color: currentColor;
  }

  .figma-link:focus-visible {
    outline: 2px solid #005CC4;
    outline-offset: 2px;
    text-decoration-color: currentColor;
  }

  /* Figma Priority indicators (text-safe tones) */
  .figma-priority {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--figma-font);
    font-size: 14px;
    letter-spacing: -0.28px;
  }

  .figma-priority.figma-priority-high {
    color: #B42318;
  }

  .figma-priority.figma-priority-medium {
    background: linear-gradient(96.88deg, #0067D8 0.29%, #005CC4 108.34%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .figma-priority.figma-priority-low {
    color: #3F6212;
  }

  /* Figma layout helpers */
  .figma-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--figma-background-page);
  }

  .figma-sidebar {
    width: 380px;
    background-color: var(--figma-background);
    border: 1px solid var(--figma-border);
    border-radius: var(--figma-radius-card);
    box-shadow: var(--figma-shadow);
  }

  /* Figma grid for cards */
  .figma-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
    gap: 20px;
  }
}

/* Native radio/checkbox fills (UNLAYERED: must beat DaisyUI's .radio/.checkbox). */
input[type="radio"]:checked {
  background-color: var(--figma-primary);
}

input[type="checkbox"]:checked {
  background-color: var(--figma-primary);
}

/* Legacy validation feedback (UNLAYERED on purpose): uniqueness_validator and
   location_selector toggle Tailwind border classes on .figma-input; these rules remap them to
   the design-system colours. Layered, they would be dead code and the borders would fall back
   to the pale green-300 / red-300. Errors use the same red as .figma-input-error. */
.figma-input.border-green-300 {
  border-color: var(--figma-success);
}

.figma-input.border-red-300 {
  border-color: #B42318;
}

.figma-input.focus\:border-green-500:focus {
  border-color: var(--figma-success);
}

.figma-input.focus\:border-red-500:focus {
  border-color: #B42318;
}

/* =========================================================================
   Figma-specific Choices.js styling (UNLAYERED: choices.css compiles unlayered after the
   utilities, so this section must stay unlayered to win; keep its !important flags).
   ========================================================================= */
.figma-choices .choices__inner {
  min-height: 44px;
  padding: 0 15px;
  font-family: var(--figma-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #212121;
  background-color: #FFFFFF;
  border: 1px solid #E9E9E9;
  border-radius: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.figma-choices.is-focused .choices__inner,
.figma-choices .is-focused .choices__inner {
  border-color: var(--figma-primary);
  box-shadow: var(--figma-focus-ring);
}

.figma-choices .choices__list--multiple {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}

/* selected chips: white on #0067D8 (5.3:1; #007BFF was 3.98:1 at 12px) */
.figma-choices .choices__list--multiple .choices__item {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  padding-right: 4px;
  margin: 0;
  font-family: var(--figma-font);
  font-size: 12px;
  font-weight: 500;
  color: #FFFFFF;
  background-color: var(--figma-primary-fill);
  border: none;
  border-radius: 100px;
  position: relative;
}

.figma-choices .choices__list--multiple .choices__item.is-highlighted {
  background-color: var(--figma-primary-fill-hover);
}

.figma-choices .choices__list--multiple .choices__item button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2) !important;
  background-image: none !important;
  border: none;
  border-radius: 50%;
  opacity: 0.8;
  color: #FFFFFF;
  font-size: 0;
  line-height: 1;
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
}

.figma-choices .choices__list--multiple .choices__item button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.3) !important;
}

/* Override the background image for the remove button */
.figma-choices .choices__list--multiple .choices__item button::after {
  content: '×';
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: normal;
  color: #FFFFFF;
  text-indent: 0;
}

.figma-choices .choices__input {
  padding: 0;
  margin: 0;
  min-height: 28px;
  font-family: var(--figma-font);
  font-size: 14px;
  color: #212121;
  background: none;
  border: none;
}

.figma-choices .choices__input::placeholder,
.figma-choices .choices__placeholder {
  color: #767676;
  opacity: 1;
}

/* Dropdown styling */
.figma-choices .choices__list--dropdown {
  margin-top: 8px;
  background-color: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 20px;
  box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.12);
}

.figma-choices .choices__list--dropdown .choices__item {
  padding: 12px 20px;
  font-family: var(--figma-font);
  font-size: 14px;
  color: #212121;
}

.figma-choices .choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: #F5F5F5;
}

/* Height variants for figma-choices */
.figma-choices-h-16 .choices__inner {
  min-height: 64px;
  padding: 0 24px;
  border-radius: 100px;
}

/* iOS zoom: 16px typing text on phones (beats choices.css's `.choices:has(select) .choices__input`). */
@media (max-width: 767px) {
  .figma-choices .choices .choices__input,
  .figma-choices .choices__inner {
    font-size: 16px;
  }
}

/* =========================================================================
   Appointment time slots (candidate booking and reschedule)
   Legacy click tiles toggle .selected; slot tiles built with ui.radio_group
   (option_class: "appointment-time-slot") get the same look from :has(:checked).
   ========================================================================= */
@layer components {
  /* Each tile is an inline-size container so the time can scale with the tile width. */
  .appointment-time-slot {
    cursor: pointer;
    background-color: white;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    container-type: inline-size;
  }

  .appointment-time-slot:hover {
    border-color: var(--figma-primary);
  }

  /* selected: white text on the AA primary fill (5.3:1; it was 3.98:1 on #007BFF) */
  .appointment-time-slot.selected {
    background-color: var(--figma-primary-fill);
    border-color: transparent;
  }

  /* 18px in roomy tiles, down to 13px in narrow ones, so "12:30 PM" in TT Travels stays inside
     the tile (the legacy grids squeeze six tiles into ~80px each around 1024px). The time is
     text-safe blue #005CC4 (6.3:1 on white; #007BFF was 3.98:1 at 13-18px/500). */
  .appointment-time-slot .time-slot-time {
    font-family: var(--figma-font-display);
    font-size: clamp(13px, 20cqi, 18px);
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--figma-primary-active);
    white-space: nowrap;
  }

  .appointment-time-slot.selected .time-slot-time {
    color: white;
  }

  .appointment-time-slot .time-slot-day,
  .appointment-time-slot .time-slot-date {
    font-family: var(--figma-font);
    font-size: 12px;
    color: #6B6B6B; /* 5.3:1 (was 10px #666) */
    line-height: 1.3;
  }

  .appointment-time-slot.selected .time-slot-day,
  .appointment-time-slot.selected .time-slot-date {
    color: white;
  }

  /* Mobile responsive adjustments: tiles grow with their content (56px minimum); 6px side
     padding leaves room for the time in four-column grids on 375-390px phones. */
  @media (max-width: 768px) {
    .appointment-time-slot {
      min-height: 56px;
      padding: 8px 6px;
    }
  }

  /* Tiles too narrow for a one-line time even at 13px (the legacy six-column grid around
     768px): let "12:30 PM" wrap inside the tile instead of running out of it, and keep the
     redundant day/date lines at their old 10px so "November" stays inside too. */
  @container (max-width: 52px) {
    .appointment-time-slot .time-slot-time {
      white-space: normal;
    }

    .appointment-time-slot .time-slot-day,
    .appointment-time-slot .time-slot-date {
      font-size: 10px;
      letter-spacing: -0.02em;
    }
  }
}

/* Checked and keyboard-focused radio tiles (UNLAYERED: beats the has-[:checked] tint and
   the ring utilities that ui.radio_group puts on each tile). */
.appointment-time-slot:has(:checked) {
  color: #FFFFFF;
  background-color: var(--figma-primary-fill);
  border-color: transparent;
}

.appointment-time-slot:has(:checked) .time-slot-time,
.appointment-time-slot:has(:checked) .time-slot-day,
.appointment-time-slot:has(:checked) .time-slot-date {
  color: #FFFFFF;
}

.appointment-time-slot:has(:focus-visible) {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--figma-primary);
  outline: 2px solid transparent;
  outline-offset: 4px;
}
