/* ==========================================================================
   Flow Tribe — UI Primitives
   --------------------------------------------------------------------------
   Styles for src/components/ui/*. One section per component, in the same
   order as the folder. Every value comes from tokens.css.

   Convention: .ft-<component>, .ft-<component>__<part>, .ft-<component>--<variant>
   ========================================================================== */

/* ==========================================================================
   Button
   ========================================================================== */

.ft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ft-space-2);
  min-height: var(--ft-tap-target);
  padding: var(--ft-space-3) var(--ft-space-5);
  border-radius: var(--ft-radius-md);
  /* Design System: buttons are Satoshi Medium 16px. */
  font-family: var(--ft-font-display);
  font-size: var(--ft-text-md);
  font-weight: var(--ft-weight-medium);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--ft-duration-fast) var(--ft-ease-standard),
    border-color var(--ft-duration-fast) var(--ft-ease-standard),
    color var(--ft-duration-fast) var(--ft-ease-standard),
    box-shadow var(--ft-duration-fast) var(--ft-ease-standard),
    transform var(--ft-duration-fast) var(--ft-ease-standard);
}

/* A 1px press travel reads as physical without the wobble of a scale
   transform, which blurs text mid-animation on some devices. */
.ft-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.ft-btn:disabled,
.ft-btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---- Variants ---- */

.ft-btn--primary {
  background-color: var(--ft-burgundy-600);
  color: var(--ft-text-inverse);
  box-shadow: var(--ft-shadow-sm);
}

.ft-btn--primary:hover:not(:disabled) {
  background-color: var(--ft-burgundy-700);
  box-shadow: var(--ft-shadow-md);
}

.ft-btn--secondary {
  background-color: var(--ft-bg-surface);
  color: var(--ft-burgundy-600);
  border: 1.5px solid var(--ft-burgundy-600);
}

.ft-btn--secondary:hover:not(:disabled) {
  background-color: var(--ft-burgundy-50);
}

.ft-btn--ghost {
  background-color: transparent;
  color: var(--ft-text-secondary);
}

.ft-btn--ghost:hover:not(:disabled) {
  background-color: var(--ft-neutral-100);
  color: var(--ft-text-primary);
}

.ft-btn--danger {
  background-color: var(--ft-danger-500);
  color: var(--ft-text-inverse);
}

.ft-btn--danger:hover:not(:disabled) {
  background-color: var(--ft-danger-700);
}

.ft-btn--danger:focus-visible {
  box-shadow: var(--ft-shadow-focus-danger);
}

/* Gold is reserved for celebration, never for routine actions — it has to
   stay special to mean anything on the dashboard. */
.ft-btn--accent {
  background-color: var(--ft-gold-400);
  color: var(--ft-burgundy-900);
  box-shadow: var(--ft-shadow-sm);
}

.ft-btn--accent:hover:not(:disabled) {
  background-color: var(--ft-gold-500);
}

/* ---- Sizes ---- */

.ft-btn--sm {
  min-height: 2.25rem;
  padding: var(--ft-space-2) var(--ft-space-3);
  font-size: var(--ft-text-sm);
  border-radius: var(--ft-radius-sm);
}

.ft-btn--lg {
  min-height: 3.25rem;
  padding: var(--ft-space-4) var(--ft-space-6);
  font-size: var(--ft-text-lg);
  border-radius: var(--ft-radius-lg);
}

/* Full-width is the default shape on mobile for primary actions: a thumb
   should never have to aim. */
.ft-btn--block {
  display: flex;
  width: 100%;
}

.ft-btn--icon {
  padding: var(--ft-space-2);
  min-width: var(--ft-tap-target);
}

/* Loading state. The label stays in place — replacing it with a spinner
   collapses the button width and makes the whole layout jump. */
.ft-btn--loading {
  pointer-events: none;
}

.ft-btn--loading .ft-btn__label {
  opacity: 0.6;
}

.ft-btn__spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: var(--ft-radius-full);
  animation: ft-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.ft-btn__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: var(--ft-icon-button);
  height: var(--ft-icon-button);
}

