/* ============================================================
   AI4CI-inspired theme for School Attainment Policy Simulator
   Colour palette from https://ai4ci.ac.uk/
   ============================================================ */

/* ---- Google Font ---- */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;600;700&family=Open+Sans:wght@400;500;600&display=swap');

/* ---- Root variables ---- */
:root {
  --ai4ci-navy:    #001022;
  --ai4ci-blue:    #0070ba;
  --ai4ci-dark:    #1C1B3A;
  --ai4ci-pink:    #E20164;
  --ai4ci-light:   #f4f7fa;
  --ai4ci-border:  rgba(0, 112, 186, 0.15);
}

/* ---- Global typography ---- */
body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #333333;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
  font-family: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  color: var(--ai4ci-dark);
}

/* ---- Navbar ---- */
.navbar {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 16, 34, 0.25);
}

.navbar .navbar-brand {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff !important;
}

.navbar-nav .nav-link {
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

.navbar-nav .nav-link:hover {
  color: var(--ai4ci-pink) !important;
  background-color: rgba(255, 255, 255, 0.08);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-item.active .nav-link {
  color: #ffffff !important;
  background-color: rgba(0, 112, 186, 0.35);
}

/* ---- Outcome selector bar ---- */
.bg-light.border-bottom {
  background-color: var(--ai4ci-light) !important;
  border-bottom-color: var(--ai4ci-border) !important;
}

.shiny-input-radiogroup label.radio-inline {
  margin-right: 1rem;
  font-weight: 500;
}

/* ---- Hero banner (About page) ---- */
.ai4ci-hero {
  background-image: url('ai4ci_banner.png');
  background-size: cover;
  background-position: center bottom 40%;
  background-color: var(--ai4ci-navy);
  width: 100%;
  min-height: 280px;
  position: relative;
}

.ai4ci-hero-overlay {
  background: rgba(0, 16, 34, 0.6);
  width: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.ai4ci-hero h1 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ai4ci-hero-subtitle {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.ai4ci-hero-credit {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.ai4ci-hero-credit a {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai4ci-hero-credit a:hover {
  color: var(--ai4ci-pink) !important;
}

.ai4ci-hero-logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 0.5rem;
}

.ai4ci-hero-logos img {
  opacity: 0.9;
  transition: opacity 0.2s;
}

.ai4ci-hero-logos img:hover {
  opacity: 1;
}

/* ---- Cards ---- */
.card {
  margin-bottom: 1rem;
  border: 1px solid var(--ai4ci-border);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 16, 34, 0.06);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 3px 12px rgba(0, 16, 34, 0.10);
}

.card-header {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  font-size: 0.9rem;
  background-color: var(--ai4ci-light);
  border-bottom: 1px solid var(--ai4ci-border);
}

.card h5 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  color: var(--ai4ci-dark);
  font-size: 1.05rem;
}

.card h5 .fa, .card h5 .fas, .card h5 .far {
  color: var(--ai4ci-blue);
}

/* ---- About page tab guide table ---- */
.table th {
  background-color: var(--ai4ci-navy);
  color: #ffffff;
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  font-size: 0.85rem;
}

.about-table .table td:first-child {
  white-space: nowrap;
  font-weight: 600;
  color: var(--ai4ci-dark);
}

/* ---- Buttons ---- */
.btn-primary {
  background-color: var(--ai4ci-blue);
  border-color: var(--ai4ci-blue);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #005a96;
  border-color: #005a96;
}

.btn-danger,
.btn-outline-danger {
  --bs-btn-bg: var(--ai4ci-pink);
  --bs-btn-border-color: var(--ai4ci-pink);
}

/* ---- Slider accents ---- */
.irs--shiny .irs-bar {
  background: var(--ai4ci-blue);
  border-top: 1px solid var(--ai4ci-blue);
  border-bottom: 1px solid var(--ai4ci-blue);
}

.irs--shiny .irs-handle {
  border: 2px solid var(--ai4ci-blue);
}

.irs--shiny .irs-single {
  background-color: var(--ai4ci-blue);
}

/* ---- DataTables ---- */
.dataTables_wrapper {
  font-size: 0.85rem;
}

table.dataTable thead th {
  background-color: var(--ai4ci-light);
  border-bottom: 2px solid var(--ai4ci-blue);
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ai4ci-dark);
}

/* ---- Leaflet popups ---- */
.leaflet-popup-content {
  font-size: 0.85rem;
  line-height: 1.4;
  font-family: 'Open Sans', sans-serif;
}

/* ---- Sidebar styling ---- */
.sidebar .card {
  background-color: var(--ai4ci-light);
}

/* ---- Plotly styling ---- */
.plotly .modebar-btn:hover {
  color: var(--ai4ci-blue) !important;
}

/* ---- Links ---- */
a {
  transition: color 0.2s;
}

/* ---- Footer data note ---- */
.text-muted.text-center.small {
  border-top: 1px solid var(--ai4ci-border);
  padding-top: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar {
    width: 100% !important;
  }

  .ai4ci-hero {
    min-height: 200px;
  }

  .ai4ci-hero-overlay {
    min-height: 200px;
    padding: 2rem 1rem 1.5rem;
  }

  .ai4ci-hero h1 {
    font-size: 1.5rem;
  }

  .ai4ci-hero-subtitle {
    font-size: 1rem;
  }

  .ai4ci-hero-logos {
    gap: 1rem;
  }

  .ai4ci-hero-logos img {
    height: 35px !important;
  }
}
