/* Template Visual "Festa" - Baseado no Modelo de ReferÃªncia */
/* Sistema de Filiados - Happy Hour dos BancÃ¡rios */

:root {
  --brand: #b30000;
  --brand-700: #8f0000;
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --surface: #f6f8fa;
  --border: #e5e7eb;
  --ok: #0a7d34;
  --warn: #ab6200;
  --err: #b00020;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --text: #e6edf3;
    --surface: #0f141a;
    --border: #2d333b;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-osx-font-smoothing: grayscale;
}

.page-header {
  max-width: 920px;
  margin: 24px auto 8px;
  padding: 0 16px;
  text-align: center;
}

.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
  background: var(--brand) !important;
  color: white !important;
  padding: 20px !important;
  border-radius: 12px 12px 0 0 !important;
  border-bottom: none !important;
}

.card-body {
  padding: 20px !important;
  background: var(--surface) !important;
}

.section-title {
  font-size: 1.1rem;
  margin: 6px 0 8px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

form {
  margin-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .grid .span-2 {
    grid-column: auto;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
  background: #fff !important;
  color: #111 !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: 16px !important;
}

@media (prefers-color-scheme: dark) {
  .form-field input,
  .form-field select {
    background: #0c1117;
    color: var(--text);
  }
}

.form-field input:disabled,
.form-field select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-field .hint {
  color: var(--muted);
  margin-top: 6px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

button,
.btn,
.btn-primary,
button[type="submit"] {
  background: var(--brand) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  cursor: pointer !important;
}

button:disabled,
.btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

button:hover:not(:disabled),
.btn:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
  background: var(--brand-700) !important;
  color: #fff !important;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Estilos para campos com erro */
.field-error {
    border-color: var(--err) !important;
    background-color: rgb(244 235 237) !important;
    box-shadow: 0 0 16px 7px rgb(204 19 52) !important;
}

.field-error:focus {
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.2) !important;
  outline: none !important;
}

.field-error-message {
  color: var(--err);
  font-size: 14px;
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

.form-field.has-error {
  position: relative;
}

.form-field.has-error .field-error-message {
  animation: fadeInError 0.3s ease-in-out;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-info-message {
  color: var(--ok);
  font-size: 14px;
  margin-top: 4px;
  display: block;
  font-weight: 500;
  animation: fadeInInfo 0.3s ease-in-out;
}

@keyframes fadeInInfo {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-success {
  border-color: var(--ok) !important;
  background-color: rgba(10, 125, 52, 0.05) !important;
  box-shadow: 0 0 0 2px rgba(10, 125, 52, 0.1) !important;
}

/* Spinner de carregamento */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


/* ===== MODAL SIMPLES (ALERTA) ===== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 45px rgba(15, 15, 20, 0.2);
}

.modal-dialog h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.modal-dialog p {
  margin: 0;
}

.modal-close {
  margin-top: 18px;
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.modal-close:hover {
  background: rgba(179, 0, 0, 0.08);
}

.modal.is-visible .modal-dialog {
  animation: modal-in 0.24s ease;
}

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

/* ===== FLASH MODAL (MENSAGENS DO SISTEMA) ===== */
.flash-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1100;
}

.flash-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.flash-card {
  background: var(--surface);
  color: var(--text);
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(15, 18, 23, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.flash-modal.is-visible .flash-card {
  transform: scale(1);
  animation: flash-in 0.35s ease-out;
}

@keyframes flash-in {
  from {
    transform: scale(0.85) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.flash-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #000;
}

.flash-title::before {
  content: "â„¹ï¸";
  font-size: 1.6rem;
  display: inline-block;
}

.flash-message {
  margin: 0;
  color: #000;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.flash-close {
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(179, 0, 0, 0.3);
}

.flash-close:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(179, 0, 0, 0.4);
}

.flash-modal.flash-success .flash-card {
  border-color: #15803d;
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 100%);
}

.flash-modal.flash-success .flash-title::before {
  content: "âœ…";
}

.flash-modal.flash-info .flash-card {
  border-color: #d97706;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
}

.flash-modal.flash-info .flash-title::before {
  content: "â„¹ï¸";
}

.flash-modal.flash-error .flash-card {
  border-color: #b00020;
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
}

.flash-modal.flash-error .flash-title::before {
  content: "âš ï¸";
}

.flash-modal.flash-warning .flash-card {
  border-color: #d97706;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.flash-modal.flash-warning .flash-title::before {
  content: "âš ï¸";
}

/* ---------- MODAL DE VALIDAÇÃO (NATIVO DO SISTEMA) ---------- */
/* overlay */
body .validation-modal{
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.90) !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  z-index: 99999 !important;

  /* padrão do sistema */
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 180ms ease !important;

  padding: 16px !important;
}

body .validation-modal.is-visible{
  opacity: 1 !important;
  pointer-events: auto !important; /* precisa estar ON pra clicar nos botões */
}

/* Caixa principal (equivalente à .modal-box) */
body .validation-modal-formulario{
  background-color: #0f121a !important;
  border: 1px solid #2a2d33 !important;
  border-radius: 16px !important;

  width: 520px !important;
  max-width: 90vw !important;

  padding: 3rem 2.5rem !important;
  text-align: center !important;
  position: relative !important;

  /* animação do sistema */
  transform: translateY(10px) !important;
  opacity: 0 !important;
  transition: transform 180ms ease, opacity 180ms ease !important;
  overflow: hidden !important;
}

body .validation-modal.is-visible .validation-modal-formulario{
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* ✅ mata o “branco” herdado (Bootstrap/base) */
body .modal-content,
body .modal-header,
body .modal-body,
body .modal-footer{
  background: transparent !important;
}

/* Header vira central (o 2º estilo não tem header “barra”) */
body .modal-header{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;

  padding: 0 !important;
  border: 0 !important;
  margin: 0 0 18px 0 !important;
}

/* Ícone (equivalente ao “check-icon circle”) */
body .validation-modal-icon{
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: #fff !important;
  font-size: 50px !important;

  border: 0px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45) !important;
}

/* cores por tipo */
body .validation-modal-icon.success{ background: none !important; }
body .validation-modal-icon.warning{ background: none !important; color: #0f121a !important; }
body .validation-modal-icon.error{ background: #dc3545 !important; }
body .validation-modal-icon.info{ background: #0d6efd !important; }

/* Título */
body #validationModalTitle{
  color: #fff !important;
  font-size: 1.8rem !important;
  margin: 0 !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px !important;
}

/* Corpo */
body .modal-body{
  padding: 0 !important;
  margin: 0 !important;
}

body #validationModalMessage{
  color: #dfe4ee !important;
  font-size: 1rem !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.5 !important;
}

body #validationModalDetails{
  color: rgba(223,228,238,0.85) !important;
  font-size: 0.95rem !important;
  line-height: .95 !important;

  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 12px !important;

  padding: 12px 14px !important;
  margin-top: 10px !important;
  white-space: pre-line !important;
  text-align: left !important;
}

/* Rodapé / ações */
body .modal-footer{
  padding: 22px 0 0 0 !important;
  margin: 0 !important;

  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  border: 0 !important;
}

/* Botões (sem afetar o site inteiro) */
body #validationModalPrimary.btn.btn-primary{
  background: #b30000 !important;
  color: #fff !important;

  border: none !important;
  border-radius: 10px !important;

  padding: 10px 16px !important;
  font-weight: 600 !important;
  font-size: 16px !important;

  cursor: pointer !important;
  transition: filter 150ms ease, transform 150ms ease !important;
}

body #validationModalPrimary.btn.btn-primary:hover{
  filter: brightness(0.92) !important;
  transform: translateY(-1px) !important;
}

body #validationModalSecondary.btn.btn-secondary{
  background: rgba(255,255,255,0.06) !important;
  color: #fff !important;

  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 10px !important;

  padding: 10px 16px !important;
  font-weight: 600 !important;
  font-size: 16px !important;

  cursor: pointer !important;
  transition: background 150ms ease, transform 150ms ease !important;
}

body #validationModalSecondary.btn.btn-secondary:hover{
  background: rgba(255,255,255,0.10) !important;
  transform: translateY(-1px) !important;
}