/* ==========================================================================
   Field — the shared wrapper for every input type
   ========================================================================== */

.ft-field {
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-2);
}

.ft-field__label {
  font-size: var(--ft-text-sm);
  font-weight: var(--ft-weight-semibold);
  color: var(--ft-text-primary);
}

.ft-field__required {
  color: var(--ft-gold-500);
  margin-left: 2px;
}

.ft-field__hint {
  font-size: var(--ft-text-xs);
  line-height: var(--ft-leading-snug);
  color: var(--ft-text-muted);
}

.ft-field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--ft-space-1);
  font-size: var(--ft-text-xs);
  line-height: var(--ft-leading-snug);
  color: var(--ft-danger-700);
  font-weight: var(--ft-weight-medium);
}

/* Fires once when an error appears. Re-triggered by toggling the class. */
.ft-field--invalid .ft-field__control {
  animation: ft-shake var(--ft-duration-slow) var(--ft-ease-standard);
}

/* ==========================================================================
   Input
   ========================================================================== */

.ft-input {
  width: 100%;
  min-height: var(--ft-tap-target);
  padding: var(--ft-space-3) var(--ft-space-4);
  /* 16px minimum, or iOS Safari zooms the viewport on focus. */
  font-size: var(--ft-text-md);
  color: var(--ft-text-primary);
  background-color: var(--ft-bg-surface);
  border: 1.5px solid var(--ft-border-default);
  border-radius: var(--ft-radius-md);
  transition:
    border-color var(--ft-duration-fast) var(--ft-ease-standard),
    box-shadow var(--ft-duration-fast) var(--ft-ease-standard);
}

.ft-input::placeholder {
  color: var(--ft-neutral-400);
}

.ft-input:hover:not(:disabled):not(:focus) {
  border-color: var(--ft-border-strong);
}

.ft-input:focus {
  outline: none;
  border-color: var(--ft-burgundy-600);
  box-shadow: var(--ft-shadow-focus);
}

.ft-input:disabled {
  background-color: var(--ft-bg-sunken);
  color: var(--ft-text-muted);
  cursor: not-allowed;
}

.ft-input--invalid {
  border-color: var(--ft-danger-500);
}

.ft-input--invalid:focus {
  border-color: var(--ft-danger-500);
  box-shadow: var(--ft-shadow-focus-danger);
}

/* Input with a leading icon or trailing adornment. */
.ft-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.ft-input-group__icon {
  position: absolute;
  left: var(--ft-space-4);
  display: flex;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--ft-text-muted);
  pointer-events: none;
}

.ft-input-group__icon ~ .ft-input {
  padding-left: calc(var(--ft-space-4) * 2 + 1.125rem);
}

.ft-input-group__suffix {
  position: absolute;
  right: var(--ft-space-3);
  display: flex;
  align-items: center;
}

/* Live availability indicator, used by the username field. */
.ft-input-status {
  display: inline-flex;
  align-items: center;
  gap: var(--ft-space-1);
  font-size: var(--ft-text-xs);
  font-weight: var(--ft-weight-medium);
}

.ft-input-status--checking { color: var(--ft-text-muted); }
.ft-input-status--ok       { color: var(--ft-success-700); }
.ft-input-status--taken    { color: var(--ft-danger-700); }

/* ==========================================================================
   PIN input — six separate boxes
   --------------------------------------------------------------------------
   Segmented entry rather than one password field. It shows progress, makes
   a mistyped digit obvious, and reads as deliberate rather than as a
   password box borrowed from somewhere else.
   ========================================================================== */

.ft-pin {
  display: flex;
  gap: var(--ft-space-2);
  justify-content: space-between;
}

.ft-pin__digit {
  width: 100%;
  max-width: 3.25rem;
  aspect-ratio: 1 / 1.15;
  padding: 0;
  text-align: center;
  font-family: var(--ft-font-display);
  font-size: var(--ft-text-xl);
  font-weight: var(--ft-weight-bold);
  color: var(--ft-text-primary);
  background-color: var(--ft-bg-surface);
  border: 1.5px solid var(--ft-border-default);
  border-radius: var(--ft-radius-md);
  caret-color: var(--ft-burgundy-600);
  transition:
    border-color var(--ft-duration-fast) var(--ft-ease-standard),
    box-shadow var(--ft-duration-fast) var(--ft-ease-standard),
    transform var(--ft-duration-fast) var(--ft-ease-spring);
}

