/*
 * OHIF Viewer brand-theme overrides.
 * Applied via [data-brand] attribute set by brand-init.js.
 *
 * OHIF v3.9 ships pre-built Tailwind with a custom color palette.
 * We override the compiled utility classes using attribute selectors + !important.
 *
 * Key OHIF color tokens (defaults):
 *   primary-light   #5acce6  - active toolbar button bg, accent highlights
 *   primary-main    #0944b3  - active study-browser tab bg
 *   primary-dark    #090c29  - side-panel header, study-browser header
 *   primary-active  #348cfd  - interactive icons, toggle-on state, links
 *   secondary-dark  #041c4a  - navbar / top toolbar bg
 *   secondary-light #3a3f99  - study-browser header border
 *   customblue-40   #0E307F  - active side-panel tab icon bg
 *   aqua-pale       (light)  - some label accents
 *   actions-hover   rgba(52,140,253,0.2) - translucent hover overlay
 */

/* ================================================================== */
/* OM1 brand (dark blue)                                              */
/* ================================================================== */
[data-brand="om1"] .bg-secondary-dark {
  background-color: #002d72 !important;
}

[data-brand="om1"] .border-secondary-dark {
  border-color: #001d4d !important;
}

[data-brand="om1"] .bg-primary-dark {
  background-color: #001d4d !important;
}

[data-brand="om1"] .ohif-scrollbar {
  scrollbar-color: #3366cc #002d72;
}

/* ================================================================== */
/* Sponsor-1 / AHA brand (red)                                        */
/* ================================================================== */

/* -- Navbar & top toolbar ------------------------------------------ */
[data-brand="sponsor-1"] .bg-secondary-dark {
  background-color: #C10E21 !important;
}

[data-brand="sponsor-1"] .border-secondary-dark {
  border-color: #9D0B1B !important;
}

/* -- Side-panel / study-browser header ----------------------------- */
[data-brand="sponsor-1"] .bg-primary-dark {
  background-color: #2a0a0f !important;
}

[data-brand="sponsor-1"] .bg-secondary-light {
  background-color: #3d1118 !important;
}

/* Study-browser header border */
[data-brand="sponsor-1"] .border-secondary-light {
  border-color: #6b2030 !important;
}

/* -- Active toolbar button (bright cyan → red) --------------------- */
[data-brand="sponsor-1"] .bg-primary-light {
  background-color: #E85565 !important;
}

[data-brand="sponsor-1"] .text-primary-light {
  color: #F4C6CB !important;
}

[data-brand="sponsor-1"] .hover\:text-primary-light:hover,
[data-brand="sponsor-1"] .hover\:\!text-primary-light:hover {
  color: #E85565 !important;
}

[data-brand="sponsor-1"] .hover\:\!bg-primary-dark:hover {
  background-color: #2a0a0f !important;
}

/* -- Primary-active (bright blue → white for contrast on red bg) --- */
[data-brand="sponsor-1"] .text-primary-active,
[data-brand="sponsor-1"] .\!text-primary-active {
  color: #ffffff !important;
}

[data-brand="sponsor-1"] .bg-primary-active {
  background-color: #C10E21 !important;
}

[data-brand="sponsor-1"] .border-primary-active {
  border-color: #C10E21 !important;
}

[data-brand="sponsor-1"] .hover\:bg-primary-active:hover {
  background-color: #9D0B1B !important;
}

[data-brand="sponsor-1"] .hover\:text-primary-active:hover,
[data-brand="sponsor-1"] .hover\:\!text-primary-active:hover {
  color: #ffffff !important;
}

/* Focus / ring states */
[data-brand="sponsor-1"] .ring-primary-active {
  --tw-ring-color: #C10E21 !important;
}

[data-brand="sponsor-1"] .focus\:ring-primary-active:focus {
  --tw-ring-color: #C10E21 !important;
}

/* -- Active study-browser tab (medium blue → red) ------------------ */
[data-brand="sponsor-1"] .bg-primary-main {
  background-color: #D42535 !important;
}

[data-brand="sponsor-1"] .text-primary-main {
  color: #D42535 !important;
}

/* -- customblue-40 active side-panel tab icon ---------------------- */
[data-brand="sponsor-1"] .bg-customblue-40 {
  background-color: #7B1A28 !important;
}

/* -- Aqua-pale label accents --------------------------------------- */
[data-brand="sponsor-1"] .text-aqua-pale {
  color: #F4A0A8 !important;
}

/* -- Border accents ------------------------------------------------ */
[data-brand="sponsor-1"] .border-primary-light {
  border-color: #E85565 !important;
}

/* -- Actions (same blue as primary-active in default theme) -------- */
[data-brand="sponsor-1"] .text-actions-primary {
  color: #ffffff !important;
}

[data-brand="sponsor-1"] .bg-actions-primary {
  background-color: #C10E21 !important;
}

[data-brand="sponsor-1"] .border-actions-primary {
  border-color: #C10E21 !important;
}

/* -- Background medium (dark navy panel bg → dark red) ------------- */
[data-brand="sponsor-1"] .bg-bkg-med {
  background-color: #2a0a0f !important;
}

[data-brand="sponsor-1"] .bg-bkg-low {
  background-color: #1a0608 !important;
}

/* -- Popover & muted (CSS HSL variables → dark red) ---------------- */
[data-brand="sponsor-1"] .bg-popover {
  background-color: #2a0a0f !important;
}

[data-brand="sponsor-1"] .border-popover {
  border-color: #6b2030 !important;
}

[data-brand="sponsor-1"] .bg-muted {
  background-color: #3d1118 !important;
}

[data-brand="sponsor-1"] .text-muted-foreground {
  color: #e8b4ba !important;
}

[data-brand="sponsor-1"] .bg-accent {
  background-color: #4a1520 !important;
}

[data-brand="sponsor-1"] .border-muted {
  border-color: #6b2030 !important;
}

/* -- Text contrast on dark-red backgrounds ------------------------- */
/* OHIF uses text-common-bright (#e1e1e1), text-overlay-fg, and
   Tailwind slate-200 (rgb(226,232,240)) for muted text. On dark red
   these wash out; push to white for legibility. */
[data-brand="sponsor-1"] .bg-secondary-dark .text-common-bright,
[data-brand="sponsor-1"] .bg-secondary-dark .\!text-common-bright,
[data-brand="sponsor-1"] .bg-secondary-dark [class*="text-slate"],
[data-brand="sponsor-1"] .bg-secondary-dark [style*="226, 232, 240"] {
  color: #ffffff !important;
}

/* Navbar text that uses the default Tailwind text-white is fine, but
   common-bright / overlay on red needs boosting everywhere */
[data-brand="sponsor-1"] .text-common-bright,
[data-brand="sponsor-1"] .\!text-common-bright {
  color: #ffffff !important;
}

[data-brand="sponsor-1"] .text-overlay-fg {
  color: #ffffff !important;
}

/* -- Scrollbar tint ------------------------------------------------ */
[data-brand="sponsor-1"] .ohif-scrollbar {
  scrollbar-color: #e85565 #C10E21;
}
