/*
 * BC Link survey theme — customer-facing styling overrides.
 *
 * Deployed location:
 *   /home/itadmin/limesurvey/uploads/themes/survey/bclink/css/custom.css
 *   (live container path: /var/www/html/upload/themes/survey/bclink/css/custom.css)
 *
 * Loaded by the bclink theme's config.xml directive:
 *   <files><css><replace>css/custom.css</replace></css></files>
 *
 * This file is committed to the repo for recovery. If uploads/ is ever wiped
 * (catastrophic restore, manual rm), copy this back into place via SSH:
 *
 *   scp admin-overrides/bclink-survey-custom.css \
 *     itadmin@bcg-apps.internal:/tmp/c.css
 *   ssh itadmin@bcg-apps.internal \
 *     'sudo cp /tmp/c.css /home/itadmin/limesurvey/uploads/themes/survey/bclink/css/custom.css \
 *      && sudo chown www-data:www-data \
 *      /home/itadmin/limesurvey/uploads/themes/survey/bclink/css/custom.css'
 *
 * Then flushassets + restart limesurvey container.
 */

:root {
  --bs-primary: #1976D2;
  --bs-primary-rgb: 25, 118, 210;
  --bcl-primary: #1976D2;
  --bcl-primary-hover: #1565C0;
  --bcl-primary-pressed: #0d47a1;
  --bcl-text: #1a2332;
  --bcl-muted: #6b7280;
  --bcl-surface: #ffffff;
  --bcl-background: #f6f8fb;
  --bcl-border: #e3e8ef;
  --bcl-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --bcl-shadow-strong: 0 6px 24px rgba(15, 23, 42, 0.08);
  --bcl-radius: 12px;
  --bcl-radius-sm: 8px;
}

body, .ls-text, h1, h2, h3, h4, h5, h6, button, input, select, textarea {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bcl-background) !important;
  color: var(--bcl-text);
  font-size: 16px;
  line-height: 1.6;
}

.outerframe, .container-fluid > .row > .col, .ls-flex-row, main, #main-content,
.questions-list, .group-outer-wrapper {
  background: transparent !important;
}

.outerframe, .ls-flex-row.ls-flex-1, main > .group-outer-wrapper {
  max-width: 760px;
  margin: 24px auto;
  padding: 32px;
  background: var(--bcl-surface) !important;
  border-radius: var(--bcl-radius);
  box-shadow: var(--bcl-shadow);
}

h1, .h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 2rem;
  color: var(--bcl-text);
  margin-bottom: 0.5rem;
}
h2, .h2 { font-weight: 600; letter-spacing: -0.01em; }
h3, h4, .question-title { font-weight: 600; }

p, .question-text { color: var(--bcl-text); }

/* Catch every LimeSurvey navigation/submit button variant.
   LimeSurvey emits these as <button name="move" value="movesubmit|movenext|moveprev">
   with classes that vary across themes — list them all.
   Note: prefix with .fruity (the body class) to beat sea_green.css variation
   rules which use selectors like .fruity .btn-primary (specificity 0,2,0). */
.fruity .btn-primary,
.fruity .btn-success,
.fruity .ls-button-submit,
.fruity .ls-move-submit-btn,
.fruity .ls-move-next-btn,
.fruity button[name="move"][value="movesubmit"],
.fruity button[name="move"][value="movenext"],
.fruity #movesubmitbtn,
.fruity #movenextbtn,
.fruity #ls-button-submit,
.fruity .action-submit,
.fruity button[type="submit"]:not(.btn-outline-secondary):not(.btn-light):not(.btn-default) {
  background-color: var(--bcl-primary) !important;
  background: var(--bcl-primary) !important;
  border: 1.5px solid var(--bcl-primary) !important;
  color: #fff !important;
  border-radius: var(--bcl-radius-sm) !important;
  font-weight: 600;
  padding: 0.75rem 1.75rem !important;
  font-size: 1rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(25, 118, 210, 0.25);
}
.fruity .btn-primary:hover, .fruity .btn-success:hover,
.fruity .ls-button-submit:hover,
.fruity .ls-move-submit-btn:hover,
.fruity .ls-move-next-btn:hover,
.fruity button[name="move"]:hover,
.fruity #movesubmitbtn:hover, .fruity #movenextbtn:hover,
.fruity button[type="submit"]:hover {
  background-color: var(--bcl-primary-hover) !important;
  background: var(--bcl-primary-hover) !important;
  border-color: var(--bcl-primary-hover) !important;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
  transform: translateY(-1px);
}
.fruity .btn-primary:active, .fruity .btn-success:active,
.fruity .btn-primary.active, .fruity .btn-success.active,
.fruity button[name="move"]:active,
.fruity button[type="submit"]:active {
  background-color: var(--bcl-primary-pressed) !important;
  transform: translateY(0);
}

/* "Previous" button = outline style (less prominent than submit/next) */
.fruity button[name="move"][value="moveprev"],
.fruity .ls-move-previous-btn,
.fruity #moveprevbtn {
  background: #fff !important;
  border: 1.5px solid var(--bcl-border) !important;
  color: var(--bcl-text) !important;
}

.btn-outline-secondary, .btn-light, .btn-default {
  background: #fff !important;
  border: 1.5px solid var(--bcl-border) !important;
  color: var(--bcl-text) !important;
  border-radius: var(--bcl-radius-sm) !important;
  font-weight: 500;
  padding: 0.75rem 1.5rem !important;
}
.btn-outline-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.form-control, input[type="text"], input[type="number"],
input[type="email"], textarea, select {
  border-radius: var(--bcl-radius-sm) !important;
  border: 1.5px solid var(--bcl-border) !important;
  padding: 0.65rem 0.9rem !important;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--bcl-primary) !important;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15) !important;
  outline: none;
}