.ft-pin__digit:focus {
  outline: none;
  border-color: var(--ft-burgundy-600);
  box-shadow: var(--ft-shadow-focus);
  transform: translateY(-2px);
}

/* A filled box is tinted rather than showing its value, so a shoulder-surfer
   sees progress but not digits. The masking itself is done in JS. */
.ft-pin__digit--filled {
  border-color: var(--ft-burgundy-400);
  background-color: var(--ft-burgundy-50);
}

.ft-pin--invalid .ft-pin__digit {
  border-color: var(--ft-danger-500);
}

.ft-pin--invalid {
  animation: ft-shake var(--ft-duration-slow) var(--ft-ease-standard);
}

@media (min-width: 480px) {
  .ft-pin {
    gap: var(--ft-space-3);
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Select
   ========================================================================== */

.ft-select {
  width: 100%;
  min-height: var(--ft-tap-target);
  padding: var(--ft-space-3) var(--ft-space-10) var(--ft-space-3) var(--ft-space-4);
  font-size: var(--ft-text-md);
  color: var(--ft-text-primary);
  background-color: var(--ft-bg-surface);
  border: 1.5px solid var(--ft-border-default);
  border-radius: var(--ft-radius-md);
  appearance: none;
  cursor: pointer;
  /* Chevron drawn as an inline SVG data URI: no extra request, no icon font. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b0000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--ft-space-4) center;
  transition:
    border-color var(--ft-duration-fast) var(--ft-ease-standard),
    box-shadow var(--ft-duration-fast) var(--ft-ease-standard);
}

.ft-select:focus {
  outline: none;
  border-color: var(--ft-burgundy-600);
  box-shadow: var(--ft-shadow-focus);
}

.ft-select:disabled {
  background-color: var(--ft-bg-sunken);
  cursor: not-allowed;
}

.ft-select--invalid {
  border-color: var(--ft-danger-500);
}

/* ---- Option cards — a visual alternative to <select> --------------------
   Used where the choice is part of the product's personality rather than
   admin data entry (platform, weekly goal). Radio semantics underneath. */

.ft-options {
  display: grid;
  gap: var(--ft-space-2);
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.ft-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ft-space-3);
  padding: var(--ft-space-4);
  background-color: var(--ft-bg-surface);
  border: 1.5px solid var(--ft-border-subtle);
  border-radius: var(--ft-radius-lg);
  cursor: pointer;
  transition:
    border-color var(--ft-duration-fast) var(--ft-ease-standard),
    background-color var(--ft-duration-fast) var(--ft-ease-standard),
    box-shadow var(--ft-duration-fast) var(--ft-ease-standard);
}

.ft-option:hover {
  border-color: var(--ft-burgundy-300);
  box-shadow: var(--ft-shadow-sm);
}

.ft-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ft-option__input:checked + .ft-option__body {
  color: var(--ft-burgundy-700);
}

.ft-option:has(.ft-option__input:checked) {
  border-color: var(--ft-burgundy-600);
  background-color: var(--ft-burgundy-50);
  box-shadow: var(--ft-shadow-sm);
}

.ft-option__input:focus-visible + .ft-option__body {
  outline: 2px solid var(--ft-burgundy-600);
  outline-offset: 4px;
  border-radius: var(--ft-radius-xs);
}

.ft-option__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ft-option__label {
  font-weight: var(--ft-weight-semibold);
  font-size: var(--ft-text-sm);
}

.ft-option__meta {
  font-size: var(--ft-text-xs);
  color: var(--ft-text-muted);
}

.ft-option__icon {
  display: flex;
  flex-shrink: 0;
  width: var(--ft-icon-card);
  height: var(--ft-icon-card);
}

/* ==========================================================================
   Switch
   ========================================================================== */

.ft-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--ft-space-3);
  cursor: pointer;
}

