/* =============================
   POPUP OVERLAY DA ROLETA
   - Fundo escuro por trás da roleta
============================= */
#ks-roleta .ks-roleta-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;                /* JS ativa quando necessário */
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

/* =============================
   QUADRO INTERNO DO POPUP
   - Card branco com conteúdo da roleta
============================= */
#ks-roleta .ks-roleta-popup-inner {
  background: #ffffff;
  border-radius: 16px;
  max-width: 960px;
  width: 95%;
  padding: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* =============================
   BOTÃO DE FECHAR (X)
============================= */
#ks-roleta .ks-roleta-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #444;
  z-index: 100000;
}

/* =============================
   PALETA DE CORES GLOBAL
============================= */
:root {
  --new-dark-accent: #3D7856;
  --new-medium-green: #70A68A;
  --new-light-green: #B3E0BA;
  --white: #ffffff;
}

/* =============================
   CONTAINER INTERNO GERAL
============================= */
#ks-roleta .ks-roleta-container {
  background: var(--white);
  padding: 30px;
  border-radius: 15px;
  display: flex;
  gap: 30px;
  max-width: 880px;
  flex-wrap: wrap;
}

/* =============================
   FORMULÁRIO DE DADOS
============================= */
#ks-roleta .form-area {
  flex: 1;
  min-width: 260px;
}

/* LABELS DOS CAMPOS */
#ks-roleta label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3px;
  display: block;
}

/* =============================
   CAMPOS DE TEXTO (MESMA ALTURA)
============================= */
#ks-roleta input[type="text"],
#ks-roleta input[type="email"],
#ks-roleta input[type="tel"] {
  width: 100%;
  padding: 10px;
  height: 44px; /* 🔥 garante mesma altura para os 3 campos */
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

/* =============================
   BOTÃO "GIRAR ROLETA"
============================= */
#ks-roleta #spin-btn {
  width: 100%;
  background: var(--new-dark-accent);
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
  border: none;
}

/* =============================
   ÁREA DA ROLETA
============================= */
#ks-roleta .wheel-area {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* TAMANHO DA ROLETA */
#ks-roleta .wheel-container {
  width: 300px;
  height: 300px;
  position: relative;
}

/* PONTEIRO */
#ks-roleta .pointer {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 35px solid red;
  z-index: 10;
}

/* CÍRCULO DA ROLETA */
#ks-roleta .wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    var(--new-medium-green) 0deg 90deg,
    var(--new-light-green) 90deg 180deg,
    var(--new-medium-green) 180deg 270deg,
    var(--new-light-green) 270deg 360deg
  );
  transition: transform 4s cubic-bezier(0.17,.67,.12,.99);
  position: relative;
}

/* MIÚDO CENTRAL */
#ks-roleta .wheel-center {
  width: 70px;
  height: 70px;
  background: #fff;
  border-radius: 50%;
  border: 6px solid var(--new-light-green);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* =============================
   TEXTOS NAS FATIAS DA ROLETA
============================= */
#ks-roleta .prize-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
  width: 50%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.28rem;
  font-weight: 700;
  text-align: center;
}

/* Quadrantes */
#ks-roleta .seg-1 { transform: rotate(270deg); color: #FFF; }
#ks-roleta .seg-2 { transform: rotate(0deg);   color: var(--new-dark-accent); }
#ks-roleta .seg-3 { transform: rotate(90deg);  color: #FFF; }
#ks-roleta .seg-4 { transform: rotate(180deg); color: var(--new-dark-accent); }

/* Rotação do texto dentro da fatia */
#ks-roleta .prize-label .text {
  transform: rotate(-45deg) translateY(-45%);
}

/* =============================
   MODAL DE CUPOM AO FINAL
============================= */
#ks-roleta .result-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

/* CAIXA INTERNA DO MODAL */
#ks-roleta .result-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  border-top: 10px solid var(--new-dark-accent);
}

/* BOTÃO DO MODAL */
#ks-roleta .close-btn {
  width: 100%;
  background: var(--new-dark-accent);
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 16px;
  border: none;
}

/* =============================
   MOBILE — Ajustes finos (celular)
============================= */
@media (max-width: 768px) {

  #ks-roleta .ks-roleta-popup {
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow-y: hidden;
  }

  #ks-roleta .ks-roleta-popup-inner {
    width: 100%;
    max-width: 420px;
    margin: auto;
    max-height: calc(100vh - 60px);
    padding-top: 30px;
    padding-bottom: 30px;
    overflow-y: auto;
    box-sizing: border-box;
  }

  #ks-roleta .ks-roleta-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
  }

  #ks-roleta .wheel-container {
    width: 240px;
    height: 240px;
  }
}
