/**
 * ================================================
 * ANÁLISE DE RISCO E PROTEÇÃO À MULHER - PMRO
 * Arquivo de Estilos CSS
 * ================================================
 */

/* ================================================== */
/* ESTILOS BASE E ANIMAÇÕES */
/* ================================================== */

* {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Padrão decorativo de fundo - mais sutil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(71, 85, 105, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(51, 65, 85, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.question-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #fafafa;
  pointer-events: none;
  filter: grayscale(30%);
}

/* ================================================== */
/* ESTILOS DOS FORMULÁRIOS */
/* ================================================== */

#dados-pessoais input::placeholder {
  color: #9ca3af;
  opacity: 1;
  font-weight: 400;
}

#dados-pessoais select:invalid {
  color: #9ca3af;
  font-weight: 400;
}

#dados-pessoais select:valid {
  color: #1f2937;
}

/* Estilo elegante para inputs e selects */
.form-input {
  transition: all 0.2s ease;
  border: 1.5px solid #e5e7eb;
}

.form-input:hover {
  border-color: #cbd5e1;
}

.form-input:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
  outline: none;
}

/* ================================================== */
/* MATRIZ DE RISCO - ESTILOS REFINADOS */
/* ================================================== */

.matrix-cell-MB {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: #334155;
}

.matrix-cell-BA {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  color: #1e293b;
}

.matrix-cell-MO {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
}

.matrix-cell-AL {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  color: #9a3412;
}

.matrix-cell-EX {
  background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
  color: #7f1d1d;
  font-weight: 600;
}

.matrix-selected-border {
  border-color: #475569 !important;
  border-width: 3px !important;
  box-shadow: 0 0 0 4px rgba(71, 85, 105, 0.2), inset 0 0 0 2px #475569 !important;
  animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(71, 85, 105, 0.2), inset 0 0 0 2px #475569;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(71, 85, 105, 0.15), inset 0 0 0 2px #475569;
  }
}

/* Box de Risco */
.risk-low {
  border-color: #94a3b8;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.05) 0%, rgba(148, 163, 184, 0.1) 100%);
}

.risk-moderate {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(251, 191, 36, 0.1) 100%);
}

.risk-high {
  border-color: #f87171;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.05) 0%, rgba(248, 113, 113, 0.1) 100%);
}

.risk-severe {
  background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
  border-color: #ef4444;
}

.measures-list {
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  list-style-type: none;
}

.measures-list li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.5rem;
}

.measures-list li::before {
  content: '→';
  position: absolute;
  left: -1rem;
  color: #64748b;
  font-weight: 600;
}

/* ================================================== */
/* NAVEGAÇÃO E PÁGINAS */
/* ================================================== */

#page-etapa-1,
#page-etapa-2,
#page-etapa-3,
#page-etapa-4,
#page-etapa-5 {
  display: none;
}

/* Indicador de Progresso */
.progress-step {
  transition: all 0.3s ease;
}

.progress-step.active .step-number {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  transform: scale(1.05);
}

.progress-step.completed .step-number {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
}

.progress-line {
  transition: all 0.4s ease;
}

.progress-line.active {
  background: linear-gradient(90deg, #64748b 0%, #475569 100%);
}

/* ================================================== */
/* BOTÕES ESTILIZADOS */
/* ================================================== */

.btn-primary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -4px rgba(71, 85, 105, 0.3);
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  transform: translateY(-1px);
}

/* ================================================== */
/* CARDS E SEÇÕES */
/* ================================================== */

.card-glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #6d28d9 0%, #a78bfa 100%);
  border-radius: 2px;
}

/* Pergunta Card */
.question-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.question-card:hover:not(.question-disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(76, 29, 149, 0.15);
}

.question-card.answered {
  border-color: rgba(76, 29, 149, 0.2);
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
}

/* ================================================== */
/* ESTILOS DE IMPRESSÃO */
/* ================================================== */

@media print {
  body {
    background: white !important;
    padding: 0 !important;
  }

  body::before {
    display: none;
  }

  #app {
    box-shadow: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #page-etapa-5>.bg-pax-blue\/90,
  #page-eteta-5 .print\:hidden,
  .print\:hidden {
    display: none !important;
  }

  #header-container-5,
  #footer-container-5 {
    display: block !important;
  }

  .report-content h3,
  .report-content h4,
  .report-content strong {
    color: #000 !important;
  }

  #page-etapa-5 .report-content {
    padding: 1rem 1rem !important;
  }

  #report-content-body h3 {
    margin-top: 0.5rem !important;
  }

  .print-only-text {
    display: block !important;
  }
}

@media screen {
  .print-only-text {
    display: none !important;
  }
}

/* ================================================== */
/* RESPONSIVIDADE MOBILE */
/* ================================================== */

@media (max-width: 640px) {
  body {
    padding: 0.75rem;
  }

  #progress-indicator {
    margin-bottom: 1rem;
  }

  .progress-step .step-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .question-card {
    padding: 1rem;
  }

  .question-card label span:first-child {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.875rem 1rem;
  }

  .section-title::after {
    width: 40px;
  }
}

/* ================================================== */
/* ESTADOS DE FOCO PARA ACESSIBILIDADE */
/* ================================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

.form-input:focus-visible {
  outline: none;
}

/* Transições suaves para elementos interativos */
.form-input,
.btn-primary,
.btn-secondary,
.question-card,
.progress-step,
.progress-line {
  transition: all 0.3s ease;
}

