.blink {
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

html, body, * {
  font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

h1, h2, h3, h4, h5, h6, .serif {
  font-family: "Playfair Display", serif;
}

:root {
  --background: #F2EBE0;        /* proper beige, aged paper */
--foreground: #2C2825;

--card: #F7F2EA;              /* card sits above background, still warm */
--card-foreground: #2C2825;

--primary: #4A9B8E;           /* unchanged — will read lighter now */
--primary-foreground: #F7F2EA;

--secondary: #EAE0D2;         /* deeper beige for secondary surfaces */
--secondary-foreground: #4A9B8E;

--muted: #E5D9C8;             /* noticeably warm, almost tan */
--muted-foreground: #8A7F72;

--faint: #F2EBE0;

--accent: #EAE0D2;
--accent-foreground: #2C2825;

--danger: #C0453F;
--danger-foreground: #F7F2EA;

--success: #4A9B8E;
--success-foreground: #F7F2EA;

--warning: #C47B3A;
--warning-foreground: #F7F2EA;

--border: #D6CBBA;            /* tan border, clearly visible on beige */
--input: #D6CBBA;
--ring: #4A9B8E;
}

button {
  &:has(svg:only-child) {
    display: flex;
    align-items: center;
    gap: var(--space-1);
  }

  &[data-sidebar-toggle] {
    padding: var(--space-1);
  }
}

a:has(svg:only-child) {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ── Bottom Tab Bar (mobile only) ── */
:root {
  --tab-bar-height: 3.5rem;
}

.tab-bar {
  display: none;
}

@media (max-width: 768px) {
  /* Hide sidebar toggle on mobile — tab bar replaces it */
  [data-sidebar-toggle] {
    display: none !important;
  }

  .tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--tab-bar-height);
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -1px 4px rgba(44, 40, 37, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* body:has(.chat-composer input[type="text"]:focus) .tab-bar {
    display: none;
  } */

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    flex: 1;
    padding: 0.375rem 0;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    position: relative;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-item.active {
    color: var(--primary);
  }

  .tab-dot {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    margin-bottom: 0.125rem;
  }

  .tab-item.active .tab-dot {
    background: var(--primary);
  }

  .tab-label {
    line-height: 1;
  }

  /* Reserve space at bottom for tab bar in main content */
  body:has(.tab-bar) main {
    padding-bottom: var(--tab-bar-height);
  }
}

/* ── Pill border-radius overrides ── */
:is(button, [type="submit"], [type="reset"], [type="button"], a.button):not([role="menuitem"]),
::file-selector-button,
input:not([type="checkbox"], [type="radio"], [type="range"]),
textarea,
select {
  border-radius: 9999px !important;
}

@media (min-width: 769px) {
  button[data-sidebar-toggle] {
    display: none !important;
  }
}

