/*
 * Braseal Vedações - Contato Interactive Form Styles
 * Estilo premium tipo Typeform com transições verticais (arrastar para cima/baixo)
 *
 * NOTA: Este arquivo declara suas próprias variáveis CSS no :root abaixo,
 * tornando-o autossuficiente. Funciona independentemente do styles.css da LP.
 */

:root {
  /* Cores Braseal (Brandbook oficial) */
  --color-primary: #0065AF;
  /* Azul primário PANTONE 2935C */
  --color-secondary: #00A7B5;
  /* Turquesa PANTONE 7466C */

  /* Tipografia */
  --font-title: 'Avenir Black', 'Inter', sans-serif;
  --font-body: 'Inter', 'Sukhumvit Set', sans-serif;

  /* Backgrounds */
  --bg-main: #F8FAFC;
  --bg-surface-hover: #F1F5F9;

  /* Texto */
  --text-light: #0F172A;
  --text-muted: #64748B;

  /* Utilitários */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --transition-fast: all 0.2s ease;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-light);
  height: 100%;
  margin: 0;
  overflow: hidden;
  position: relative;
}

/* Background glows */
.form-bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle at center, rgba(0, 167, 181, 0.05) 0%, rgba(248, 250, 252, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.form-bg-glow-2 {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle at center, rgba(0, 101, 175, 0.04) 0%, rgba(248, 250, 252, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.form-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* Header link */
.form-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  z-index: 10;
}

.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.back-to-home:hover {
  color: var(--color-primary);
}

/* Steps container */
.steps-container {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  padding-bottom: 80px;
  box-sizing: border-box;
}

#lead-form {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Step base styling */
.step {
  display: none;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  box-sizing: border-box;
}

.step.step-active {
  display: flex;
  opacity: 1;
  z-index: 2;
}

.step-content {
  width: 100%;
}

/* Welcome step specific */
#step-welcome .step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome-logo {
  max-height: 180px;
  width: auto;
  margin: 0 auto 2rem;
  display: block;
}

.welcome-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(1rem, 2.8vw, 1.6rem);
  color: var(--text-light);
  line-height: 1.2;
  margin-bottom: 0.0rem;
  white-space: nowrap;
}

.welcome-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 580px;
  line-height: 1.6;
  margin-left: auto;
  margin-right: auto;
}

/* Step numbering */
.step-number {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.arrow-right {
  font-weight: normal;
  opacity: 0.7;
}

/* Question Title */
.question-title {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3.8vw, 1.9rem);
  font-weight: 800;
  color: var(--text-light);
  line-height: 1.35;
  margin-bottom: 1.75rem;
  display: block;
}

/* Input Wrapper & Inputs */
.input-wrapper {
  width: 100%;
  margin-bottom: 2.25rem;
  position: relative;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(15, 23, 42, 0.15);
  padding: 0.75rem 0;
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  color: var(--text-light);
  font-family: var(--font-body);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  border-radius: 0;
}

.input-wrapper input::placeholder {
  color: #CBD5E1;
  opacity: 0.7;
}

.input-wrapper input:focus {
  border-bottom-color: var(--color-primary);
}

/* Error warning style matching reference */
.input-wrapper input.input-error {
  border-bottom-color: #ff4d4d !important;
  animation: shake 0.3s ease-in-out;
}

.error-msg {
  display: none;
  align-items: center;
  gap: 0.4rem;
  color: #ff4d4d;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.6rem;
}

.input-wrapper input.input-error+.error-msg,
.choices-container.input-error+.error-msg {
  display: inline-flex;
  animation: fadeIn 0.2s ease-out;
}

/* Back Link in Questions */
.btn-back-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding: 0;
  transition: var(--transition-fast);
}

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

/* Button stylings */
.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.9rem 1.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  user-select: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 101, 175, 0.2);
}

.btn-primary:hover {
  background-color: #005494;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 101, 175, 0.3);
}

.btn-next {
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 101, 175, 0.15);
}

.btn-next:hover {
  background-color: #005494;
}

.btn-submit {
  background-color: var(--color-secondary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 167, 181, 0.25);
}

.btn-submit:hover {
  background-color: #008f9c;
  transform: translateY(-1px);
}

/* Multiple choice styling */
.choices-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  max-width: 480px;
}

@media (min-width: 480px) {
  .choices-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.choice-btn {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-fast);
  width: 100%;
}

.choices-container.input-error {
  animation: shake 0.3s ease-in-out;
}

.choices-container.input-error .choice-btn {
  border-color: #ff4d4d;
}

.choice-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-main);
  transition: var(--transition-fast);
}

.choice-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
}

.choice-btn:hover {
  border-color: var(--color-primary);
  background-color: rgba(0, 101, 175, 0.02);
}

.choice-btn:hover .choice-key {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: rgba(0, 101, 175, 0.05);
}

.choice-btn.selected {
  border-color: var(--color-primary);
  background-color: rgba(0, 101, 175, 0.05);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.choice-btn.selected .choice-key {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: #FFFFFF;
}

/* Success step */
.success-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(0, 167, 181, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

/* Bottom Controls */
.form-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  max-width: 300px;
}

.progress-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.progress-bar-track {
  width: 100%;
  height: 4px;
  background-color: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.nav-controls {
  display: flex;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.nav-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-light);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(15, 23, 42, 0.12);
}

/* Animations classes - Typeform slide direction overrides */
.slide-down-in {
  animation: slideDownIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.slide-down-out {
  display: flex !important;
  animation: slideDownOut 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.slide-up-in {
  animation: slideUpIn 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.slide-up-out {
  display: flex !important;
  animation: slideUpOut 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideDownIn {
  from {
    transform: translateY(-100vh);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDownOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(100vh);
    opacity: 0;
  }
}

@keyframes slideUpIn {
  from {
    transform: translateY(100vh);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUpOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(-100vh);
    opacity: 0;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}