/* Responsivo */
@media (max-width: 768px){
  body .validation-modal-formulario{
    width: 90% !important;
    padding: 2rem 1.5rem !important;
  }
  body #validationModalTitle{ font-size: 1.5rem !important; }
  body #validationModalMessage{ font-size: 0.9rem !important; }

  body .modal-footer{
    flex-direction: column !important;
    gap: 10px !important;
  }

  body #validationModalPrimary.btn.btn-primary,
  body #validationModalSecondary.btn.btn-secondary{
    width: 100% !important;
  }
}


/* ===== SUCCESS MODAL (SUCESSO AMPLA) ===== */
.success-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1200;
}

.success-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.success-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.success-modal-dialog {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  min-height: 400px;
  box-shadow: 0 32px 80px rgba(15, 15, 20, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.success-modal.is-visible .success-modal-dialog {
  transform: scale(1) translateY(0);
  animation: successModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successModalIn {
  from {
    transform: scale(0.8) translateY(40px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.success-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.success-modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  transform: scale(1.1);
}

.success-modal-close svg {
  width: 20px;
  height: 20px;
}

.success-modal-content {
  padding: 60px 40px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.success-modal-icon {
  margin-bottom: 8px;
  animation: successIconBounce 0.6s ease 0.2s both;
}

@keyframes successIconBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-modal-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  animation: fadeInUp 0.5s ease 0.3s both;
}

.success-modal-message {
  max-width: 480px;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.success-modal-message p {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
}

.success-modal-details {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.success-modal-actions {
  margin-top: 8px;
  animation: fadeInUp 0.5s ease 0.5s both;
}

.success-modal-btn {
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(179, 0, 0, 0.3);
}

.success-modal-btn:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 0, 0, 0.4);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade para dispositivos mÃ³veis */
@media (max-width: 640px) {
  .success-modal {
    padding: 16px;
  }

  .success-modal-dialog {
    max-width: 100%;
    min-height: 350px;
    border-radius: 16px;
  }

  .success-modal-content {
    padding: 50px 24px 32px;
    gap: 20px;
  }

  .success-modal-title {
    font-size: 1.6rem;
  }

  .success-modal-message p {
    font-size: 1rem;
  }

  .success-modal-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  .success-modal-close svg {
    width: 18px;
    height: 18px;
  }
}

/* Tema escuro */
@media (prefers-color-scheme: dark) {
  .success-modal-close {
    background: rgba(255, 255, 255, 0.1);
  }

  .success-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}




/* Ajustes para labels */
label {
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  color: var(--text) !important;
  display: block !important;
}

/* Ajustes para o body */
body {
  background: var(--bg) !important;
  color: var(--text) !important;
  margin: 0 !important;
  padding: 20px !important;
}

.formulario-publico-header{
  text-align: center;
  margin: 15px 0;
}
.formulario-publico-description{
  text-align: center;
  margin: 15px 0;
}
.formulario-publico-footer{
  text-align: center;
  margin: 15px 0;
}
.btn-submit {
    display: block;
    margin-left: auto;
}