/* ==========================================================================
   Base layout (Bootstrap 5)
   - Sticky footer via flexbox (no absolute positioning hacks)
   - Account for fixed-top navbar via body padding-top
   ========================================================================== */

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* Height of fixed-top navbar (tweak if needed) */
  padding-top: 58px;

  /* Keep your existing ENVIRONMENT_COLOR inline body style working */
  margin: 0;
}

/* Wrap main page content in <main class="main-content"> ... </main> */
.main-content {
  flex: 1 0 auto;
}

:root{
  --brand-blue: #1e4696;
  --brand-blue-soft: rgba(30, 70, 150, 0.08);
  --surface-tint: rgba(30, 70, 150, 0.03);
  --border-soft: rgba(0,0,0,0.08);

  /* NEU: häufige UI-Bausteine */
  --surface: #f8f9fa;                 /* ähnlich Bootstrap bg-light */
  --text-muted: rgba(0,0,0,0.60);
  --radius: 12px;
  --shadow-soft: 0 2px 10px rgba(0,0,0,.05);

  --plansemester-accent: #caa64b;
  --plansemester-accent-strong: #9a7b23;
  --plansemester-bg: #fffdf7;
}

.page-title{
  color: var(--brand-blue);
}

.page-header-bar {
  padding-top: .75rem;
  padding-bottom: .75rem;
  margin-bottom: 1.25rem;
}

/* Footer stays at bottom if content is short */
.footer {
  flex-shrink: 0;
}

/* ==========================================================================
   Footer (kept compatible with your existing markup)
   ========================================================================== */

.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #f8f9fa; /* close to Bootstrap bg-light */
}

.footer .django-img {
  margin-top: 0; /* old BS3 tweak no longer needed; keep minimal */
}

/* ==========================================================================
   Helpers / utilities (keep)
   ========================================================================== */

.bottom-buffer {
  margin-bottom: 20px;
}

.top-buffer {
  margin-top: 20px;
}

.required-asterisk {
  font-weight: normal;
  margin-left: 2px;
}

/* ==========================================================================
   Table cell status colors (keep)
   ========================================================================== */

tr[data-status="zu_wenig"] .sws-ist-cell { background-color: red; color: white; }
tr[data-status="zwischen"] .sws-ist-cell { background-color: palegreen; }
tr[data-status="genau"] .sws-ist-cell { background-color: green; color: white; }
tr[data-status="zu_viel"] .sws-ist-cell { background-color: purple; color: white; }

/* ==========================================================================
   Legacy alert class (kept)
   - In BS5 prefer alert-danger, but keep this for existing templates
   ========================================================================== */

.alert-error {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.plansemester-switcher select {
  border: 2px solid var(--plansemester-accent);
  background-color: var(--plansemester-bg);
  color: var(--plansemester-accent-strong);
  font-weight: 600;

  border-radius: .5rem;
  padding-left: .75rem;
  padding-right: 2rem;

  transition: all .15s ease;
}

.plansemester-switcher select:hover,
.plansemester-switcher select:focus {
  border-color: var(--plansemester-accent-strong);
  box-shadow: 0 0 0 .15rem rgba(202, 166, 75, 0.18);
}

.plansemester-inline {
  color: var(--plansemester-accent-strong);
  font-weight: 600;
}

.env-dev {
    background-color: #e6fff7;
}

.env-test {
    background-color: #F8E0F1;
}