.ft-switch__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ft-switch__track {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 1.625rem;
  background-color: var(--ft-neutral-300);
  border-radius: var(--ft-radius-full);
  transition: background-color var(--ft-duration-base) var(--ft-ease-standard);
}

.ft-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.125rem;
  height: 1.125rem;
  background-color: var(--ft-neutral-0);
  border-radius: var(--ft-radius-full);
  box-shadow: var(--ft-shadow-xs);
  transition: transform var(--ft-duration-base) var(--ft-ease-spring);
}

.ft-switch__input:checked + .ft-switch__track {
  background-color: var(--ft-burgundy-600);
}

.ft-switch__input:checked + .ft-switch__track .ft-switch__thumb {
  transform: translateX(1.125rem);
}

.ft-switch__input:focus-visible + .ft-switch__track {
  box-shadow: var(--ft-shadow-focus);
}

.ft-switch__input:disabled + .ft-switch__track {
  opacity: 0.5;
  cursor: not-allowed;
}

.ft-switch__label {
  font-size: var(--ft-text-sm);
  line-height: var(--ft-leading-snug);
}

/* ==========================================================================
   Card
   ========================================================================== */

.ft-card {
  background-color: var(--ft-bg-surface);
  border: 1px solid var(--ft-border-subtle);
  border-radius: var(--ft-radius-xl);
  box-shadow: var(--ft-shadow-sm);
  overflow: hidden;
}

.ft-card__body {
  padding: var(--ft-space-5);
}

.ft-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ft-space-3);
  padding: var(--ft-space-5) var(--ft-space-5) 0;
}

.ft-card__title {
  font-size: var(--ft-text-lg);
  font-weight: var(--ft-weight-bold);
}

.ft-card__footer {
  padding: var(--ft-space-4) var(--ft-space-5);
  background-color: var(--ft-bg-sunken);
  border-top: 1px solid var(--ft-border-subtle);
}

.ft-card--flush .ft-card__body { padding: 0; }
.ft-card--raised { box-shadow: var(--ft-shadow-md); }
.ft-card--brand {
  background-color: var(--ft-burgundy-600);
  border-color: var(--ft-burgundy-700);
  color: var(--ft-text-inverse);
}

.ft-card--interactive {
  cursor: pointer;
  transition:
    transform var(--ft-duration-fast) var(--ft-ease-standard),
    box-shadow var(--ft-duration-fast) var(--ft-ease-standard);
}

.ft-card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--ft-shadow-md);
}

@media (min-width: 768px) {
  .ft-card__body   { padding: var(--ft-space-6); }
  .ft-card__header { padding: var(--ft-space-6) var(--ft-space-6) 0; }
}

/* ==========================================================================
   Badge
   ========================================================================== */

.ft-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--ft-space-1);
  padding: 3px var(--ft-space-2);
  font-size: var(--ft-text-xs);
  font-weight: var(--ft-weight-semibold);
  line-height: 1.4;
  border-radius: var(--ft-radius-full);
  white-space: nowrap;
}

.ft-badge--neutral { background-color: var(--ft-neutral-100); color: var(--ft-neutral-700); }
.ft-badge--brand   { background-color: var(--ft-burgundy-50); color: var(--ft-burgundy-700); }
.ft-badge--accent  { background-color: var(--ft-gold-50);     color: var(--ft-gold-700); }
.ft-badge--success { background-color: var(--ft-success-50);  color: var(--ft-success-700); }
.ft-badge--warning { background-color: var(--ft-warning-50);  color: var(--ft-warning-700); }
.ft-badge--danger  { background-color: var(--ft-danger-50);   color: var(--ft-danger-700); }
.ft-badge--info    { background-color: var(--ft-info-50);     color: var(--ft-info-700); }

.ft-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--ft-radius-full);
  background-color: currentColor;
}

/* ==========================================================================
   Avatar
   --------------------------------------------------------------------------
   Renders initials on a burgundy field. Profile photos are not in v2; when
   they arrive this component takes an image source and nothing else in the
   application changes, because every member reference already routes here.
   ========================================================================== */

