@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: "Number Separators";
  src: local("Helvetica Neue"), local("HelveticaNeue"), local("Arial");
  font-weight: 100 550;
  unicode-range: U+002C, U+002E;
}

@font-face {
  font-family: "Number Separators";
  src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"), local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 551 900;
  unicode-range: U+002C, U+002E;
}

@layer base {
  body {
    @apply bg-canvas font-sans text-sm text-ink-body antialiased;
  }

  fieldset {
    min-width: 0;
  }

  h1, h2, h3 {
    @apply font-semibold text-ink;
  }
}

@layer base {
  [type="checkbox"],
  [type="radio"] {
    @apply h-4 w-4 shrink-0 cursor-pointer border-[1.5px] border-ink-faint/70 bg-surface text-brand transition hover:border-brand focus:ring-2 focus:ring-brand/30 focus:ring-offset-0;
  }

  [type="checkbox"] {
    @apply rounded-[4px];
  }
}

@layer components {
  .count-badge {
    @apply inline-flex min-w-5 justify-center rounded-full bg-ink/5 px-1.5 text-[11px] font-semibold tabular-nums leading-5 text-ink-muted;
  }

  .card-subtitle {
    @apply max-w-subtitle text-[13px] text-ink-secondary;
  }

  .surface-card {
    @apply rounded-card bg-surface shadow-panel;
  }

  .picker-input {
    @apply pr-10 [&::-webkit-calendar-picker-indicator]:absolute [&::-webkit-calendar-picker-indicator]:inset-y-0 [&::-webkit-calendar-picker-indicator]:right-0 [&::-webkit-calendar-picker-indicator]:h-full [&::-webkit-calendar-picker-indicator]:w-10 [&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:opacity-0;
  }

  .calendar-input {
    @apply cursor-pointer [&::-webkit-calendar-picker-indicator]:hidden;
  }

  .picker-button {
    @apply absolute inset-y-0 right-0 flex w-10 items-center justify-center rounded-r-control text-ink-faint transition hover:text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand;
  }

  .picker-icon {
    @apply pointer-events-none absolute inset-y-0 right-3 flex items-center text-ink-faint;
  }

  .comment-bubble {
    @apply min-w-0 rounded-card bg-surface-soft px-4 py-3 ring-1 ring-inset ring-line-soft;
  }

  .table-head {
    @apply border-b border-line bg-surface-sunken px-5 py-3 text-[13px] font-semibold text-ink-secondary;
  }

  .list-band {
    @apply bg-surface-soft px-4 py-2 text-[13px] font-semibold text-ink-secondary;
  }


  .glass-chip {
    @apply inline-flex items-center gap-2 rounded-control bg-white/90 px-2.5 py-1.5 text-[13px] font-medium text-ink shadow-chip ring-1 ring-line backdrop-blur-md;
  }

  .field-section {
    @apply mt-6 text-[13px] font-semibold text-ink-muted;
  }

  .field-hero {
    @apply rounded-panel bg-surface p-4 shadow-panel ring-1 ring-brand/10;
  }

  .field-hero-meta {
    @apply flex items-center gap-1.5 text-[13px] text-ink-muted;
  }

  .field-hero-title {
    @apply mt-2 text-xl font-semibold text-ink;
  }

  .field-hero-label {
    @apply block text-[13px] font-medium text-ink-secondary;
  }

  .field-hero-input {
    @apply mt-1 min-h-11 w-full rounded-card border border-line bg-surface px-3 py-3 text-base text-ink;
  }

  .field-hero-button {
    @apply block w-full rounded-card bg-brand py-3.5 text-center text-base font-semibold text-white shadow-sheen transition-colors hover:bg-brand-hover;
  }

  .section-title {
    @apply text-[15px] font-semibold tracking-[-0.01em] text-ink;
  }

  .section-meta {
    @apply text-[13px] text-ink-muted;
  }

  .pill-link {
    @apply inline-flex h-8 items-center gap-1.5 rounded-control px-2.5 text-[13px] font-medium text-ink-secondary transition-colors duration-150 hover:bg-surface-sunken hover:text-ink;
  }
}

@layer utilities {
  .tabular {
    font-family: "Number Separators", theme("fontFamily.sans");
    font-variant-numeric: tabular-nums;
  }
}

.board-hover {
  background-color: #ecedf7 !important;
  box-shadow: 0 0 0 3px #30358c, 0 8px 24px rgb(48 53 140 / 0.18) !important;
  transform: translateY(-2px);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

[data-board-target~="dock"] .board-hover {
  background-color: #ffffff !important;
  box-shadow: none !important;
  color: theme("colors.ink.DEFAULT");
  transform: none;
  transition: none;
}

@keyframes board-flash {
  from { background-color: #ecedf7; box-shadow: inset 3px 0 0 #30358c; }
  to { background-color: transparent; box-shadow: inset 3px 0 0 transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-board-flash] { animation: board-flash 2.4s ease-out 1; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-flash] { animation: board-flash 2.4s ease-out 1; }
}
