/* SpringUp Ticket to Work Theme */
:root {
  --primary-blue: #0066cc;
  --primary-blue-dark: #004999;
  --secondary-green: #00a651;
  --secondary-green-dark: #007a3d;
  --accent-orange: #ff6b35;
  --light-bg: #f8f9fa;
  --text-dark: #212529;
  --border-color: #dee2e6;
}

/* Make radio/checkbox inputs more visible */
.form-check-input[type="radio"],
.form-check-input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  border: 2px solid #555;
  accent-color: var(--primary-blue);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-blue);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

/* Header Styling */
.navbar {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 600;
  color: white !important;
  font-size: 1.3rem;
}

.navbar-light .navbar-nav .nav-link {
  color: rgba(255,255,255,0.9) !important;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: white !important;
}

/* Logo Section */
.logo-section {
  background: white;
  padding: 20px 0;
  border-bottom: 3px solid var(--secondary-green);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ttw-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.ttw-logo {
  max-height: 70px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.springup-logo {
  max-height: 70px;
  max-width: 600px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-divider {
  width: 3px;
  height: 70px;
  background: #cccccc;
  flex-shrink: 0;
  border-radius: 2px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-green) 100%);
  color: white;
  padding: 20px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

.hero .lead {
  font-size: 1rem;
  margin-bottom: 0;
}

/* Cards */
.section-card {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  margin-bottom: 20px;
}

.card {
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* List Group Items */
.list-group-item {
  border-left: 4px solid transparent;
  transition: all 0.2s;
}

.list-group-item:hover {
  border-left-color: var(--primary-blue);
  background-color: var(--light-bg);
  transform: translateX(5px);
}

/* Buttons */
.btn-primary {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.btn-primary:hover {
  background: var(--primary-blue-dark);
  border-color: var(--primary-blue-dark);
}

.btn-success {
  background: var(--secondary-green);
  border-color: var(--secondary-green);
}

.btn-success:hover {
  background: var(--secondary-green-dark);
  border-color: var(--secondary-green-dark);
}

/* Badges */
.badge {
  padding: 6px 12px;
  font-weight: 500;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: white;
  padding: 15px 0;
  margin-top: 0;
  flex-shrink: 0;
  width: 100%;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.footer p {
  color: white;
  margin-bottom: 5px;
}

.footer .small {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
}

.footer .text-muted {
  color: rgba(255,255,255,0.7) !important;
}

.footer a {
  color: white;
  text-decoration: underline;
  font-weight: 500;
}

.footer a:hover {
  color: var(--secondary-green);
  text-decoration: underline;
}

/* Alert Styling */
.alert-info {
  border-left: 4px solid var(--primary-blue);
}

.alert-success {
  border-left: 4px solid var(--secondary-green);
}

.alert-warning {
  border-left: 4px solid var(--accent-orange);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-blue);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* Responsive Logo */
@media (max-width: 768px) {
  .ttw-logo {
    max-height: 50px;
    max-width: 150px;
  }

  .springup-logo {
    max-height: 50px;
    max-width: 90%;
  }

  .logo-divider {
    display: none;
  }

  .logo-section {
    padding: 15px 0;
  }

  .ttw-logo-container {
    gap: 20px;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Quiz / knowledge-test options (single = radio, multi = checkbox) =====
   Shared by lesson quizzes (.quiz-q) and the final assessment (.kt-q).
   The whole row (.q-opt) is clickable; .q-glyph is a circle (single) or square
   (multi). data-mode lives on the question container. */
.q-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.q-opt:hover { border-color: #adb5bd; background: #f8f9fa; }
.q-opt:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(13, 110, 253, .35); }
.q-glyph {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 2px solid #adb5bd;
    background: #fff;
    position: relative;
}
.q-opt .q-letter {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .375rem;
    background: #f1f3f5;
    color: #212529;
    font-weight: 600;
    font-size: .85rem;
}
.q-opt .q-text { flex: 1 1 auto; }
[data-mode="single"] .q-glyph { border-radius: 50%; }
[data-mode="multi"] .q-glyph { border-radius: 5px; }
/* selected */
.q-opt.is-selected { border: 2px solid #0d6efd; background: #e7f1ff; padding: 11px 13px; }
.q-opt.is-selected .q-glyph { border-color: #0d6efd; background: #0d6efd; }
.q-opt.is-selected .q-letter { background: #fff; color: #0d6efd; }
/* revealed correctness */
.q-opt.is-correct { border: 2px solid #198754; background: #d1e7dd; padding: 11px 13px; }
.q-opt.is-correct .q-glyph { border-color: #198754; background: #198754; }
.q-opt.is-correct .q-letter { background: #fff; color: #198754; }
.q-opt.is-wrong { border: 2px solid #dc3545; background: #f8d7da; padding: 11px 13px; }
.q-opt.is-wrong .q-glyph { border-color: #dc3545; background: #dc3545; }
.q-opt.is-wrong .q-letter { background: #fff; color: #dc3545; }
/* inner mark (dot for single, check for multi); shown on any active state */
.q-glyph::after { content: ""; position: absolute; display: none; box-sizing: border-box; }
.q-opt.is-selected .q-glyph::after,
.q-opt.is-correct .q-glyph::after,
.q-opt.is-wrong .q-glyph::after { display: block; }
[data-mode="single"] .q-opt.is-selected .q-glyph::after,
[data-mode="single"] .q-opt.is-correct .q-glyph::after,
[data-mode="single"] .q-opt.is-wrong .q-glyph::after {
    width: 8px; height: 8px; border-radius: 50%; background: #fff;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
[data-mode="multi"] .q-opt.is-selected .q-glyph::after,
[data-mode="multi"] .q-opt.is-correct .q-glyph::after,
[data-mode="multi"] .q-opt.is-wrong .q-glyph::after {
    width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
    top: 2px; left: 6px; transform: rotate(45deg);
}
/* question-type pill */
.q-pill {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.q-pill--single { background: #cfe2ff; color: #084298; }
.q-pill--multi { background: #e2e3e5; color: #41464b; }
