/* components.css — reusable UI pieces */

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e2d9c9;
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.5rem;
}
.card + .card { margin-top: 1.25rem; }

.card-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

/* Notice boxes */
.notice {
  border-left: 4px solid var(--accent);
  background: #fbf3df;
  padding: 0.9rem 1rem;
  border-radius: 4px;
  font-size: 0.95rem;
}
.notice.warning { border-color: var(--warning); background: #fbe7db; }
.notice.success { border-color: var(--success); background: #e2efe9; }
.notice strong { display: inline-block; margin-bottom: 0.15rem; }

.verify {
  font-size: 0.85rem;
  color: var(--warning);
  font-weight: 700;
  font-family: var(--font-head);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: 6px;
  border: 2px solid var(--bg);
  background: var(--bg);
  color: var(--text-on-dark);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover, .btn:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-light);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.secondary {
  background: transparent;
  color: var(--bg);
}
.btn.secondary:hover, .btn.secondary:focus {
  background: var(--surface);
  color: var(--text-on-dark);
}

/* Quiz */
.quiz-progress {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.quiz-progress .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d8cfe0;
  border: 2px solid var(--surface);
}
.quiz-progress .dot.active { background: var(--accent); border-color: var(--accent); }
.quiz-progress .dot.done { background: var(--surface); }

.quiz-panel {
  background: #fff;
  border: 1px solid #e2d9c9;
  border-radius: 10px;
  padding: 1.5rem;
}

.quiz-panel fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.quiz-panel legend {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--bg);
  padding: 0;
  margin-bottom: 0.75rem;
}

.quiz-option {
  display: block;
  border: 2px solid #d8cfe0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}
.quiz-option:hover { border-color: var(--accent); }
.quiz-option input { margin-right: 0.6rem; }
.quiz-option:has(input:checked) {
  border-color: var(--accent);
  background: #fbf3df;
}
.quiz-option:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.quiz-status {
  font-size: 0.85rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--surface);
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Result stamp card */
.result-stamp {
  border: 3px solid var(--bg);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
  background: #fff;
}
.result-stamp::before {
  content: "REFERENCE ONLY";
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  background: var(--accent);
  color: var(--text-on-light);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Age gate modal */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(27, 21, 30, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 2000;
}
.age-gate-box {
  background: #fff;
  border-radius: 10px;
  max-width: 26rem;
  width: 100%;
  padding: 1.75rem;
  text-align: center;
}
.age-gate-box h2 { margin-bottom: 0.75rem; }
.age-gate-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* State cards */
.state-card h3 { margin-bottom: 0.35rem; }
.state-card .tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--surface);
  background: #ece4f0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

/* FAQ */
details.faq-item {
  border: 1px solid #e2d9c9;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}
details.faq-item summary {
  font-family: var(--font-head);
  font-weight: 700;
  cursor: pointer;
  color: var(--bg);
}
details.faq-item[open] summary { margin-bottom: 0.5rem; }

/* No-JS static quiz fallback */
.noscript-quiz-list .card { margin-bottom: 1rem; }
