/* ============================================================
   BLA HOUSE DISCOVERY QUIZ — quiz.css
   Uses same design tokens as global.css (Playfair Display,
   Lato, --blue, --gold, --ivory, --charcoal etc.)
   ============================================================ */

/* ── MODAL OVERLAY ─────────────────────────────────────────── */
#bla-quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#bla-quiz-modal.bq-open {
  opacity: 1;
  pointer-events: all;
}

.bq-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 40, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── PANEL ─────────────────────────────────────────────────── */
.bq-panel {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  background: #fff;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.34, 1.36, 0.64, 1);
  -webkit-overflow-scrolling: touch;
}
#bla-quiz-modal.bq-open .bq-panel {
  transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.bq-panel::-webkit-scrollbar { width: 4px; }
.bq-panel::-webkit-scrollbar-track { background: transparent; }
.bq-panel::-webkit-scrollbar-thumb { background: #E0D9CC; border-radius: 4px; }

/* ── CLOSE BUTTON ──────────────────────────────────────────── */
.bq-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10;
  width: 36px;
  height: 36px;
  margin: 12px 12px -36px auto;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid #E0D9CC;
  color: #4A4A5A;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
}
.bq-close:hover { background: #F3EFE6; color: #1C1C1C; }

/* ── INNER CONTENT AREA ────────────────────────────────────── */
.bq-inner {
  padding: 32px 36px 40px;
}
@media (max-width: 480px) {
  .bq-inner { padding: 24px 22px 36px; }
}

/* ── LOGO ROW ──────────────────────────────────────────────── */
.bq-logo-row {
  text-align: center;
  margin-bottom: 20px;
}
.bq-logo {
  height: 52px;
  width: auto;
  margin: 0 auto;
}

/* ── EYEBROW ───────────────────────────────────────────────── */
.bq-eyebrow {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9a800;
  margin-bottom: 10px;
}

/* ── HEADLINE ──────────────────────────────────────────────── */
.bq-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 700;
  color: #1C1C1C;
  line-height: 1.25;
  margin-bottom: 12px;
}

/* ── SUBTITLE ──────────────────────────────────────────────── */
.bq-sub {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: #4A4A5A;
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ── HOUSE CHIPS (intro preview) ───────────────────────────── */
.bq-houses-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.bq-house-chip {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 4px 12px;
  background: transparent;
}

/* ── FORM ──────────────────────────────────────────────────── */
.bq-form { margin-top: 4px; }
.bq-field { margin-bottom: 18px; }
.bq-label {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1C1C1C;
  margin-bottom: 6px;
}
.bq-req { color: #c0392b; margin-left: 2px; }
.bq-input {
  width: 100%;
  padding: 12px 15px;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: #1C1C1C;
  background: #fff;
  border: 1.5px solid #E0D9CC;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.bq-input:focus {
  border-color: #1A5091;
  box-shadow: 0 0 0 3px rgba(26, 80, 145, 0.1);
}
.bq-error {
  background: rgba(192, 57, 43, 0.07);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 14px;
  font-family: 'Lato', sans-serif;
}
.bq-privacy {
  text-align: center;
  font-size: 11px;
  color: #9a9a9a;
  margin-top: 12px;
  font-family: 'Lato', sans-serif;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.bq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.22s ease;
  text-decoration: none;
  line-height: 1;
}
.bq-btn--primary {
  background: #1A5091;
  color: #fff;
  border-color: #1A5091;
}
.bq-btn--primary:hover {
  background: #123a6b;
  border-color: #123a6b;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 80, 145, 0.2);
}
.bq-btn--outline {
  background: transparent;
  border-width: 2px;
  border-style: solid;
}
.bq-btn--outline:hover {
  opacity: 0.8;
}
.bq-btn--full { width: 100%; margin-top: 6px; }
.bq-arrow { font-size: 16px; }

/* ── QUIZ HEADER ───────────────────────────────────────────── */
.bq-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.bq-child-name {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6B7B;
}
.bq-progress-label {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1A5091;
}

/* ── PROGRESS BAR ──────────────────────────────────────────── */
.bq-progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: #EDE8DC;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 28px;
}
.bq-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1A5091, #F1CE34);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── QUESTION ──────────────────────────────────────────────── */
.bq-question {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(17px, 2.8vw, 21px);
  font-weight: 600;
  color: #1C1C1C;
  line-height: 1.35;
  margin-bottom: 22px;
}

/* ── ANSWER CHOICES ────────────────────────────────────────── */
.bq-answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bq-answer {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: #FAF8F3;
  border: 1.5px solid #E0D9CC;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  font-family: 'Lato', sans-serif;
}
.bq-answer:hover {
  border-color: #1A5091;
  background: #fff;
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(26, 80, 145, 0.08);
}
.bq-answer--selected {
  border-color: #1A5091 !important;
  background: rgba(26, 80, 145, 0.07) !important;
  transform: translateX(2px);
}
.bq-answer-letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #C0B8A8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #6B6B7B;
  background: #fff;
  margin-top: 1px;
  transition: all 0.18s;
}
.bq-answer--selected .bq-answer-letter {
  background: #1A5091;
  border-color: #1A5091;
  color: #fff;
}
.bq-answer-text {
  font-size: 14px;
  color: #4A4A5A;
  line-height: 1.6;
}
.bq-answer--selected .bq-answer-text {
  color: #1C1C1C;
  font-weight: 600;
}

