/* Orchard minimal admin theme tweaks
   - Only change top header bar and module headings background
   - Respect Django admin light/dark theme toggle
*/

/* Light theme defaults */
:root,
:root[data-theme="light"] {
  --orch-bar-bg: linear-gradient(90deg, #2e7d32 0%, #388e3c 100%);
  /* General module heading styling (all apps) */
  --orch-h2-bg: linear-gradient(90deg, #a5d6a7 0%, #81c784 100%);
  --orch-h2-fg: #0e3a15; /* Darker green for readability */
}

/* Dark theme overrides */
:root[data-theme="dark"] {
  --orch-bar-bg: linear-gradient(90deg, #1b5e20 0%, #255d2a 100%);
  --orch-h2-bg: color-mix(in oklab, #2e7d32, black 35%);
  --orch-h2-fg: #e8f5e9;
}

/* Header bar */
#header,
.sticky #header {
  background: var(--orch-bar-bg) !important;
  color: #fff !important;
}
#header a,
#header a:link,
#header a:visited {
  color: #fff !important;
}
#header .branding h1,
#header .branding h1 a {
  color: #fff !important;
}

/* Module headings (app/model sections) */
.module h2,
.inline-group h2 {
  background: var(--orch-h2-bg) !important;
  color: var(--orch-h2-fg) !important;
}

/* Admin index app headings sometimes render as table caption */
.module > table > caption {
  background: var(--orch-h2-bg) !important;
  color: var(--orch-h2-fg) !important;
}

/* Ensure links inside headings inherit the darker heading color */
.module h2 a,
.inline-group h2 a,
.module > table > caption a {
  color: var(--orch-h2-fg) !important;
}

/* Narrow the list-edit input width for 'furigana' in PearVariety changelist */
body.app-pears.model-pearvariety.change-list
  .results
  td.field-furigana
  input[type="text"] {
  width: 10ch !important;
  min-width: 8ch !important;
  max-width: 12ch !important;
}

/* (Optional) app-specific overrides could go here if needed */
