/*
  ----------------------------------------
  UI Components
  ----------------------------------------

  Breakpoints (defined as --bp-* in theme.css; CSS @media can't use vars):
    --bp-sm: 36rem   (576px)
    --bp-md: 48rem   (768px)
    --bp-lg: 56rem   (896px)
    --bp-xl: 64rem   (1024px)
*/

@layer styles {
  /* Disabled links */
  a[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Buttons
  ---------------------------------- */
  .ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;       /* Figma spec: 8px 14px */
    height: 2.25rem;                 /* Figma spec: 36px */
    border-radius: var(--rounded-md); /* Figma spec: 6px */
    border: var(--border) solid transparent;
    background: var(--brand-1);      /* Default = navy */
    color: var(--white);
    font-size: 0.9375rem;            /* 15px floor */
    font-weight: 500;
    line-height: 1.25rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;

    &:hover {
      background: var(--brand-1-900);  /* #021438 */
    }

    &:active {
      transform: translateY(0.5px);
    }

    &:disabled,
    &.disabled {
      background: var(--brand-1-200);  /* #8FA0C3 */
      cursor: not-allowed;
      pointer-events: none;
    }

    /* ── Semantic solid variants ───────────────── */

    &.ui-brand-1 {
      background: var(--brand-1);
      color: var(--white);
      &:hover    { background: var(--brand-1-900); }
      &:disabled, &.disabled { background: var(--brand-1-200); color: var(--white); }
    }

    &.ui-success,
    &.ui-brand-2 {
      background: var(--success);
      color: var(--white);
      &:hover    { background: var(--success-dark); }
      &:disabled, &.disabled { background: var(--success-mid); color: var(--white); }
    }

    &.ui-info,
    &.ui-brand-3 {
      background: var(--info);
      color: var(--white);
      &:hover    { background: var(--info-dark); }
      &:disabled, &.disabled { background: var(--info-mid); color: var(--white); }
    }

    &.ui-warning,
    &.ui-brand-4 {
      background: var(--warning);
      color: var(--white);
      &:hover    { background: var(--warning-dark); }
      &:disabled, &.disabled { background: var(--warning-mid); color: var(--white); }
    }

    &.ui-error {
      background: var(--error);
      color: var(--white);
      &:hover    { background: var(--error-dark); }
      &:disabled, &.disabled { background: var(--error-mid); color: var(--white); }
    }

    /* Gray — light bg with dark text */
    &.ui-gray,
    &.ui-neutral-lighter,
    &.ui-neutral-light {
      background: var(--secondary-bg);
      color: var(--secondary-text);
      border-color: transparent;
      &:hover    { background: var(--lighter); }
      &:disabled, &.disabled { background: var(--gray-50); color: var(--text-meta); }
    }

    /* Legacy neutral (midtone gray, white text) — kept for compat */
    &.ui-neutral {
      background: var(--midtone);
      color: var(--white);
      &:hover    { background: var(--dark); }
      &:disabled, &.disabled { opacity: 0.5; }
    }

    /* Dark — near-black bg with white text, used for homepage CTAs */
    &.ui-dark {
      background: var(--darker);
      color: var(--white);
      &:hover    { background: var(--dark); }
      &:disabled, &.disabled { opacity: 0.5; }
    }

    /* ── Outline type — .ui-outline + optional semantic ── */

    &.ui-outline {
      background: transparent;
      border-color: var(--brand-1);
      color: var(--brand-1);

      &:hover    { background: var(--brand-1-50); }
      &:disabled, &.disabled {
        background: transparent;
        border-color: var(--brand-1-200);
        color: var(--brand-1-200);
      }

      &.ui-success, &.ui-brand-2 {
        border-color: var(--success);
        color: var(--success);
        &:hover    { background: var(--success-light); }
        &:disabled, &.disabled { border-color: var(--success-mid); color: var(--success-mid); }
      }

      &.ui-info, &.ui-brand-3 {
        border-color: var(--info);
        color: var(--info);
        &:hover    { background: var(--info-light); }
        &:disabled, &.disabled { border-color: var(--info-mid); color: var(--info-mid); }
      }

      &.ui-warning, &.ui-brand-4 {
        border-color: var(--warning);
        color: var(--warning);
        &:hover    { background: var(--warning-light); }
        &:disabled, &.disabled { border-color: var(--warning-mid); color: var(--warning-mid); }
      }

      &.ui-error {
        border-color: var(--error);
        color: var(--error);
        &:hover    { background: var(--error-light); }
        &:disabled, &.disabled { border-color: var(--error-mid); color: var(--error-mid); }
      }

      &.ui-gray, &.ui-neutral-lighter, &.ui-neutral-light, &.ui-neutral {
        border-color: var(--text-meta);
        color: var(--secondary-text);
        &:hover    { background: var(--lighter); }
        &:disabled, &.disabled { border-color: var(--secondary-bg); color: var(--text-meta); }
      }
    }

    /* ── Icon-only square button ───────────────── */

    &.ui-icon {
      padding: 0.5rem;
      width: 2.25rem;
    }

    /* ── Link-style button ─────────────────────── */

    &.ui-link {
      background: none;
      border-color: transparent;
      border-radius: 0;
      padding: 0;
      height: auto;
      font-weight: inherit;
      font-size: inherit;
      color: var(--link);
      text-decoration: underline;
      line-height: inherit;

      &:hover    { background: none; opacity: 0.75; }
      &:active   { transform: none; }
      &:disabled, &.disabled { opacity: 0.4; background: none; }
    }
  }

  /* Buttons mini-round */
  .ui-button-mini-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--rounded-full);
    background: var(--lighter);
    color: var(--brand-1);
    box-shadow: var(--shadow-sm);
    transition: all 250ms ease;

    &:hover {
      background: var(--brand-1);
      color: var(--lighter);
    }
  }

  /* Badge
  ---------------------------------- */
  .ui-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6875rem;      /* Base: 4px 11px — Figma spec */
    border-radius: var(--rounded-full); /* Pill shape */
    background: var(--lighter);
    color: var(--darker);
    font-size: 0.9375rem;            /* 15px floor */
    font-weight: 500;
    line-height: 1.25rem;            /* 20px */
    white-space: nowrap;

    /* ── Sizes ──────────────────────────────────── */

    &.ui-sm {
      padding: 0.25rem 0.4375rem;    /* 4px 7px */
      font-size: 0.9375rem;          /* 15px floor */
      line-height: 1rem;             /* 16px */
    }

    &.ui-lg {
      padding: 0.4375rem 0.875rem;   /* 7px 14px */
    }

    /* ── Ghost variants (light bg + colored text) ── */

    &.ui-success {
      background: var(--success-light);
      color: var(--success);
    }

    &.ui-error {
      background: var(--error-light);
      color: var(--error);
    }

    &.ui-warning {
      background: var(--warning-light);
      color: var(--warning);
    }

    &.ui-info {
      background: var(--info-light);
      color: var(--info);
    }

    &.ui-secondary {
      background: var(--secondary-bg);
      color: var(--secondary-text);
    }

    /* ── Solid variants (.ui-solid + state) ─────── */

    &.ui-solid {
      background: var(--darker);
      color: var(--white);

      &.ui-success {
        background: var(--success);
        color: var(--success-light);
      }

      &.ui-error {
        background: var(--error);
        color: var(--error-light);
      }

      &.ui-warning {
        background: var(--warning);
        color: var(--warning-light);
      }

      &.ui-info {
        background: var(--info);
        color: var(--info-light);
      }

      &.ui-secondary {
        background: var(--text-meta);  /* #909090 — Figma secondary solid bg */
        color: var(--gray-50);         /* #F9FAFB ≈ Figma #F9F9FA */
      }
    }
  }

  /* Filter pills — radio-button pill group used in list filters.
     Each label holds a hidden radio. CSS :has() drives the active state so
     no server re-render or extra JS is needed.
     Set --pill-active-bg (and optionally --pill-active-color) on each label
     to control the activated colour:
       style="--pill-active-bg: var(--error)"
  ---------------------------------- */
  .ui-filter-pill {
    background: var(--pill-bg, var(--secondary-bg));
    color: var(--secondary-text);
    border-color: transparent;
    &:hover { background: var(--lighter); }

    .ui-badge {
      background: var(--lighter);
      color: var(--darker);
    }

    &:has(input[type="radio"]:checked) {
      background: var(--pill-active-bg, var(--midtone));
      color: var(--pill-active-color, var(--white));
      border-color: transparent;
      &:hover { background: var(--pill-active-bg, var(--midtone)); filter: brightness(0.9); }

      /* ── Badge active states — solid variant triggered by class on .ui-badge ── */
      .ui-badge.ui-brand-1 { background: var(--brand-1); color: var(--white); }
      .ui-badge.ui-error   { background: var(--error);   color: var(--white); }
      .ui-badge.ui-warning { background: var(--warning); color: var(--warning-light); }
      .ui-badge.ui-success { background: var(--success); color: var(--success-light); }
    }
  }

  /* Alert / Callout
  ---------------------------------- */
  .ui-alert {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--rounded-md);
    border: var(--border) solid transparent;
    font-size: 0.9375rem;  /* 15px floor */

    /* Default / neutral */
    background: var(--lighter);
    color: var(--darker);
    border-color: var(--light);

    &.ui-success {
      background: var(--success-light);
      color: var(--success-dark);
      border-color: var(--success-mid);
    }

    &.ui-warning {
      background: var(--warning-light);
      color: var(--warning-dark);
      border-color: var(--warning-mid);
    }

    &.ui-info {
      background: var(--info-light);
      color: var(--info-dark);
      border-color: var(--info-mid);
    }

    &.ui-error {
      background: var(--error-light);
      color: var(--error-dark);
      border-color: var(--error-mid);
    }
  }

  /* Shared sponsor grid (used on both marketing and division pages)
  ---------------------------------- */
  .ui-sponsor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
  }

  @media (min-width: 48rem) { /* --bp-md */
    .ui-sponsor-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (min-width: 64rem) { /* --bp-xl */
    .ui-sponsor-grid {
      grid-template-columns: repeat(5, minmax(0, 1fr));
    }
  }

  .ui-sponsor-logo {
    height: 6rem;
    border-radius: var(--rounded-md);
    background: var(--white);
    border: 1px solid var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Tournament Panels
  ---------------------------------- */

  .ui-tournament-panel {
    display: flex;
    flex: 1 1 32rem;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
    max-width: 34rem;
    height: 100%;
    max-height: 50rem;
    padding: var(--space-lg);
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 1rem;
    background:
      radial-gradient(circle at top, rgb(255 255 255 / 0.05), transparent 45%),
      linear-gradient(145deg, rgb(39 39 42 / 0.94), rgb(24 24 27 / 0.98));
    box-shadow:
      0 24px 40px -24px rgb(0 0 0 / 0.65),
      inset 0 1px 0 rgb(255 255 255 / 0.06);

    .ui-tournament-header {
      display: flex;
      flex-direction: column;
      gap: var(--space-sm);

      .ui-tournament-title {
        margin: 0;
        color: var(--white);
        font-size: var(--text-lg);
        font-weight: 800;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.02em;
      }

      .ui-tournament-divider {
        height: 2px;
        width: 100%;
        background: linear-gradient(90deg, var(--error), rgb(239 68 68 / 0.15));
      }
    }

    .ui-tournament-list {
      display: flex;
      flex: 1;
      flex-direction: column;
      gap: 0;
      margin: 0;
      padding: 0 var(--space-2xs) 0 0;
      list-style: none;
      overflow-y: auto;
      scrollbar-width: thin;
      scrollbar-color: rgb(255 255 255 / 0.18) transparent;

      .ui-standing-row {
        display: grid;
        grid-template-columns: 4rem minmax(0, 1fr) 5rem;
        gap: var(--space-sm);
        align-items: center;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid rgb(255 255 255 / 0.08);

        span:last-child {
          text-align: right;
        }
      }

      .ui-standing-row--head {
        color: rgb(212 212 216);
        font-size: var(--text-sm);
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
      }

      .ui-tournament-item {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        padding: var(--space-sm) 0;
        border-bottom: 1px solid rgb(255 255 255 / 0.08);
        transition:
          transform 120ms ease,
          background-color 120ms ease;

        .ui-tournament-date {
          display: inline-flex;
          flex-shrink: 0;
          align-items: center;
          justify-content: center;
          min-width: 4.75rem;
          padding: var(--space-2xs) var(--space-xs);
          border-radius: 0.45rem;
          background: linear-gradient(
            135deg,
            rgb(127 29 29 / 0.92),
            rgb(69 10 10 / 0.92)
          );
          color: rgb(254 202 202);
          font-size: var(--text-sm);
          font-weight: 800;
          letter-spacing: 0.06em;
        }

        .ui-tournament-name {
          color: rgb(244 244 245);
          font-size: var(--text-base);
          font-weight: 500;
          line-height: 1.35;
        }
      }

      .ui-tournament-item:hover {
        transform: translateX(0.15rem);
      }

      .ui-tournament-item:last-child {
        border-bottom: 0;
      }
    }

    .ui-tournament-list::-webkit-scrollbar {
      width: 0.35rem;
    }

    .ui-tournament-list::-webkit-scrollbar-thumb {
      border-radius: var(--rounded-full);
      background: rgb(255 255 255 / 0.18);
    }

    .ui-tournament-list::-webkit-scrollbar-track {
      background: transparent;
    }
  }

  @media (max-width: 40rem) {
    .ui-tournament-panel {
      min-height: auto;
      padding: var(--space-md);
    }

    .ui-tournament-item {
      align-items: flex-start;
      flex-direction: column;
    }
  }

  /* Hamburger Button
  ---------------------------------- */
  .ui-hamburger-button {
    --button-width: 1.875rem;        /* 30px */
    --button-height: 1.5rem;         /* 24px */
    --line-thickness: 0.1875rem;     /* 3px */
    --line-color: var(--darker);
    --line-radius: var(--rounded-sm); /* 2px */
    --number-of-spins: 5;
    --duration: 0.15s;
    --focus-color: rgba(0, 0, 0, 0.2);

    position: relative;
    display: block;
    width: var(--button-width);
    height: var(--button-height);
    cursor: pointer;
    outline: none;

    .line-1,
    .line-2,
    .line-3 {
      position: absolute;
      display: block;
      width: 100%;
      height: var(--line-thickness);
      background-color: var(--line-color);
      border-radius: var(--line-radius);
      transition: all var(--duration) ease-in-out;
    }

    .line-2 {
      top: calc(50% - var(--line-thickness) / 2);
    }

    .line-3 {
      bottom: 0;
    }

    /* Hamburger animate */
    [data-ui-hamburger-open-value="true"] & {
      .line-1 {
        transform: translateY(
            calc(var(--button-height) / 2 - var(--line-thickness) / 2)
          )
          rotate(calc(-1 * 45deg * var(--number-of-spins)));
      }
      .line-2 {
        opacity: 0;
      }
      .line-3 {
        transform: translateY(
            calc(-1 * (var(--button-height) / 2 - var(--line-thickness) / 2))
          )
          rotate(calc(45deg * var(--number-of-spins)));
      }
    }
  }

  /* Hamburger Menu
    ---------------------------------- */
  .ui-hamburger-menu {
    position: fixed;
    right: 0;
    top: 4rem;
    bottom: 0;
    z-index: 90;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgb(255 255 255 / 0.08);
    transition:
      transform 120ms ease-in-out,
      visibility 0s 120ms;
    transform: translateX(100%);
    overflow-y: auto;
    visibility: hidden;

    /* Show menu when hamburger is open */
    [data-ui-hamburger-open-value="true"] & {
      visibility: visible;
      transform: translateX(0);
      transition:
        transform 120ms ease-in-out,
        visibility 0s 0s;
    }

    /* Never show on desktop */
    @media (min-width: 56.01rem) { /* above --bp-lg */
      display: none !important;
    }
  }

  /* Avatar
  ---------------------------------- */
  .ui-avatar {
    /* Default size fallback — helper always sets data-size, but just in case */
    --avatar-size: 2.5rem;
    --initials-font-size: 1rem;

    &[data-size="sm"] {
      --avatar-size: 1.5rem;
      --initials-font-size: 0.9375rem;
    }

    /* Medium is the default */
    &[data-size="md"] {
      --avatar-size: 2.5rem;
      --initials-font-size: 1rem;
    }

    &[data-size="lg"] {
      --avatar-size: 7.5rem;
      --initials-font-size: 3rem;
    }

    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: var(--rounded-full);
    background: var(--brand-1);          /* Navy — initials background */
    outline: var(--border-lg) solid var(--white);
    color: var(--white);
    overflow: hidden;
    box-shadow: var(--shadow);

    .initials {
      font-size: var(--initials-font-size);
      font-weight: var(--font-semibold);
      line-height: 1;
    }
  }

  /* Toast
  ---------------------------------- */
  .ui-toast {
    position: fixed;
    display: flex;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    align-items: center;
    gap: var(--space-xs);
    min-width: 24rem;
    padding: var(--space-sm) var(--space-sm);
    border-radius: var(--rounded);
    box-shadow: var(--shadow);
    background: var(--darker);
    color: var(--light);
    border-left: 0.375rem solid;
    animation: ephemeral 8s both;
    view-transition-name: ui-toast; /* own compositing layer, excluded from root page crossfade */

    svg {
      flex-shrink: 0;
      border-radius: 50%;
    }

    span {
      flex: 1;
    }

    .ui-toast-close {
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      border-radius: 100%;
      width: 1.6rem;
      height: 1.6rem;

      &:hover {
        color: var(--white);
        background-color: var(--black);
      }
    }

    &.ui-toast-success {
      border-left-color: var(--success);

      svg.icon {
        color: var(--success);
      }
    }

    &.ui-toast-error {
      border-left-color: var(--error);

      svg.icon {
        color: var(--error);
      }
    }
  }

  /* Dropdown
  ---------------------------------- */
  .ui-dropdown {
    position: relative;
    display: inline-block;

    menu,
    ul {
      position: absolute;
      top: 100%;
      right: 0;
      z-index: 100;
      min-width: 12rem;
      margin-top: var(--space-2xs);
      padding: var(--space-2xs);
      background: var(--white);
      border-radius: var(--rounded);
      box-shadow: var(--shadow);
      list-style: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-0.5rem);
      transition:
        opacity 150ms ease-in-out,
        transform 150ms ease-in-out,
        visibility 0s 150ms;

      li {
        margin: 0;
      }

      a,
      button {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        width: 100%;
        padding: var(--space-2xs) var(--space-xs);
        border-radius: var(--rounded-sm);
        text-decoration: none;
        color: var(--darker);
        background: transparent;
        border: none;
        cursor: pointer;
        transition: background-color 100ms ease;

        &:hover {
          background-color: var(--lighter);
        }
      }
    }

    /* Show menu when dropdown is open */
    &.is-open menu,
    &.is-open ul {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      transition:
        opacity 150ms ease-in-out,
        transform 150ms ease-in-out,
        visibility 0s 0s;
    }
  }

  /* Auth Verify OTP Input
  ---------------------------------- */
  .ui-auth-card {
    width: min(26rem, 100%);
  }

  .ui-auth-card--centered {
    margin-inline: auto;
    text-align: center;
  }

  .ui-auth-card__logo {
    width: min(12rem, 100%);
  }

  .ui-auth-card__submit {
    max-width: 16rem;
  }

  .ui-auth-verify {
    display: flex;
    justify-content: center;

    .ui-auth-verify-digits {
      display: flex;
      gap: var(--space-xs);

      input {
        width: 3rem;
        height: 3.5rem;
        padding: 0;
        font-size: 1.5rem;
        font-weight: 700;
        text-align: center;
        border: var(--border-lg) solid var(--light);
        border-radius: var(--rounded);
        background: var(--white);
        color: var(--darker);
        transition:
          border-color 150ms ease,
          box-shadow 150ms ease;

        &:focus {
          outline: none;
          border-color: var(--brand-1);
          box-shadow: 0 0 0 3px
            color-mix(in srgb, var(--brand-1) 20%, transparent);
        }

        &::placeholder {
          color: var(--midtone);
        }
      }
    }
  }

  @media (max-width: 36rem) {
    .ui-auth-card {
      width: 100%;
    }

    .ui-auth-verify .ui-auth-verify-digits {
      gap: var(--space-2xs);

      input {
        width: 2.5rem;
        height: 3rem;
        font-size: 1.25rem;
      }
    }
  }

  /* Modal
  ---------------------------------- */
  .ui-modal {
    border: none;
    border-radius: var(--rounded-md);
    padding: var(--space-sm);
    margin: auto;
    width: min(var(--max-w-form), calc(100vw - (var(--space-sm) * 2)));
    max-width: 100%;
    max-height: min(90vh, 52rem);
    overflow: hidden;
    color: var(--dark);
    background: var(--white);
    box-shadow: var(--shadow-lg);

    &.modal-sm { width: min(24rem,   calc(100vw - (var(--space-sm) * 2))); }
    &.modal-lg { width: min(52rem,   calc(100vw - (var(--space-sm) * 2))); }
    &.modal-xl { width: min(68rem,   calc(100vw - (var(--space-sm) * 2))); }
  }

  .ui-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
  }

  .ui-modal[open] {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .ui-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: var(--space-sm);
    border-bottom: var(--border) solid var(--light);
    flex-shrink: 0;
  }

  /* Pure scroll container — no padding; header/actions own the breathing room */
  .ui-modal__body {
    overflow-y: auto;
    flex: 1;
  }

  /* Optional sticky action bar at the bottom of a modal form */
  .ui-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    border-top: var(--border) solid var(--light);
    padding-top: var(--space-sm);
    flex-shrink: 0;
  }

  /* Breadcrumb */
  .ui-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
    font-size: var(--text-sm);
    padding: var(--space-2xs) 0;
  }

  .ui-breadcrumb-item {
    padding-left: var(--space-2xs);
    color: var(--midtone);
    display: flex;
    gap: var(--space-xs);
  }

  .ui-breadcrumb-item:first-child {
    padding-left: 0;
  }

  .ui-breadcrumb-item a {
    text-decoration: none;
    color: var(--midtone);
    display: flex;
    gap: var(--space-xs);
  }

  .ui-breadcrumb-item.active {
    color: var(--brand-2);
  }

  .ui-breadcrumb-item a,
  .ui-breadcrumb-item.active {
    line-height: 1;
    align-items: center;
  }

  .ui-breadcrumb-item a:hover {
    text-decoration: underline;
  }

  /* separator slash after each link */
  .ui-breadcrumb-item + .ui-breadcrumb-item::before {
    content: "/";
    margin-right: var(--space-2xs);
    color: var(--midtone);
    pointer-events: none;
    font-size: 1rem;
  }
}

/* ── Smart search spotlight overlay ─────────────────────────────────────── */

.ui-search-floating {
  position: fixed !important;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: 540px;
  max-width: 92vw;
  z-index: 50;
  background: var(--surface, #fff);
  border-radius: var(--radius-lg, 0.75rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: var(--space-sm, 0.75rem);
  animation: ui-search-drop-in 0.15s ease-out;
}


@keyframes ui-search-drop-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}
