/* ── Card override ── */
#epds-card {
  padding: 28px;
}
#epds-card .card-header {
  margin-bottom: 24px;
}
#epds-card .card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}
#epds-card .card-header-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   Calculadora EPDS — Estilos Específicos
   Prefixo: epds-
   Depende de: calc.css (base)
   ============================================ */

/* ── Question Cards ── */
.epds-question {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 16px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.epds-question:hover {
  border-color: #cbd5e1;
}

.epds-question.answered {
  border-color: #0e7490;
  box-shadow: 0 0 0 1px rgba(14, 116, 144, 0.1);
}

.epds-question.has-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.epds-question-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 0;
  border: none;
  float: none;
  width: 100%;
}

.epds-question-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0e7490;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.epds-question.answered .epds-question-num {
  background: #0e7490;
}

.epds-question.has-error .epds-question-num {
  background: #ef4444;
}

/* ── Options ── */
.epds-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.epds-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
  position: relative;
}

.epds-option:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.epds-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.epds-option-text {
  font-size: 14px;
  font-weight: 400;
  color: #334155;
  line-height: 1.45;
  padding-left: 28px;
  position: relative;
}

/* Custom radio circle */
.epds-option-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
  transition: all 0.15s ease;
}

.epds-option-text::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0e7490;
  transition: transform 0.15s ease;
}

/* Selected state */
.epds-option input[type="radio"]:checked + .epds-option-text::before {
  border-color: #0e7490;
}

.epds-option input[type="radio"]:checked + .epds-option-text::after {
  transform: translateY(-50%) scale(1);
}

.epds-option:has(input[type="radio"]:checked) {
  border-color: #0e7490;
  background: #ecfeff;
}

.epds-option:has(input[type="radio"]:checked) .epds-option-text {
  color: #0f172a;
  font-weight: 500;
}

/* Focus visible for keyboard navigation */
.epds-option:has(input[type="radio"]:focus-visible) {
  outline: 2px solid #0e7490;
  outline-offset: 2px;
}

/* ── Card Header ── */
.card-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

.card-header-sub {
  font-size: 14px;
  font-weight: 300;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ── Result Card ── */
.epds-result-card {
  animation: epds-fadeIn 0.4s ease;
}

@keyframes epds-fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.epds-result-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.epds-result-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

/* ── Score Display ── */
.epds-score-display {
  text-align: center;
  margin-bottom: 24px;
}

.epds-score-value {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.epds-score-label {
  font-size: 14px;
  font-weight: 400;
  color: #64748b;
}

/* Score colors */
.epds-score-value.score-baixo  { color: #16a34a; }
.epds-score-value.score-moderado { color: #d97706; }
.epds-score-value.score-alto   { color: #dc2626; }

/* ── Progress Bar ── */
.epds-progress-wrap {
  margin-bottom: 28px;
  padding: 0 4px;
}

.epds-progress-bar {
  height: 10px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.epds-progress-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 0.6s ease, background-color 0.3s;
}

.epds-progress-fill.score-baixo    { background: linear-gradient(90deg, #22c55e, #16a34a); }
.epds-progress-fill.score-moderado { background: linear-gradient(90deg, #fbbf24, #d97706); }
.epds-progress-fill.score-alto     { background: linear-gradient(90deg, #f87171, #dc2626); }

.epds-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

/* ── Classification ── */
.epds-classification {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.epds-classification-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.epds-classification-badge.badge-baixo {
  background: #dcfce7;
  color: #15803d;
}

.epds-classification-badge.badge-moderado {
  background: #fef3c7;
  color: #92400e;
}

.epds-classification-badge.badge-alto {
  background: #fee2e2;
  color: #991b1b;
}

.epds-classification-text {
  font-size: 15px;
  font-weight: 400;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

/* ── Self-harm Alert ── */
.epds-selfharm-alert {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: #fef2f2;
  border: 2px solid #fca5a5;
  margin-bottom: 24px;
  animation: epds-pulse 2s ease-in-out infinite;
}

@keyframes epds-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1); }
}

.epds-selfharm-icon {
  flex-shrink: 0;
  color: #dc2626;
  margin-top: 2px;
}

.epds-selfharm-content strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 6px;
}

.epds-selfharm-content p {
  font-size: 14px;
  font-weight: 400;
  color: #7f1d1d;
  line-height: 1.55;
  margin: 0 0 6px;
}

.epds-selfharm-cvv {
  font-size: 15px !important;
  color: #991b1b !important;
  margin-top: 8px !important;
}

.epds-selfharm-cvv strong {
  display: inline;
  font-size: 18px;
  color: #dc2626;
}

/* ── Help Callout ── */
.epds-callout-help {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #ecfeff;
  border-left: 3px solid #0e7490;
}

.epds-callout-help-icon {
  flex-shrink: 0;
  color: #0e7490;
  margin-top: 1px;
}

.epds-callout-help strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.epds-callout-help p {
  font-size: 13px;
  font-weight: 300;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

/* ── Badge gestante ── */
.badge-gestante {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 99px;
  background: #fce7f3;
  color: #9d174d;
}

/* ── Button row ── */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  align-items: stretch;
}

.btn-row .btn-calcular,
.btn-row .btn-limpar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  margin-top: 0;
  width: auto;
}

.btn-row .btn-calcular {
  background: #0e7490;
  color: #fff;
  flex: 1;
  box-shadow: none;
}

.btn-row .btn-calcular:hover {
  background: #155e75;
}

.btn-row .btn-limpar {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 0 24px;
}

.btn-row .btn-limpar:hover {
  background: #e2e8f0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .epds-question {
    padding: 16px;
  }

  .epds-question-label {
    font-size: 14px;
  }

  .epds-option {
    padding: 10px 12px;
  }

  .epds-option-text {
    font-size: 13px;
  }

  .epds-score-value {
    font-size: 44px;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn-calcular,
  .btn-limpar {
    width: 100%;
    padding: 14px 20px;
  }

  .epds-selfharm-alert {
    flex-direction: column;
    gap: 10px;
  }
}

/* ── Disclaimer (yellow, like Barcelona/IOTA) ── */
.epds-disclaimer {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #92400e;
  margin: 16px 0 24px;
  line-height: 1.6;
}
.epds-disclaimer strong {
  font-weight: 700;
}

/* ── Result card fix ── */
.epds-result-card {
  padding: 28px !important;
  overflow: visible;
}
