/* Buttons (agreed with Christopher 2026-11-26): one main action in glossy anthracite glass with white words (the same
   glass as the chosen home step), and a second one in grey glass (light at the top, darker below), in three sizes
   (32 / 40 / 48px). Every button looks pressed in while it is held down.

   <button class="button" type="submit">Book a consultation</button>
   <button class="button button--sm" type="button">Edit</button>
   <button class="button button--lg" type="submit">Book now</button>
   <a class="button button--secondary" href="/contact">Contact us</a>
   <button class="button button--danger" type="submit">Delete booking</button>
   <button class="button button--grey button--sm" type="submit">Save dose</button> (--grey is the same as --secondary)
   Icons sit inside with a gap: <button class="button"><i class="bi bi-calendar"></i> Book</button>
   Chips, the actions on a box's bar or a band (Back, Calendar), are at the end of this file. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--button-h);
  padding: var(--sp-1) var(--sp-4); /* min-height sets the size; padding only matters if the text wraps */
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: var(--lh-body);
  text-decoration: none;
  position: relative; /* holds a small button's tap area (::before) */
  color: var(--c-page);
  background-color: var(--c-anthracite);
  background-image: var(--what-pill);
  background-origin: border-box; /* the glass starts at the outer edge: from the padding it repeats into the see-through
                                    border and draws a dark line along the top */
  border: var(--border-1) solid transparent;
  border-radius: var(--radius-1);
  box-shadow: var(--shadow-what-pill);
  transition: background-color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.button--sm {
  min-height: var(--button-h-sm);
  padding-inline: var(--sp-3);
  font-size: var(--fs-small);
}

/* A small button's tap area reaches 44px high, so a finger finds it; it is invisible and takes no room. */
.button--sm::before {
  content: "";
  position: absolute;
  inset: calc((var(--button-h-sm) - var(--button-hit)) / 2) 0;
}

/* An extra small button: inside a page's sections, where a 32px one looks too big for its box (a partner's page). Its tap
   area still reaches 44px high. */
.button--xs {
  min-height: var(--button-h-xs);
  padding: 0 var(--sp-2); /* no room above and below the words, or they would make it taller than 24px */
  font-size: var(--fs-xs);
  gap: var(--sp-1);
}

.button--xs::before {
  content: "";
  position: absolute;
  inset: calc((var(--button-h-xs) - var(--button-hit)) / 2) 0;
}

.button--lg {
  min-height: var(--button-h-lg);
  padding-inline: var(--sp-6);
  font-size: var(--fs-lead);
}

.button:hover {
  background-image: var(--what-pill-hover);
}

/* Held down: the shine goes and it looks pressed in. */
.button:active {
  background-image: none;
  box-shadow: var(--shadow-pressed);
}

/* The bright blue button with a soft glow: the coming soon page's Notify me. */
.button--bright {
  color: var(--c-page);
  background-color: var(--c-menu-button);
  background-image: none;
  border-color: var(--c-menu-button);
  box-shadow: var(--shadow-bright);
}

.button--bright:hover {
  background-image: none;
  background-color: var(--c-menu-button-hover);
  border-color: var(--c-menu-button-hover);
  box-shadow: var(--shadow-bright); /* keeps its glow: the grey glass's shadow drew a white line along its top */
}

/* The second button beside a main one (Back, Cancel, Visit the shop): grey glass with dark words, so the main button
   is the only dark one. --grey is the same button. */
.button--secondary,
.button--grey {
  color: var(--c-text);
  background-color: var(--c-glass-grey-bottom);
  background-image: linear-gradient(var(--c-glass-grey-top), var(--c-glass-grey-bottom));
  border-color: var(--c-line);
  box-shadow: var(--shadow-glass);
}

.button--secondary:hover,
.button--grey:hover {
  background-image: linear-gradient(var(--c-glass-grey-top), var(--c-glass-grey-hover));
  box-shadow: var(--shadow-glass-hover);
}

.button--secondary:active,
.button--grey:active {
  background-image: none;
  box-shadow: var(--shadow-pressed);
}

.button--danger {
  color: var(--c-page);
  background-image: none;
  box-shadow: none;
  background-color: var(--c-error);
  border-color: var(--c-error);
}

.button--danger:hover {
  background-image: none;
  box-shadow: none;
  background-color: var(--c-error-hover);
  border-color: var(--c-error-hover);
}

.button--danger:active {
  box-shadow: var(--shadow-pressed);
}

/* Keyboard focus: the site's soft ring (base.css) added to each button's own shadow, which would otherwise hide it. */
.button:focus-visible {
  box-shadow: var(--shadow-what-pill), var(--focus-ring);
}

.button--secondary:focus-visible,
.button--grey:focus-visible {
  box-shadow: var(--shadow-glass), var(--focus-ring);
}

.button--bright:focus-visible {
  box-shadow: var(--shadow-bright), var(--focus-ring);
}

.button--danger:focus-visible {
  box-shadow: var(--focus-ring);
}

.button:disabled,
.button[aria-disabled="true"] {
  color: var(--c-text-muted);
  background-color: var(--c-surface);
  background-image: none;
  border-color: var(--c-line);
  box-shadow: none;
  cursor: not-allowed;
}

/* A button whose form is on its way (site.js, every normal post): greyed, a small spinning ring after its words, and
   no more clicks, so it cannot be sent twice. The ring stays still with reduced motion (base.css). */
.button[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.75;
}

.button[aria-busy="true"] .bi {
  display: none;
}

.button[aria-busy="true"]::after {
  content: "";
  width: var(--sp-4);
  height: var(--sp-4);
  border: calc(2 * var(--border-1)) solid currentColor;
  border-right-color: transparent;
  border-radius: var(--radius-pill);
  animation: button-busy 0.8s linear infinite;
}

@keyframes button-busy {
  to {
    transform: rotate(360deg);
  }
}

/* A chip: an action on a box's bar or on a band (Back, Coming up's Calendar), never a link there (CLAUDE.md, "Page
   layout"). A small grey glass pill, with its icon before its words if it has one; the words go in a span.
   Its tap area reaches 44px high (invisible, takes no room). Keyboard focus is a thin ring in the bar's own text colour,
   so it shows on the anthracite bar and on the light one.
   <a class="chip" href="/consultant/clients" aria-label="Back to clients"><span><i class="bi bi-arrow-left" aria-hidden="true"></i>Back</span></a> */
.chip {
  position: relative;
  flex: none;
  display: inline-flex;
  padding: 0;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.chip::before {
  content: "";
  position: absolute;
  inset: calc((var(--sp-4) - var(--button-hit)) / 2) 0;
}

.chip span {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding-inline: var(--sp-2);
  line-height: var(--sp-4);
  color: var(--c-anthracite);
  background-color: var(--c-glass-grey-bottom);
  background-image: linear-gradient(var(--c-glass-grey-top), var(--c-glass-grey-bottom)); /* grey glass, as the second
                                    button, at the same 16px height so the bar stays slim (agreed 2026-11-29) */
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glass);
  transition: box-shadow var(--duration-fast) var(--ease);
}

.chip:hover span {
  background-image: linear-gradient(var(--c-glass-grey-top), var(--c-glass-grey-hover));
  box-shadow: var(--shadow-glass-hover);
}

.chip:focus-visible {
  outline: var(--border-1) solid currentColor; /* the soft blue ring would not show on the dark bar */
  outline-offset: var(--border-1);
  box-shadow: none;
}
