/* ════════════════════════════════════════════════════════════════════════════
   site-theme.css
   Drop-in theme additions for the Molecular Biology Toolbox.
   Place in: /assets/css/site-theme.css
   Load AFTER bootstrap.min.css, site.css and soft.css.
   ════════════════════════════════════════════════════════════════════════════ */


/* ───── 1. PALETTE ─────────────────────────────────────────────────────────
   One academic-blue accent. Replaces the muddy bg-secondary hero and ties
   navbar / hero / btn-primary / focus rings / links into one system.        */
:root {
  --bs-primary:               #1d4e7a;
  --bs-primary-rgb:           29, 78, 122;
  --bs-primary-text-emphasis: #143654;
  --bs-primary-bg-subtle:     #e6eef5;
  --bs-primary-border-subtle: #bcd0e1;

  --bs-link-color:            #1d4e7a;
  --bs-link-color-rgb:        29, 78, 122;
  --bs-link-hover-color:      #143654;
  --bs-link-hover-color-rgb:  20, 54, 84;
}

.btn-primary {
  --bs-btn-bg:                 #1d4e7a;
  --bs-btn-border-color:       #1d4e7a;
  --bs-btn-hover-bg:           #163e62;
  --bs-btn-hover-border-color: #143654;
  --bs-btn-active-bg:          #122e4a;
  --bs-btn-active-border-color:#122e4a;
  --bs-btn-disabled-bg:        #4a6f8e;
  --bs-btn-disabled-border-color:#4a6f8e;
}


/* ───── 2. NAVBAR ──────────────────────────────────────────────────────────  */
.navbar.bg-dark { background-color: #0f2030 !important; }
.navbar-brand   { letter-spacing: 0.01em; }


/* ───── 3. HERO ────────────────────────────────────────────────────────────
   Apply by adding class `page-hero` to the <header>.                        */
.page-hero {
  background: linear-gradient(180deg, #1d4e7a 0%, #18406a 100%);
  color: #fff;
  border-bottom: 2px solid #0e2c47;
}
.page-hero h1, .page-hero .h3 { color: #fff; }
.page-hero .lead-sub          { color: rgba(255, 255, 255, 0.78); }
.page-hero a                  { color: #fff; }
.page-hero .alert-link        { color: #fff; text-decoration: underline; }
.page-hero .btn-outline-light { border-color: rgba(255, 255, 255, 0.55); }
.page-hero .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}


/* ───── 4. SECTION CARDS ───────────────────────────────────────────────────  */
.section-card {
  background-color: #fff;
  border: 1px solid var(--bs-border-color);
  border-left: 3px solid var(--bs-primary-border-subtle);
  border-radius: 0.5rem;
}
.section-card > .card-header {
  background-color: #fbfcfd;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
  padding: 0.5rem 1rem;
}
.section-card > .card-header i { color: var(--bs-primary); }
.section-card.accent { border-left-color: var(--bs-primary); }


/* ───── 5. TABS + TEXTAREA SURFACE ────────────────────────────────────────  */
.tab-surface {
  border: 1px solid var(--bs-border-color);
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  background-color: #fff;
}
.tab-surface .tab-pane > textarea {
  border: 0;
  outline: 0;
  width: 100%;
  height: 320px;
  padding: 0.75rem 1rem;
  resize: vertical;
  font-family: var(--bs-font-monospace);
  font-size: 0.875rem;
  background: transparent;
  display: block;
}
.tab-surface .tab-pane > textarea:focus {
  box-shadow: inset 0 0 0 2px rgba(var(--bs-primary-rgb), 0.4);
}
.tab-surface .tab-pane.is-report > textarea {
  white-space: pre;
  overflow: auto;
}


/* ───── 6. ACTION BAR (sticky) ─────────────────────────────────────────────  */
.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #f8f9fa;
  border: 1px solid var(--bs-border-color);
  border-top: 0;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}


/* ───── 7. UTILITY WIDTHS ──────────────────────────────────────────────────  */
.w-num      { width: 100px; }
.w-input-sm { width: 120px; }
.w-species  { width: 160px; }
.w-input-md { width: 280px; }


/* ───── 8. SECTION SUBTITLE ────────────────────────────────────────────────  */
.section-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
}


/* ───── 9. FOOTER ──────────────────────────────────────────────────────────  */
footer.site-footer {
  background-color: #fff;
  border-top: 1px solid var(--bs-border-color);
}


/* ───── 10. FOCUS RING ─────────────────────────────────────────────────────  */
.btn:focus-visible,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}


/* ───── 11. CODE / KBD POLISH ──────────────────────────────────────────────  */
code {
  background-color: rgba(var(--bs-primary-rgb), 0.06);
  color: var(--bs-primary-text-emphasis);
  padding: 0.05em 0.35em;
  border-radius: 0.25rem;
  font-size: 0.875em;
}
kbd {
  background-color: #2a3340;
  border-radius: 0.25rem;
  font-size: 0.8em;
}


/* ───── 12. INDEX / LANDING TOOL CARD ──────────────────────────────────────  */
.tool-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--bs-primary-border-subtle);
  box-shadow: 0 6px 16px rgba(15, 32, 48, 0.08) !important;
}
.icon-plate {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  border-radius: 0.5rem;
  flex-shrink: 0;
}
.icon-plate i { font-size: 1.4rem; line-height: 1; }

/* Semantic colour variants — colour conveys what TYPE of operation the tool performs, not its grid section. Hues chosen to be muted/academic. */
.icon-plate.design   { background-color: #e6eef5; color: #1d4e7a; } /* blue   — primer/assay design          */
.icon-plate.detect   { background-color: #d9eceb; color: #0d5d56; } /* teal   — genotyping / discrimination */
.icon-plate.virtual  { background-color: #e8e2f0; color: #4a338a; } /* violet — in silico computation        */
.icon-plate.analyze  { background-color: #f4e8d0; color: #7a4d10; } /* amber  — oligo property analysis      */
.icon-plate.genome   { background-color: #dde7d6; color: #365d34; } /* green  — genome / sequence scale      */
.icon-plate.compute  { background-color: #f2dde0; color: #84334a; } /* rose   — lab math / calculators       */


/* ───── 13. WORKFLOW STEP BADGES (genotyping landing) ──────────────────────  */
.step-num {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bs-primary);
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}
