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 #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.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;
}

/* ============================================
   Score Selector Styles for Assessment
   ============================================ */

/* Hide the default radio button */
.score-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Style the score label as a circle */
.score-option .score-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 600;
  color: #495057;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  -webkit-user-select: none;
  user-select: none;
}

/* Hover state */
.score-option .score-label:hover {
  border-color: #0d6efd;
  background-color: #f8f9fa;
  transform: scale(1.05);
}

/* Focus state for accessibility */
.score-option input[type="radio"]:focus + .score-label {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Selected state for Ability Score (Blue) */
.score-option input[name="AbilityScore"]:checked + .score-label {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

/* Selected state for Passion Score (Red/Pink) */
.score-option input[name="PassionScore"]:checked + .score-label {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Score selector container */
.score-selector {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Score labels below the selectors */
.score-labels {
  font-size: 0.875rem;
}

/* Question card styling */
.question-card {
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

.question-card .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 12px 12px 0 0;
}

/* Scoring reference card */
.card[data-bs-toggle="collapse"] .card-header {
  cursor: pointer;
}

.card[data-bs-toggle="collapse"] .card-header:hover {
  background-color: #e9ecef;
}

/* Assessment progress bar styling */
.assessment-header .progress {
  border-radius: 4px;
  overflow: hidden;
}

.assessment-header .progress-bar {
  transition: width 0.3s ease-in-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .score-option .score-label {
    border-width: 3px;
  }

  .score-option input[name="AbilityScore"]:checked + .score-label,
  .score-option input[name="PassionScore"]:checked + .score-label {
    border-color: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .score-option .score-label {
    transition: none;
  }

  .score-option input[type="radio"]:checked + .score-label {
    transform: none;
  }
}

/* ============================================
   BARS Clickable Styles
   ============================================ */

/* Make BARS accordion items clickable */
.bars-clickable {
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.bars-clickable:hover {
  background-color: rgba(13, 110, 253, 0.05);
  transform: translateX(4px);
}

.bars-clickable:hover .accordion-button {
  background-color: rgba(13, 110, 253, 0.08);
}

/* Click hint visibility on hover */
.bars-click-hint {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.bars-clickable:hover .bars-click-hint {
  opacity: 1;
  color: #0d6efd !important;
}

/* Selected BARS item */
.bars-item-selected {
  background-color: rgba(13, 110, 253, 0.1);
  box-shadow: inset 4px 0 0 #0d6efd;
}

.bars-item-selected .accordion-button {
  background-color: rgba(13, 110, 253, 0.12);
  font-weight: 600;
}

/* Flash highlight animation when BARS is clicked */
.flash-highlight {
  animation: flashHighlight 0.5s ease-in-out;
}

@keyframes flashHighlight {
  0% { background-color: transparent; }
  50% { background-color: rgba(13, 110, 253, 0.3); }
  100% { background-color: transparent; }
}

/* BARS selected highlight on score label */
.bars-selected-highlight {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5) !important;
}

/* Passion-specific BARS hover (use warm color) */
.bars-clickable[data-score-type="passion"]:hover {
  background-color: rgba(220, 53, 69, 0.05);
}

.bars-clickable[data-score-type="passion"]:hover .accordion-button {
  background-color: rgba(220, 53, 69, 0.08);
}

.bars-clickable[data-score-type="passion"]:hover .bars-click-hint {
  color: #dc3545 !important;
}

.bars-clickable[data-score-type="passion"].bars-item-selected {
  background-color: rgba(220, 53, 69, 0.1);
  box-shadow: inset 4px 0 0 #dc3545;
}

.bars-clickable[data-score-type="passion"].bars-item-selected .accordion-button {
  background-color: rgba(220, 53, 69, 0.12);
}

/* ============================================
   Enhanced Navigation Bar Styles
   ============================================ */

/* Override default bg-primary for better visibility */
.navbar.bg-primary {
  background: linear-gradient(135deg, #1a4b8c 0%, #0d3a6e 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Navbar brand styling */
.navbar-brand {
  font-weight: 600;
  font-size: 1.25rem;
  color: #ffffff !important;
  letter-spacing: 0.5px;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: #e0f0ff !important;
}

.navbar-brand i {
  font-size: 1.5rem;
  color: #66b3ff;
}

/* Navigation links - increased visibility */
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  padding: 0.6rem 1rem;
  margin: 0 0.15rem;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

/* Expanded menu (wide screens). An admin sees nine menu items, and the accessibility
   toolbar can enlarge text, so the menu cannot be relied on to fit one row. Let it wrap
   onto a second row rather than push the page wider than the window; each item stays on
   one line. */
@media (min-width: 1200px) {
  .navbar-expand-xl .navbar-collapse,
  .navbar-expand-xl .navbar-nav {
    flex-wrap: wrap;
  }

  .navbar-dark .navbar-nav .nav-link {
    white-space: nowrap;
    padding: 0.5rem 0.65rem;
    margin: 0 0.05rem;
  }
}

/* Signed-in greeting: long email addresses are cut short; the full name stays in the
   link's accessible name and tooltip. */
.navbar-user-name {
  display: inline-block;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15);
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.2);
}

/* Icons in nav links */
.navbar-nav .nav-link i {
  color: #8cc5ff;
  font-size: 1.1rem;
}

.navbar-nav .nav-link:hover i,
.navbar-nav .nav-link:focus i {
  color: #ffffff;
}

/* Dropdown menus */
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.navbar .dropdown-item {
  padding: 0.6rem 1.25rem;
  font-weight: 500;
  color: #333;
  transition: all 0.15s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: #f0f7ff;
  color: #0d3a6e;
}

.navbar .dropdown-item i {
  color: #1a4b8c;
  width: 1.25rem;
}

.navbar .dropdown-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  padding: 0.5rem 1.25rem;
}

.navbar .dropdown-divider {
  margin: 0.35rem 0;
  border-color: #e9ecef;
}

/* Navbar toggler for mobile */
.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0.4rem 0.65rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Login partial styling */
.navbar-dark .nav-link.text-white,
.navbar-dark .navbar-text {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
  .navbar.bg-primary {
    background: #000 !important;
    border-bottom: 3px solid #fff;
  }

  .navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
    border: 1px solid transparent;
  }

  .navbar-dark .navbar-nav .nav-link:hover,
  .navbar-dark .navbar-nav .nav-link:focus {
    border-color: #ffffff;
  }

  .navbar-brand {
    color: #ffffff !important;
  }

  .navbar-brand i,
  .navbar-nav .nav-link i {
    color: #ffffff !important;
  }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: rgba(13, 58, 110, 0.98);
    padding: 1rem;
    margin-top: 0.5rem;
    border-radius: 8px;
  }

  .navbar-dark .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-dark .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }

  .navbar .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
  }

  .navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
  }

  .navbar .dropdown-item:hover,
  .navbar .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }

  .navbar .dropdown-header {
    color: rgba(255, 255, 255, 0.6);
  }

  .navbar .dropdown-item i {
    color: #8cc5ff;
  }
}
/* Guided-help marker (help.js). A small circular "?" badge, drawn in CSS so it does not
   depend on any icon webfont — it stays visible even where the CDN font is blocked. */
.dheya-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    font-size: 0.78em;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    user-select: none;
}
.dheya-help-icon:hover,
.dheya-help-icon:focus {
    background: #0a58ca;
    outline: 2px solid rgba(13, 110, 253, 0.4);
    outline-offset: 2px;
}

/* Built-in fallback tooltip (help.js), used when the Bootstrap JS bundle is unavailable. */
.dheya-tip {
    position: absolute;
    z-index: 10800;
    max-width: 300px;
    padding: 0.4rem 0.6rem;
    background: #1f2937;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.35;
    border-radius: 0.375rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    display: none;
}

/* "How to use this screen": links a portal page to the mentor-course lesson that teaches it */
.screen-help {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .85rem; font-weight: 600; color: #006898; text-decoration: none;
    border: 1px solid #B2DFF4; background: #E0F2FA; border-radius: 99px; padding: .25rem .75rem;
}
.screen-help:hover, .screen-help:focus { background: #B2DFF4; color: #003B57; }
body.high-contrast .screen-help { background: #fff; color: #0000ee !important; }

/* A validation summary with no errors renders as an empty box; hide it until there are errors. */
.validation-summary-valid { display: none !important; }
