/* === BASE === */
body {
  font-family: 'Inter', sans-serif;
  background: #f9fbfc;
  color: #333;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  color: #00557f;
  margin-top: 0;
}

a {
  color: #00557f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1140px;
  padding: 1rem;
  margin: 0 auto;
}

.min-vh-75 {
  min-height: 75vh;
}

/* === NAVBAR === */
.sc-navbar {
  background: #00557f;
  border: none;
  box-shadow: 0 4px 24px rgba(0, 56, 92, 0.1);
}

.bg-primary {
  background: #00557f !important; }

.text-primary{color: #00557f !important;}

.sc-nav-link {
  color: #ffffff !important;
  margin: 0 0.3rem;
  font-weight: 600;
}

.sc-nav-link:hover,
.sc-nav-link:focus {
  background: #ffffff !important;
  color: #00557f !important;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.nav-badge {
  background: #ffe688;
  color: #de8701;
  border-radius: 999px;
  padding: 0 0.5em;
  font-size: 0.9rem;
  margin-left: 0.3em;
  font-weight: 600;
}

/* === HERO === */
.hero-landing {
  text-align: center;
  padding: 0rem 1rem;
}

.hero-landing h1 {
  font-size: 3rem;
  font-weight: 700;
}

.hero-landing p {
  font-size: 1.2rem;
  max-width: 40rem;
  margin: 0.5rem auto 2rem auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-buttons .btn {
  border-radius: 999px;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  min-width: 200px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hero-badges .badge {
  border-radius: 999px;
  padding: 0.4em 1.2em;
  font-weight: 600;
  font-size: 0.85rem;
}

.hero-illustration {
  margin-top: 2rem;
  max-width: 100%;
  border-radius: 1rem;
}

@media (min-width: 768px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* === BUTTONS === */
.btn {
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-primary {
  background: #00557f;
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: #003f61;
}

.btn-outline-primary {
  background: #fff;
  border: 2px solid #00557f;
  color: #00557f;
}

.btn-outline-primary:hover {
  background: #00557f;
  color: #fff;
}

.btn-success, .btn-warning {
  border: none;
}

.btn-success:hover {
  background: #198754;
}

.btn-warning {
  background: #ffc107;
  color: #333;
}

.btn-warning:hover {
  background: #e0a800;
}

/* === CARDS === */
.card {
  border: none;
  border-radius: 1.5rem;
  background: #fff;
}

.feature-card,
.stats-box,
.testimonial-card {
  transition: box-shadow 0.18s, transform 0.12s;
}

.feature-card:hover,
.stats-box:hover,
.testimonial-card:hover {
  box-shadow: 0 6px 24px rgba(0, 85, 127, 0.12);
  transform: translateY(-2px) scale(1.015);
}

.stats-box {
  text-align: center;
}

/* === FORM === */
.form-control {
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

.form-label {
  font-weight: 600;
}

/* === Pill styling === */
#diagnosesSelected li,
#medicationsSelected li {
  display: inline-block;
  margin: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: #f1f5f8;
  border-radius: 999px;
  max-width: 100%;
  position: relative;
}

/* === Close button neat === */
#diagnosesSelected li button,
#medicationsSelected li button {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  background: #dc3545;
  border: none;
  border-radius: 50%;
  color: #fff;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

#diagnosesSelected li button:hover,
#medicationsSelected li button:hover {
  background: #bb2d3b;
}

/* Ensure enough right padding so text doesn't clash with button */
#diagnosesSelected li,
#medicationsSelected li {
  padding-right: 2rem; /* adjust for button overlap */
}

.awesomplete {width: 100% !important;}

ul.awesomplete {
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

ul.awesomplete li {
  padding: 0.5rem 1rem;
  cursor: pointer;
}

ul.awesomplete li[aria-selected="true"] {
  background: #00557f;
  color: #fff;
}

.awesomplete mark {padding: 0!important; background-color: none !important; background: none !important;}
mark {padding: 0!important; background-color: none !important; background: none !important;}

.modal-content {
  border-radius: 1.5rem;
}

/* === NHS-STYLE MODAL POLISH === */
.modal-content {
  border-radius: 0.75rem;
}

.modal-header.bg-primary {
  background-color: #005eb8 !important; /* NHS Blue */
}

.modal-header .modal-title {
  font-weight: 600;
}

.list-group-item {
  border: none;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.list-group-item:last-child {
  border-bottom: none;
}

.modal-footer.bg-light {
  background-color: #f0f4f5 !important;
}

.btn-outline-primary {
  border-color: #005eb8;
  color: #005eb8;
}

.btn-outline-primary:hover {
  background-color: #005eb8;
  color: #fff;
}

.modal-body h6 {
  font-weight: 600;
}

.modal-body p {
  font-size: 0.95rem;
}

.btn-close {
  box-shadow: none !important;
}

/* === CTA === */
.cta-section {
  background: #00557f;
  text-align: center;
  padding: 4rem 1rem;
}

.cta-section h2,
.cta-section p {
  color: #fff;
}

/* === FOOTER === */
.sc-footer {
  background: #00557f;
  color: #e7f3fb;
  padding: 0 1rem; }

.sc-footer-logo {
  height: 42px;
}

.sc-footer-link {
  color: #eaf6ff !important;
  font-weight: 500;
  opacity: 0.85;
}

.sc-footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.sc-footer-hr {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2rem 0;
}

.sc-footer-strip {
  font-size: 0.9rem;
  opacity: 0.9;
}

.risk-diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.bi {
  vertical-align: middle;
}

footer {
  background: #00557f;
  color: #fff;
  width: 100%;
}

footer a {
  color: #fff;
}

footer a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 767.98px) {
  .container {
    padding: 0.4rem !important;
  }

  .btn {
    width: 100%;
  }

  .card {
    border-radius: 1rem;
  }

  .modal-content {
    border-radius: 1rem;
  }
}

/* === Fix mobile safe area for sticky header === */
header {
  padding-top: env(safe-area-inset-top);
}

body {
  padding-top: 0 !important;
}

.form-select {
  border-radius: 999px !important;
  padding: 0.75rem 1.25rem !important;
  font-size: 1rem;
  background-position: right 1rem center;
  background-size: 16px 12px;
}

.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(0,85,127,0.25);
  border-color: #00557f;
}

/* Choices.js modern look - NHS rounded style */
.choices__inner {
  border-radius: 1.5rem !important;
  min-height: 50px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.choices__list--multiple .choices__item {
  background-color: #00557f;
  border-radius: 1rem;
  color: #fff;
  padding: 0.35rem 0.75rem;
  margin-right: 0.25rem;
}

@media (min-width: 992px) {
  .table-responsive {
    overflow-x: visible !important;
  }
}

/* Make Choices.js input big enough to prevent iOS zoom */
.choices__inner,
.choices__input,
.choices__list--multiple .choices__item {
  font-size: 16px !important;
}

select.form-select {
  font-size: 16px !important;
}

.forecast-cell .factor-icons {
  margin-top: 0.4em;
  display: flex;
  gap: 0.3em;
}

.factor-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5; /* increased for bolder lines */
}

.modal-body .card {
  border-radius: 0.5rem;
}

.modal-body .card h6 {
  font-weight: 600;
}

.modal-body .badge {
  font-size: 0.8rem;
}

.modal-dialog.modal-lg {
  max-width: 800px;
}

.card-header {
  border-bottom: 1px solid #dee2e6;
}

.card-header h3 {
  font-size: 1.35rem;
}

.card-header p {
  font-size: 0.92rem;
  line-height: 1.4;
}

.card-header i {
  font-size: 1.4rem;
  vertical-align: middle;
}