/* ==========================================================================
   Intelligent Estate — shared design system add-ons (buttons, chips, etc.)

   Loaded alongside the Tailwind-compiled main.css. These are hand-written
   utility classes that bundle the common icon+text patterns used across
   marketing + portals, so individual templates don't have to reassemble
   the same six utilities every time (and get them subtly wrong).

   Reference tokens live in colors_and_type.css from the design bundle.
   ========================================================================== */

/* --------- Buttons --------------------------------------------------------
   .btn     — base. Handles inline-flex + centered alignment + gap.
   .btn-primary / .btn-ghost / .btn-cyan — color variants.
   .btn-sm  — smaller size.

   Icon+text inside a .btn always gets 0.5rem gap automatically, so you
   never have to remember `gap-2`. Single-icon or single-text buttons are
   unaffected (flex gap only applies when there are ≥2 children).
   ----------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;                   /* 8px — matches Tailwind gap-2 */
  padding: 0.5rem 1.5rem;
  border-radius: 0.125rem;        /* 2px — design system default */
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: 0.025em;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background-color: #001b3d;     /* primary-container */
  color: #ffffff;
}
.btn-primary:hover {
  background-color: #005db5;      /* secondary */
}

.btn-ghost {
  background-color: transparent;
  color: #191c1d;                 /* on-surface */
  border: 1px solid rgba(196, 198, 207, 0.3);  /* outline-variant @ 30% */
}
.btn-ghost:hover {
  background-color: #f3f4f5;      /* surface-container-low */
}

.btn-cyan {
  background-color: #56f9f9;      /* tertiary-fixed */
  color: #002020;                 /* on-tertiary-fixed */
}
.btn-cyan:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.btn-xs {
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Ensure Material Symbols inside a button don't inherit any stray text
   transform and sit on the text baseline visually. */
.btn .material-symbols-outlined {
  font-size: 1rem;               /* 16px — matches the 14px body text */
  line-height: 1;
  flex-shrink: 0;
}

.btn-sm .material-symbols-outlined,
.btn-xs .material-symbols-outlined {
  font-size: 0.875rem;            /* 14px */
}

/* --------- Safety net ----------------------------------------------------
   Any inline-flex container with an icon inside that forgets to declare a
   gap gets 0.5rem automatically. Explicit gap-* utilities still win via
   Tailwind's specificity.
   ----------------------------------------------------------------------- */
.inline-flex.items-center:has(> .material-symbols-outlined),
button.inline-flex.items-center:has(.material-symbols-outlined),
a.inline-flex.items-center:has(.material-symbols-outlined) {
  column-gap: 0.5rem;
}