.ft-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ft-radius-full);
  background-color: var(--ft-burgundy-600);
  color: var(--ft-text-inverse);
  font-size: var(--ft-text-sm);
  font-weight: var(--ft-weight-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow: hidden;
  user-select: none;
}

.ft-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ft-avatar--sm { width: 2rem;   height: 2rem;   font-size: var(--ft-text-xs); }
.ft-avatar--lg { width: 3.5rem; height: 3.5rem; font-size: var(--ft-text-lg); }
.ft-avatar--xl { width: 5rem;   height: 5rem;   font-size: var(--ft-text-2xl); }

/* ==========================================================================
   Spinner
   ========================================================================== */

.ft-spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2.5px solid var(--ft-burgundy-100);
  border-top-color: var(--ft-burgundy-600);
  border-radius: var(--ft-radius-full);
  animation: ft-spin 0.7s linear infinite;
}

.ft-spinner--sm { width: 1rem;    height: 1rem;    border-width: 2px; }
.ft-spinner--lg { width: 2.25rem; height: 2.25rem; border-width: 3px; }
.ft-spinner--inverse {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: var(--ft-neutral-0);
}

/* ==========================================================================
   Skeleton
   --------------------------------------------------------------------------
   Shown while the dashboard loads. Skeletons that match the real layout make
   the wait feel shorter than a spinner does, because the page appears to be
   assembling rather than stalling.
   ========================================================================== */

.ft-skeleton {
  background-color: var(--ft-neutral-100);
  background-image: linear-gradient(
    90deg,
    var(--ft-neutral-100) 0%,
    var(--ft-neutral-200) 50%,
    var(--ft-neutral-100) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--ft-radius-sm);
  animation: ft-shimmer 1.6s var(--ft-ease-standard) infinite;
}

.ft-skeleton--text {
  height: 0.85em;
  margin-block: 0.2em;
  border-radius: var(--ft-radius-xs);
}

.ft-skeleton--title  { height: 1.6em; border-radius: var(--ft-radius-xs); }
.ft-skeleton--circle { border-radius: var(--ft-radius-full); }
.ft-skeleton--card   { height: 6rem;  border-radius: var(--ft-radius-xl); }

/* ==========================================================================
   Empty state
   ========================================================================== */

.ft-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--ft-space-3);
  padding: var(--ft-space-10) var(--ft-space-5);
}

.ft-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--ft-radius-full);
  background-color: var(--ft-burgundy-50);
  color: var(--ft-burgundy-400);
}

/* Illustration variant. Two colours, both set here: the stroke comes from
   `color` and the flat fill from --ft-illus-fill, so every illustration is
   themed by this one rule and none of them carries a hex. */
.ft-empty__illustration {
  --ft-illus-fill: var(--ft-burgundy-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ft-burgundy-300);
}

.ft-empty__art {
  width: var(--ft-icon-empty);
  height: var(--ft-icon-empty);
}

.ft-empty__title {
  font-size: var(--ft-text-lg);
  font-weight: var(--ft-weight-bold);
}

.ft-empty__message {
  max-width: 26rem;
  font-size: var(--ft-text-sm);
  color: var(--ft-text-muted);
  line-height: var(--ft-leading-relaxed);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.ft-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--ft-z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background-color: var(--ft-bg-overlay);
  animation: ft-fade-in var(--ft-duration-fast) var(--ft-ease-standard);
}

.ft-modal {
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  background-color: var(--ft-bg-surface);
  /* Sheet on mobile: square bottom corners so it reads as attached to the
     edge of the screen. Becomes a centred dialog at tablet width. */
  border-radius: var(--ft-radius-2xl) var(--ft-radius-2xl) 0 0;
  box-shadow: var(--ft-shadow-lg);
  animation: ft-slide-up var(--ft-duration-base) var(--ft-ease-out);
}

.ft-modal__grabber {
  width: 2.25rem;
  height: 4px;
  margin: var(--ft-space-3) auto 0;
  background-color: var(--ft-neutral-300);
  border-radius: var(--ft-radius-full);
}