.form-check-input:checked {
  background-color: var(--bcl-primary) !important;
  border-color: var(--bcl-primary) !important;
}
.form-check-input:focus {
  border-color: var(--bcl-primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(25, 118, 210, 0.25) !important;
}
.answer-item, .form-check {
  padding: 0.6rem 0.9rem;
  border-radius: var(--bcl-radius-sm);
  transition: background 0.1s;
}
.answer-item:hover, .form-check:hover {
  background: rgba(25, 118, 210, 0.04);
}

.progress {
  height: 6px !important;
  border-radius: 3px;
  background: var(--bcl-border) !important;
}
.progress-bar {
  background: var(--bcl-primary) !important;
}

/* Dark top bar so the white BCLINK.CO wordmark is visible.
   Targets #survey-nav (the actual element) + the .bg-light utility
   that Fruity puts on it (needs override). */
body.fruity #survey-nav,
body.fruity #survey-nav.bg-light,
.fruity #survey-nav,
.fruity #survey-nav.bg-light,
#survey-nav.bg-light,
.fruity header,
.fruity nav.navbar,
.fruity .navbar,
.fruity .navbar-fixed-top,
.fruity .ls-survey-header,
.fruity header.navbar {
  background-color: #1E1E1E !important;
  background: #1E1E1E !important;
  border-bottom: none !important;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.fruity header *,
.fruity nav.navbar *,
.fruity .navbar *,
.fruity .navbar-brand,
.fruity .navbar-brand a,
.fruity .navbar a,
.fruity header a {
  color: #ffffff !important;
}
.fruity .navbar a:hover,
.fruity header a:hover {
  color: #93c5fd !important;
  text-decoration: none !important;
}

.logo-container, .navbar-brand {
  padding: 0.5rem 0;
}
/* BCLINK.CO horizontal wordmark — render at a comfortable readable size.
   The img has Bootstrap's .img-fluid (max-width:100% height:auto) which
   shrinks it to container width — override with explicit height + auto width
   so the wordmark renders at full 40px height regardless of column width. */
.fruity #survey-nav img.logo,
.fruity #survey-nav .navbar-brand img,
.fruity #survey-nav .logo-container img,
.fruity .logo img,
.fruity .navbar-brand img,
.fruity .logo-container img,
.fruity header img.logo,
.fruity .ls-flex.logo img,
.fruity header img,
.fruity img.logo.img-fluid {
  height: 64px !important;
  max-height: 64px !important;
  min-height: 64px !important;
  width: auto !important;
  max-width: none !important;
  margin: 4px 0;
}
/* Container may need to widen to fit the wordmark; relax constraints */
.fruity #survey-nav .navbar-brand,
.fruity #survey-nav .logo-container {
  flex: 0 0 auto !important;
  max-width: none !important;
  width: auto !important;
  margin-right: 1.5rem;
}
@media (max-width: 640px) {
  .fruity #survey-nav img.logo,
  .fruity .logo img,
  .fruity .navbar-brand img,
  .fruity .logo-container img,
  .fruity header img,
  .fruity img.logo.img-fluid {
    height: 28px !important;
    max-height: 28px !important;
  }
}

.survey-list-container ul {
  list-style: none;
  padding: 0;
}
.survey-list-container li {
  background: var(--bcl-surface);
  border: 1px solid var(--bcl-border);
  border-radius: var(--bcl-radius-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.15s;
}
.survey-list-container li:hover {
  border-color: var(--bcl-primary);
  box-shadow: var(--bcl-shadow);
}

.alert-warning {
  background: #fef9e7 !important;
  border: 1px solid #fde68a !important;
  color: #78562a !important;
  border-radius: var(--bcl-radius-sm) !important;
  padding: 0.875rem 1.25rem !important;
}

.lime-survey-poweredby,
footer.text-center,
.lime-version,
a[href*="limesurvey.org"],
a[href*="manual.limesurvey.org"] {
  display: none !important;
}

@media (max-width: 640px) {
  .outerframe, .ls-flex-row.ls-flex-1, main > .group-outer-wrapper {
    margin: 12px;
    padding: 20px;
    border-radius: 8px;
  }
  h1, .h1 { font-size: 1.5rem; }
  .btn-primary, .btn-success { padding: 0.65rem 1.25rem !important; }
}

/* Button-style answers (Yes/No, PDPA consents): LimeSurvey renders them as
   <input class="btn-check"> + <label class="btn btn-primary ls-button-label">.
   The ".fruity .btn-primary" rule above paints every btn-primary solid, so the
   chosen and the unchosen answer looked identical — a parent could not see which
   consent they had given (found 20 Oct 2026 testing the Spoon registration form).
   Unchosen = outline, chosen = solid. Specificity 0,4,0 / 0,5,0 beats the 0,2,0 / 0,3,0 rules above. */
.fruity .btn-check + .ls-button-label.btn-primary {
  background: #fff !important;
  background-color: #fff !important;
  color: var(--bcl-primary) !important;
  border: 1.5px solid var(--bcl-primary) !important;
  box-shadow: none !important;
  transform: none !important;
}
.fruity .btn-check + .ls-button-label.btn-primary:hover {
  background: #f6f6f6 !important;
  background-color: #f6f6f6 !important;
}
.fruity .btn-check:checked + .ls-button-label.btn-primary,
.fruity .btn-check:checked + .ls-button-label.btn-primary:hover {
  background: var(--bcl-primary) !important;
  background-color: var(--bcl-primary) !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}
.fruity .btn-check:focus-visible + .ls-button-label.btn-primary {
  outline: 3px solid var(--bcl-primary);
  outline-offset: 2px;
}
