/* ============================================ */
/* GHS Patient Summary - Centralized Theme     */
/* ============================================ */

:root {
  /* ------------------------------------------ */
  /* Brand Colors                               */
  /* ------------------------------------------ */
  --color-terracotta: #bc7550;
  --color-slate: #6a8081;
  --color-aqua: #00a0ad;
  --color-pale-blue: #dae6ec;
  --color-light-gray: #dddddd;
  --color-navy: #01426a;
  --color-dark-gray: #53575A;

  /* ------------------------------------------ */
  /* Semantic Tokens - Terracotta as Primary    */
  /* ------------------------------------------ */
  --color-primary: var(--color-terracotta);
  --color-primary-hover: #a86544;
  --color-primary-light: #d4917a;
  --color-secondary: var(--color-aqua);
  --color-secondary-hover: #008a96;

  /* ------------------------------------------ */
  /* Surfaces                                   */
  /* ------------------------------------------ */
  --color-surface-cool: var(--color-pale-blue);
  --color-surface-warm: #f5ebe6;
  --color-surface-alt: #f5f3f0;

  /* ------------------------------------------ */
  /* Text                                       */
  /* ------------------------------------------ */
  --color-text-primary: var(--color-navy);
  --color-text-secondary: var(--color-dark-gray);
  --color-text-muted: var(--color-slate);
  --color-text-on-primary: #ffffff;

  /* ------------------------------------------ */
  /* Borders                                    */
  /* ------------------------------------------ */
  --color-border: var(--color-light-gray);
}

/* ============================================ */
/* Utility Classes (use these in components)   */
/* ============================================ */

/* Background Colors */
.bg-brand-primary { background-color: var(--color-primary) !important; }
.bg-brand-primary-hover { background-color: var(--color-primary-hover) !important; }
.bg-brand-secondary { background-color: var(--color-secondary) !important; }
.bg-brand-slate { background-color: var(--color-slate) !important; }
.bg-brand-surface-cool { background-color: var(--color-surface-cool) !important; }
.bg-brand-surface-warm { background-color: var(--color-surface-warm) !important; }
.bg-brand-surface-alt { background-color: var(--color-surface-alt) !important; }

/* Text Colors */
.text-brand-primary { color: var(--color-primary) !important; }
.text-brand-secondary { color: var(--color-secondary) !important; }
.text-brand-slate { color: var(--color-slate) !important; }
.text-brand-navy { color: var(--color-navy) !important; }

/* Border Colors */
.border-brand-primary { border-color: var(--color-primary) !important; }
.border-brand-secondary { border-color: var(--color-secondary) !important; }

/* Hover States */
.hover\:bg-brand-primary-hover:hover { background-color: var(--color-primary-hover) !important; }
.hover\:bg-brand-surface-cool:hover { background-color: var(--color-surface-cool) !important; }
.hover\:bg-brand-primary-hover:hover { background-color: var(--color-primary-hover) !important; }
.hover\:border-brand-primary:hover { border-color: var(--color-primary) !important; }

/* Focus States */
.focus\:ring-brand-primary:focus { --tw-ring-color: var(--color-primary) !important; }

/* Gradients */
.bg-gradient-brand-primary {
  background: linear-gradient(to bottom right, var(--color-primary), var(--color-slate)) !important;
}
.bg-gradient-brand-nav {
  background: linear-gradient(to bottom, var(--color-primary), var(--color-primary-hover)) !important;
}
/* Sidebar: white tile behind the CORA logo */
.nav-logo-tile {
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}
/* Sidebar: caption under an icon button */
.nav-label {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
}
.bg-gradient-brand-surface {
  background: linear-gradient(to right, var(--color-surface-cool), var(--color-surface-warm)) !important;
}
.bg-gradient-brand-surface-light {
  background: linear-gradient(to right, var(--color-surface-cool), white) !important;
}
.bg-gradient-brand-page {
  background: linear-gradient(to bottom right, #f9fafb, var(--color-surface-cool)) !important;
}

/* Opacity variants */
.border-brand-primary\/20 { border-color: rgba(188, 117, 80, 0.2) !important; }
.border-brand-primary\/30 { border-color: rgba(188, 117, 80, 0.3) !important; }

/* Spinner border colors */
.border-t-brand-primary { border-top-color: var(--color-primary) !important; }

/* Ring colors for focus states */
.ring-brand-primary { --tw-ring-color: var(--color-primary) !important; }

/* Additional button states */
.bg-brand-primary.hover\:bg-brand-primary-hover:hover { background-color: var(--color-primary-hover) !important; }

/* Stage/Status badges */
.badge-referral { background-color: var(--color-surface-cool); color: var(--color-primary); }
.badge-care { background-color: var(--color-surface-warm); color: var(--color-secondary); }

/* Discharged-patient lookup results. Written out here because the compiled
   Tailwind in globals.css has no green/red border or red text shades. */
.lookup-match { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.lookup-no-match { background-color: #f9fafb; border: 1px solid #e5e7eb; color: #374151; }
.lookup-error { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Additional focus ring */
.focus\:ring-brand-primary:focus {
  --tw-ring-opacity: 1;
  --tw-ring-color: var(--color-primary);
}