.ft-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ft-space-4);
  padding: var(--ft-space-5) var(--ft-space-5) var(--ft-space-3);
}

.ft-modal__title {
  font-size: var(--ft-text-xl);
  font-weight: var(--ft-weight-bold);
}

.ft-modal__body   { padding: 0 var(--ft-space-5) var(--ft-space-5); }
.ft-modal__footer {
  display: flex;
  gap: var(--ft-space-3);
  padding: var(--ft-space-4) var(--ft-space-5);
  border-top: 1px solid var(--ft-border-subtle);
}

.ft-modal__footer > .ft-btn { flex: 1; }

@media (min-width: 480px) {
  .ft-modal-backdrop {
    align-items: center;
    padding: var(--ft-space-5);
  }

  .ft-modal {
    max-width: var(--ft-container-sm);
    border-radius: var(--ft-radius-2xl);
    animation: ft-scale-in var(--ft-duration-base) var(--ft-ease-out);
  }

  .ft-modal__grabber { display: none; }
}

/* ==========================================================================
   Toast
   ========================================================================== */

.ft-toast-region {
  position: fixed;
  z-index: var(--ft-z-toast);
  left: 50%;
  transform: translateX(-50%);
  /* Sits above the bottom nav on mobile so it never covers navigation. */
  bottom: calc(var(--ft-bottom-nav-height) + var(--ft-space-4));
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-2);
  width: calc(100% - var(--ft-space-8));
  max-width: 26rem;
  pointer-events: none;
}

.ft-toast {
  display: flex;
  align-items: flex-start;
  gap: var(--ft-space-3);
  padding: var(--ft-space-3) var(--ft-space-4);
  background-color: var(--ft-neutral-900);
  color: var(--ft-neutral-0);
  border-radius: var(--ft-radius-md);
  box-shadow: var(--ft-shadow-lg);
  font-size: var(--ft-text-sm);
  line-height: var(--ft-leading-snug);
  pointer-events: auto;
  animation: ft-rise-in var(--ft-duration-base) var(--ft-ease-out);
}

.ft-toast--leaving {
  animation: ft-fade-out var(--ft-duration-fast) var(--ft-ease-standard) forwards;
}

.ft-toast--success { background-color: var(--ft-success-700); }
.ft-toast--error   { background-color: var(--ft-danger-700); }

.ft-toast__icon    { flex-shrink: 0; width: 1.125rem; height: 1.125rem; margin-top: 1px; }
.ft-toast__message { flex: 1; min-width: 0; }

.ft-toast__close {
  flex-shrink: 0;
  color: inherit;
  opacity: 0.7;
  padding: 2px;
}

.ft-toast__close:hover { opacity: 1; }

@media (min-width: 768px) {
  .ft-toast-region {
    bottom: var(--ft-space-6);
  }
}

/* ==========================================================================
   PWA & Notification Prompts
   ========================================================================== */

.ft-pwa-prompt,
.ft-notification-prompt {
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-4);
  font-size: var(--ft-text-md);
  color: var(--ft-text-secondary);
  line-height: var(--ft-leading-relaxed);
}

.ft-pwa-prompt__text,
.ft-notification-prompt__text {
  margin: 0;
}

.ft-pwa-prompt__steps {
  display: flex;
  flex-direction: column;
  gap: var(--ft-space-3);
  padding: var(--ft-space-3) var(--ft-space-4);
  background-color: var(--ft-neutral-50);
  border-radius: var(--ft-radius-md);
  border: 1px solid var(--ft-border-subtle);
}

.ft-pwa-prompt__step {
  display: flex;
  align-items: center;
  gap: var(--ft-space-3);
}

.ft-pwa-prompt__step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--ft-radius-full);
  background-color: var(--ft-burgundy-600);
  color: var(--ft-text-inverse);
  font-size: var(--ft-text-xs);
  font-weight: var(--ft-weight-bold);
  flex-shrink: 0;
}

.ft-pwa-prompt__step-text {
  font-size: var(--ft-text-sm);
  color: var(--ft-text-primary);
}

.ft-notification-prompt__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ft-space-2);
  margin-top: var(--ft-space-2);
}
