/* ==========================================================================
   Tatiana Carraro - Academia de Ginástica e Arte
   Folha de Estilos Oficial & Responsiva (Mobile / Tablet / Desktop)
   ========================================================================== */

:root {
  --primary-terracotta: #C5683D;
  --primary-terracotta-hover: #AF562D;
  --primary-terracotta-light: #FDF4EE;
  
  --primary-green: #53634B;
  --primary-green-hover: #41503B;
  --primary-green-light: #EFF4ED;

  --accent-peach: #E49B72;
  --bg-cream: #FAF7F2;
  --card-bg: #FFFFFF;
  
  --text-dark: #283223;
  --text-muted: #6B7763;
  --border-color: #E2DBD0;
  --border-focus: #C5683D;
  
  --shadow-sm: 0 2px 8px rgba(83, 99, 75, 0.06);
  --shadow-md: 0 8px 24px rgba(83, 99, 75, 0.09);
  --shadow-lg: 0 16px 36px rgba(83, 99, 75, 0.12);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-handwriting: 'Caveat', cursive, sans-serif;
}

/* Reset básico e box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container responsivo */
.app-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header com Logo */
.app-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.logo-img {
  max-height: 110px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.04));
}

/* Banner de contagem do evento */
.event-badge-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-terracotta-light);
  border: 1px solid rgba(197, 104, 61, 0.25);
  color: var(--primary-terracotta);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.event-badge-banner .pulse-dot {
  width: 9px;
  height: 9px;
  background-color: var(--primary-terracotta);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(197, 104, 61, 0.4);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(197, 104, 61, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(197, 104, 61, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(197, 104, 61, 0); }
}

/* Card Principal */
.main-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .main-card {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }
}

.card-top-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-terracotta), var(--accent-peach), var(--primary-green));
}

.card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-green);
  text-align: center;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* Indicador de Fila / Próxima Posição */
.queue-indicator-box {
  background: var(--primary-green-light);
  border: 1px solid rgba(83, 99, 75, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 24px;
}

.queue-indicator-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-green);
  font-weight: 600;
}

.queue-indicator-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-terracotta);
  line-height: 1.1;
  margin: 4px 0;
}

.queue-indicator-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Layout de Formulário */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 600px) {
  .form-grid-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

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

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-label .required-star {
  color: var(--primary-terracotta);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease-in-out;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3.5px rgba(197, 104, 61, 0.15);
}

.form-input::placeholder {
  color: #A3AFA0;
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error-msg {
  font-size: 0.82rem;
  color: #C0392B;
  margin-top: 4px;
  font-weight: 600;
}

/* Botão Principal */
.btn-submit {
  width: 100%;
  min-height: 52px;
  background: linear-gradient(135deg, var(--primary-terracotta), #BD6032);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(197, 104, 61, 0.25);
  margin-top: 8px;
}

.btn-submit:hover, .btn-submit:focus {
  background: linear-gradient(135deg, var(--primary-terracotta-hover), #A94E23);
  box-shadow: 0 8px 20px rgba(197, 104, 61, 0.35);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(197, 104, 61, 0.2);
}

/* Card de Status / Fila Confirmada */
.status-badge-hero {
  background: linear-gradient(135deg, var(--primary-green), #3E4B37);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.status-badge-hero .status-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.status-badge-hero .hero-position-num {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  margin: 6px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-badge-hero .hero-desc {
  font-size: 0.95rem;
  opacity: 0.92;
}

.status-info-box {
  background-color: var(--primary-green-light);
  border: 1px solid rgba(83, 99, 75, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.status-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(83, 99, 75, 0.15);
}

.status-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.status-info-row:first-child {
  padding-top: 0;
}

.status-info-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-info-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-green);
}

.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #FAF6F0;
  border: 1px solid #EAD8C7;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 24px;
  font-size: 0.84rem;
  color: #795738;
}

.privacy-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.event-details-card {
  background-color: var(--primary-terracotta-light);
  border-left: 4px solid var(--primary-terracotta);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}

.event-details-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-terracotta);
  margin-bottom: 4px;
}

.event-details-card p {
  font-size: 0.88rem;
  color: var(--text-dark);
}

/* Botão Secundário / Sair */
.btn-secondary-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin: 16px auto 0;
  font-family: inherit;
  transition: color 0.2s;
}

.btn-secondary-link:hover {
  color: var(--primary-terracotta);
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 20px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background-color: #FFFFFF;
}

.app-footer strong {
  color: var(--primary-green);
}