/* ── RESULT SCREEN ─────────────────────────────────────────── */
.bq-result-header {
  margin: -32px -36px 0;
  padding: 36px 36px 32px;
  text-align: center;
}
@media (max-width: 480px) {
  .bq-result-header { margin: -24px -22px 0; padding: 28px 22px 24px; }
}
.bq-result-eyebrow {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bq-result-house {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.1;
}
.bq-result-subtitle {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bq-result-body { padding-top: 28px; }
.bq-result-child { margin-bottom: 16px; }
.bq-result-for {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6B7B;
}
.bq-result-desc {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: #4A4A5A;
  line-height: 1.78;
  margin-bottom: 22px;
}

/* ── TRAITS ────────────────────────────────────────────────── */
.bq-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.bq-trait {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 4px 11px;
}
.bq-traits--small .bq-trait { font-size: 10px; }

/* ── RESULT CTA ────────────────────────────────────────────── */
.bq-result-cta {
  background: #FAF8F3;
  border: 1px solid #EDE8DC;
  border-radius: 8px;
  padding: 24px 28px;
  text-align: center;
}
.bq-cta-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  color: #1C1C1C;
  margin-bottom: 10px;
}
.bq-cta-sub {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: #4A4A5A;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.bq-cta-support {
  font-size: 12px;
  color: #9a9a9a;
  margin-top: 12px;
  font-family: 'Lato', sans-serif;
}
.bq-cta-support a { color: #1A5091; font-weight: 700; }

/* ── TIE SCREEN ────────────────────────────────────────────── */
.bq-tie-header { text-align: center; margin-bottom: 28px; }
.bq-tie-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: #1C1C1C;
  margin-bottom: 10px;
}
.bq-tie-sub {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: #4A4A5A;
  line-height: 1.7;
}
.bq-tie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 500px) {
  .bq-tie-grid { grid-template-columns: 1fr; }
}
.bq-tie-card {
  background: #fff;
  border: 1px solid #EDE8DC;
  border-radius: 8px;
  overflow: hidden;
}
.bq-tie-card-head {
  padding: 18px 20px;
  text-align: center;
}
.bq-tie-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.bq-tie-card-sub {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bq-tie-card-body {
  padding: 20px 20px 24px;
}
.bq-tie-card-body p {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #4A4A5A;
  line-height: 1.7;
  margin-bottom: 14px;
}
.bq-tie-card-body .bq-btn {
  width: 100%;
  margin-top: 16px;
  font-size: 12px;
  padding: 11px 16px;
}

/* ── SCROLLABLE QUIZ CONTAINER ON SHORT SCREENS ────────────── */
@media (max-height: 680px) {
  .bq-panel { max-height: 96vh; }
}

/* ── TRIGGER BUTTON (site-side) ────────────────────────────── */
.bla-quiz-trigger {
  /* Uses existing .btn .btn--gold styling from global.css */
}

/* ── Homepage House Quiz CTA ───────────────────────────────── */
.bq-homepage-cta {
  margin: 28px auto 0;
  max-width: 680px;
  text-align: center;
  padding: 24px;
  background: rgba(255,255,255,0.68);
  border: 1px solid var(--border-light, #E0D9CC);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 30px rgba(26, 80, 145, 0.08);
}
.bq-homepage-cta p {
  margin: 0 0 16px;
  color: var(--slate-light, #4A4A5A);
  font-size: 15px;
  line-height: 1.7;
}
.bq-homepage-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
