/**
 * Portal-wide styles — brand variable, utilities, page chrome, mobile toolbar, footer
 * Sidebar-specific styles live in sidebar.css
 */

/* ── Brand colour ─────────────────────────────────────────────────── */
:root {
  --portal-accent: #c5050c;
}

.portal-accent             { color: var(--portal-accent); }

/* Amber outline button — matches the #d97706 site warning colour */
.btn-outline-amber {
  color: #d97706;
  border-color: #d97706;
  background-color: transparent;
}
.btn-outline-amber:hover,
.btn-outline-amber:active,
.btn-outline-amber.active,
.btn-outline-amber:focus-visible {
  color: #fff;
  background-color: #d97706;
  border-color: #d97706;
}
.btn-outline-amber:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(217, 119, 6, 0.5);
}
.portal-accent-bg          { background-color: var(--portal-accent); }
.portal-accent-border-left { border-left: 4px solid var(--portal-accent); }

/* ── Header / page divider ────────────────────────────────────────── */
/* Separator between the UW branding header and page content (desktop only) */
.header-page-divider {
  margin: 0;
  border: 0;
  border-top: 1px solid #dee2e6;
}

/* ── Mobile portal toolbar ────────────────────────────────────────── */
.portal-mobile-toolbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background-color: var(--portal-accent);
  z-index: 200;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.portal-mobile-toggle {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.portal-mobile-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.portal-mobile-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.portal-mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.portal-mobile-brand:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.85;
}

.portal-mobile-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Compact footer ───────────────────────────────────────────────── */
.portal-footer-compact {
  padding: 12px 24px 16px !important;
}

.portal-footer-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-footer-logo {
  flex-shrink: 0;
  align-self: center;
}

.portal-footer-crest {
  display: block;
  width: 120px;
  height: auto;
  fill: #fff;
}

.portal-footer-body {
  flex: 1;
  min-width: 0;
}

.portal-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 16px;
  margin-bottom: 6px;
}

.portal-footer-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13px;
}

.portal-footer-sep {
  opacity: 0.5;
}

.portal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
}

.portal-footer-copyright {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
}

/* ── Mobile overrides ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Prevent background scroll when sidebar overlay is open */
  body.sidebar-open {
    overflow: hidden;
  }

  /* Reserve space for the fixed portal toolbar */
  body {
    padding-top: 48px;
  }

  /* Branding header moves into the mobile toolbar; hide it to save space */
  #branding,
  .header-page-divider {
    display: none;
  }

  /* Show the portal toolbar on mobile */
  .portal-mobile-toolbar {
    display: flex;
  }

  /* Footer responsive */
  .portal-footer-layout {
    align-items: center;
  }

  .portal-footer-crest {
    width: 80px;
  }

  .portal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
