/* =====================
   VARIÁVEIS DE CORES
   ===================== */
:root {
  --azul-principal: #222b5c;
  --azul-escuro: #6AB6DF;
  --cinza-claro: #EBEBEB;
  --cinza-escuro: #232b3b;
  --fundo-modal: #FFFFFF;
  --borda-modal: #007889;
  --texto-principal: #222;
  --preto: #eeea;
  --azul-medio: #3751e8;
  --azul-claro: #6AB6DF;
  --azul-destaque: #56BFF9;
  --fundo-formulario: #0e2297;
}

/* =====================
   BASE GLOBAL
   ===================== */
body {
  background: var(--fundo-formulario);
  min-height: 100vh;
  margin: 0;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}
h2 {
  color: var(--azul-principal);
}
input, select, button, h1, h2, h3, h4, h5, h6, label {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

/* =====================
   FORMULÁRIO PRINCIPAL
   ===================== */
.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 0;
}

.form-top-img {
  width: 100%;
  max-width: 600px;
  display: block;
}

.form-card {
  width: 100%;
  max-width: 600px;
  background: var(--azul-medio);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 24px var(--azul-principal)1a;
  padding: 28px 24px 20px 24px;
  margin-top: 0;
  margin-bottom: 32px;
  box-sizing: border-box;
}

form#cotacaoForm {
  background: var(--azul-medio);
  border-radius: 0 0 18px 18px;
  max-width: 600px;
  margin: 0 auto 32px auto;
  box-shadow: 0 4px 24px var(--azul-principal)1a;
  border: none;
  padding: 28px 24px 20px 24px;
}

form#cotacaoForm label {
  color: #fff;
  font-weight: 600;
  font-size: 1.08rem;
  margin-bottom: 16px;
  display: block;
  text-align: left;
}

form#cotacaoForm input[type="text"],
form#cotacaoForm input[type="email"],
form#cotacaoForm input[type="number"] {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.26);
  border: none;
  border-radius: 0;
  font-size: 1.1rem;
  color: #fff;
  padding: 0 16px;
  margin-bottom: 18px;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  box-sizing: border-box;
  box-shadow: none;
}

input:focus, select:focus, button:focus {
  outline: none;
  border: 2px solid var(--azul-principal);
  box-shadow: 0 0 0 2px var(--azul-medio)33;
}

/* =====================
   BOTÕES DE POSSUI SEGURO
   ===================== */
.possui-seguro-btns {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 18px;
}

.possui-btn {
  flex: 1 1 0;
  min-width: 0;
  background: #2c3986;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 0;
  padding: 18px 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.08rem;
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  box-shadow: none;
  text-align: center;
  outline: none;
  width: 50%;
  max-width: 50%;
}

.possui-btn.selected {
  background: #fff;
  color: var(--azul-principal);
  border: none;
  box-shadow: 0 2px 8px var(--azul-principal)33;
}

.possui-btn:not(.selected):hover {
  background: #56BFF9;
  color: #fff;
  border: 2px solid #fff;
}

/* =====================
   BOTÃO DE ENVIO
   ===================== */
form#cotacaoForm button[type="submit"] {
  background: #fff;
  color: var(--azul-principal);
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.15rem;
  box-shadow: 0 2px 12px var(--azul-principal)22;
  border: 2px solid var(--azul-principal);
  margin-top: 18px;
  padding: 16px 0;
  width: 100%;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
  cursor: pointer;
}

form#cotacaoForm button[type="submit"]:hover,
form#cotacaoForm button[type="submit"]:focus {
  background: var(--azul-escuro);
  color: #fff;
  border: 2px solid var(--azul-escuro);
  box-shadow: 0 4px 18px var(--azul-principal)33;
}

/* =====================
   MODAL DE SUCESSO
   ===================== */
#sucessoBackdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

#sucessoModal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 40px 48px 32px 48px;
  border-radius: 18px;
  z-index: 2100;
  box-shadow: 0 4px 32px #000a;
  min-width: 320px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#sucessoModal h3 {
  color: #0078B9;
  font-size: 2rem;
  margin-bottom: 12px;
  text-align: center;
  font-weight: bold;
}

#sucessoModal p {
  color: #222;
  font-size: 1.2rem;
  max-width: 420px;
  text-align: center;
}

#sucessoModal img {
  width: 90px;
  margin-bottom: 24px;
  display: block;
}

#fecharSucesso {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f4f8fb;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #0078B9;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0078b933;
  padding: 2px 10px 2px 10px;
  transition: background 0.2s, color 0.2s;
}

#fecharSucesso:hover {
  background: #0078B9;
  color: #fff;
}

.sucesso-gif-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.sucesso-gif {
  width: 90px;
  height: 90px;
  display: block;
  margin: 0 auto;
}

/* =====================
   RESPONSIVIDADE
   ===================== */
@media (max-width: 650px) {
  .form-container, .form-top-img, .form-card {
    max-width: 98vw;
  }
  .form-card {
    padding: 14px 2vw 10px 2vw;
  }
}

@media (max-width: 600px) {
  .possui-seguro-btns {
    flex-direction: column;
  }
  .possui-btn {
    width: 100%;
    max-width: 100%;
    padding: 14px 0;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #sucessoModal {
    min-width: 90vw;
    max-width: 98vw;
    padding: 16px 4vw 12px 4vw;
  }
  #sucessoModal h3 {
    font-size: 1.2rem;
  }
  #sucessoModal img {
    width: 60px;
    margin-bottom: 16px;
  }
  .sucesso-gif {
    width: 60px;
    height: 60px;
  }
  .sucesso-gif-container {
    margin-bottom: 12px;
  }
}
