.spin-wheel-conc {
  --primary-dark: #bd2c19;
  --text: #202124;
  --muted: #6d6d6d;
  --border: #dedede;
  --soft-bg: #f2fffb;
  --success: #1fba63;
  --disabled: #e9ece9;
}
.spin-wheel-conc * { 
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.spin-wheel-conc button,
.spin-wheel-conc input {
  font: inherit;
}

.spin-wheel-conc button {
  cursor: pointer;
  border: 0;
}

/* ── Pages ── */
.spin-wheel-conc .page {
  display: none;
  padding: 32px 20px;
}
.spin-wheel-conc .page.active {
  display: block;
}

.spin-wheel-conc .container {
  max-width: 900px;
  margin: 0 auto;
}
.spin-wheel-conc .narrow {
  max-width: 700px;
}

/* ── Survey header ── */
.spin-wheel-conc .survey-header {
  text-align: center;
  margin-bottom: 28px;
}
.spin-wheel-conc .tax-survey-read {
  border: 1px solid #C8361A4D;
  border-radius: 50px;
  background: #C8361A1A;
}
.spin-wheel-conc .survey-user {
  margin-top: 18px;
  color: var(--muted);
}

/* ── Benefits ── */
.spin-wheel-conc .benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 38px;
}
.spin-wheel-conc .benefit-card,
.spin-wheel-conc .form-card,
.spin-wheel-conc .survey-card,
.spin-wheel-conc .thankyou-card,
.spin-wheel-conc .spin-card,
.spin-wheel-conc .modal-content {
  background: #fff;
  border: 1px solid #E5E7EB;
  box-shadow: 0px 1px 2px -1px #0000001A;
}
.spin-wheel-conc .benefit-card {
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
}

/* ── Lead form card ── */
.spin-wheel-conc .form-card {
  border-radius: 16px;
  padding: 20px 22px;
  text-align: center;
}
.spin-wheel-conc .lead-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.spin-wheel-conc .lead-form input {
  height: 48px;
  border: 1px solid #cfcfcf;
  border-radius: 7px;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
}
.spin-wheel-conc .lead-form input:focus {
  border-color: var(--e-global-color-secondary, #d9341f);
  box-shadow: 0 0 0 3px rgba(217, 52, 31, 0.12);
}
.spin-wheel-conc .full-btn {
  grid-column: 1 / -1;
  height: 52px;
  border-radius: 32px;
  background: var(--e-global-color-secondary, #d9341f);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s;
}
.spin-wheel-conc .full-btn:hover {
  background: var(--primary-dark);
}
.spin-wheel-conc .form-note {
  display: block;
  color: #8B8B8B;
  font-size: 12px;
}
.spin-wheel-conc .error {
  display: none;
  grid-column: 1 / -1;
  color: var(--e-global-color-secondary, #d9341f);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
.spin-wheel-conc .error.show {
  display: block;
}

/* ── Survey card ── */
.spin-wheel-conc .survey-card {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}
.spin-wheel-conc .progress-track {
  height: 8px;
  background: #f2f2f2;
}
.spin-wheel-conc .progress-fill {
  height: 100%;
  width: 8.33%;
  background: var(--e-global-color-secondary, #d9341f);
  transition: width 0.3s ease;
}
.spin-wheel-conc .question-body {
  padding: 40px;
}
.spin-wheel-conc .question-count {
  color: #8B8B8B;
}

/* ── Question hint ── */
.spin-wheel-conc .question-hint {
  grid-column: 1 / -1;
  font-size: 14px;
  color: #000000;
  font-style: italic;
  margin-bottom: 16px;
  margin-top: -8px;
  font-weight: 500;
}

/* ── Options grid ── */
.spin-wheel-conc .options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.spin-wheel-conc .option {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 2px solid #E5E5E5;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.2s;
  background: #fff;
}
.spin-wheel-conc .option:hover {
  border-color: var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #D1D5DC;
  position: relative;
  flex: 0 0 auto;
}
.spin-wheel-conc .option input[type="radio"]:checked {
  border-color: var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .option.selected {
  border-color: var(--e-global-color-secondary, #d9341f);
  background: #fff6f4;
}

/* ── Checkbox options (multi-select) ── */
.spin-wheel-conc .option-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid #D1D5DC;
  position: relative;
  flex: 0 0 auto;
  transition: border-color 0.2s, background 0.2s;
}
.spin-wheel-conc .option-checkbox input[type="checkbox"]:checked {
  border-color: var(--e-global-color-secondary, #d9341f);
  background: var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .option-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ── Disabled option (max selections reached) ── */
.spin-wheel-conc .option-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Other option text input ── */
.spin-wheel-conc .option-other {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  grid-column: 1 / -1;
}
.spin-wheel-conc .option-other-input {
  display: none;
  flex: 0 0 100%;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1.5px solid #D1D5DC;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  color: #1a1a2e;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.spin-wheel-conc .option-other-input:focus {
  border-color: var(--e-global-color-secondary, #d9341f);
  box-shadow: 0 0 0 3px rgba(217, 52, 31, 0.12);
}
.spin-wheel-conc .option-other-counter {
  display: none;
  flex: 0 0 100%;
  width: 100%;
  text-align: right;
  font-size: 12px;
  color: #8B8B8B;
  margin-top: 3px;
}
.spin-wheel-conc .option-other-error {
  display: none;
  flex: 0 0 100%;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--e-global-color-secondary, #d9341f);
  margin-top: 4px;
}
.spin-wheel-conc .option-other-error.show {
  display: block;
}

/* ── Follow-up optional field ── */
.spin-wheel-conc .followup-wrap {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #F3F4F6;
}
.spin-wheel-conc .followup-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}
.spin-wheel-conc .followup-label::after {
  content: ' (Optional)';
  font-weight: 400;
  color: #8B8B8B;
}
.spin-wheel-conc .followup-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #D1D5DC;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.spin-wheel-conc .followup-input:focus {
  border-color: var(--e-global-color-secondary, #d9341f);
  box-shadow: 0 0 0 3px rgba(217, 52, 31, 0.12);
}
.spin-wheel-conc .followup-counter {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #8B8B8B;
  margin-top: 4px;
}

/* ── Nav row ── */
.spin-wheel-conc .nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 36px;
}
.spin-wheel-conc .nav-row.single {
  grid-template-columns: 1fr;
}
.spin-wheel-conc .btn-secondary,
.spin-wheel-conc .btn-next {
  width: 100%;
  height: 60px;
  border-radius: 34px;
  font-weight: 600;
}
.spin-wheel-conc .btn-secondary {
  background: #fff;
  color: var(--e-global-color-secondary, #d9341f);
  border: 2px solid var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .btn-secondary:hover {
  background: var(--e-global-color-secondary, #d9341f);
  color: #fff;
}
.spin-wheel-conc .btn-next {
  background: var(--e-global-color-secondary, #d9341f);
  color: #fff;
}
.spin-wheel-conc .btn-next:disabled {
  background: #EBEEEB;
  color: #8A8A8A;
  cursor: not-allowed;
}

/* ── Thank you ── */
.spin-wheel-conc .thankyou-card {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  border-top: 7px solid var(--e-global-color-secondary, #d9341f);
  padding: 40px;
}
.spin-wheel-conc .thankyou-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid #F3F4F6;
  margin-bottom: 30px;
}
.spin-wheel-conc .success-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #DCFCE7;
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 30px;
}
.spin-wheel-conc .thankyou-content p {
  margin-bottom: 20px;
}
.spin-wheel-conc .thankyou-content ul {
  padding-left: 20px;
  margin-bottom: 20px;
}
.spin-wheel-conc .thankyou-content li {
  margin-bottom: 9px;
}
.spin-wheel-conc .thankyou-content li::marker {
  color: var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .thankyou-content h4 {
  font-size: 21px;
  margin: 18px 0 22px;
}

/* ── Rewards grid ── */
.spin-wheel-conc .rewards-section {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 20px;
}
.spin-wheel-conc .rewards-grid {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.spin-wheel-conc .reward-box {
  display: flex;
  align-items: center;
  border: 1px solid #C8361A4D;
  border-radius: 12px;
  background: #FFF6F4;
  padding: 18px 10px;
}
.spin-wheel-conc .reward-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 0 12px;
}
.spin-wheel-conc .reward-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--e-global-color-secondary, #d9341f);
}
.spin-wheel-conc .reward-label {
  font-size: 13px;
  color: var(--muted);
}
.spin-wheel-conc .reward-divider {
  align-self: stretch;
  width: 1px;
  background: #C8361A4D;
}
.spin-wheel-conc .rewards-image {
  display: block;
  flex: 1 1 40%;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .spin-wheel-conc .rewards-section { flex-direction: column; }
  .spin-wheel-conc .rewards-image { flex: none; width: 100%; height: auto; }
}

@media (max-width: 480px) {
  .spin-wheel-conc .reward-box { padding: 14px 6px; }
  .spin-wheel-conc .reward-value { font-size: 18px; }
  .spin-wheel-conc .reward-label { font-size: 12px; }
}

/* ── Spin modal ── */
.spin-wheel-conc .spin-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.spin-wheel-conc .spin-modal.open {
  display: flex;
}
.spin-wheel-conc .spin-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.spin-wheel-conc .spin-modal-dialog {
  position: relative;
  z-index: 1;
  width: 95vw;
  max-width: 1000px;
  max-height: 95vh;
  border-radius: 12px;
  overflow: hidden;
}
.spin-wheel-conc .spin-modal-body {
  /* The dialog itself never scrolls, so the close button below (anchored
     to the dialog) stays pinned to the popup's own top-right corner —
     only this inner body scrolls when the reward view is too tall. */
  max-height: 95vh;
  overflow-y: auto;
}
.spin-wheel-conc .spin-modal-close {
  position: absolute;
  top: 10px;
  right: 65px;
  z-index: 2;
  background: transparent;
  border: 0;
  font-size: 40px;
  line-height: 1;
  color: #270601;
  cursor: pointer;
}
.spin-wheel-conc .spin-modal-close:hover {
  color: #1a1a2e;
}
.spin-wheel-conc .reward-message {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 24px;
}

/* ── Spin card ── */
.spin-wheel-conc .spin-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-top: 7px solid var(--e-global-color-secondary, #d9341f);
  border-radius: 12px;
  text-align: center;
  padding: 60px 40px 50px;
}
.spin-wheel-conc .reward-badge {
  border: 1px solid #C8361A4D;
  border-radius: 50px;
  background: #C8361A1A;
}
.spin-wheel-conc .spin-card h2 {
  font-size: 34px;
  line-height: 1.15;
  margin-top: 16px;
}
.spin-wheel-conc .spin-card > p {
  color: var(--muted);
  margin-bottom: 22px;
  margin-top: 8px;
}

/* ── Wheel ── */
.spin-wheel-conc .wheel-wrap {
  width: 475px;
  height: 475px;
  margin: 0 auto 28px;
  position: relative;
  display: grid;
  place-items: center;
}
.spin-wheel-conc .wheel-pointer {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 29px solid transparent;
  border-bottom: 29px solid transparent;
  border-right: 60px solid var(--e-global-color-secondary, #d9341f);
  z-index: 5;
  filter: drop-shadow(-2px 2px 2px rgba(0,0,0,.2));
}
.spin-wheel-conc .wheel {
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 8px solid #222;
  position: relative;
  overflow: hidden;
  transition: transform 8s cubic-bezier(0.15, 0.85, 0.25, 1);
  background: conic-gradient(
    #0f3f63   0deg   60deg,
    #f39a15  60deg  120deg,
    #2f6f8f 120deg  180deg,
    #7f38e8 180deg  240deg,
    #0aa44e 240deg  300deg,
    #d93a24 300deg  360deg
  );
  cursor: pointer;
}
.spin-wheel-conc .wheel::after {
  content: "";
  position: absolute;
  inset: 133px;
  background: #fff;
  border: 5px solid #222;
  border-radius: 50%;
  z-index: 3;
}
.spin-wheel-conc .wheel-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 4;
  font-weight: 900;
  font-size: 18px;
}
.spin-wheel-conc .wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 146px;
  height: 38px;
  margin-left: -73px;
  margin-top: -174px;
  transform-origin: 50% 174px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  z-index: 2; 
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.spin-wheel-conc .wheel-label:nth-child(1) { transform: rotate(30deg); }
.spin-wheel-conc .wheel-label:nth-child(2) { transform: rotate(90deg); }
.spin-wheel-conc .wheel-label:nth-child(3) { transform: rotate(150deg); }
.spin-wheel-conc .wheel-label:nth-child(4) { transform: rotate(210deg); }
.spin-wheel-conc .wheel-label:nth-child(5) { transform: rotate(270deg); }
.spin-wheel-conc .wheel-label:nth-child(6) { transform: rotate(330deg); }

/* ── Reward card ── */
.spin-wheel-conc .reward-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #F3F4F6;
  border-top: 7px solid var(--e-global-color-secondary, #d9341f);
  border-radius: 16px;
  padding: 60px 60px 50px;
  text-align: center;
}
.spin-wheel-conc .reward-card h1 {
  font-size: 26px;
}
.spin-wheel-conc .reward-prize-box {
  margin: 20px 0 24px;
  padding: 22px 24px;
  font-size: 24px !important;
  background: #fff6f4;
  border: 1px solid #f2beb3;
  border-radius: 16px;
}
.spin-wheel-conc .share-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
}
.spin-wheel-conc .share-icons a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
}
.spin-wheel-conc .share-facebook  { background: #1877f2; }
.spin-wheel-conc .share-x         { background: #000; }
.spin-wheel-conc .share-linkedin  { background: #0a66c2; font-size: 18px !important; }
.spin-wheel-conc .share-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

/* ── Confetti ── */
#confettiContainer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}
.confetti {
  position: absolute;
  top: -50px;
  font-size: 28px;
  animation: confettiFall linear forwards;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
@keyframes confettiFall {
  0%   { transform: translateY(-100px) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .spin-wheel-conc .page { padding: 24px 14px; }
  .spin-wheel-conc .benefits,
  .spin-wheel-conc .lead-form,
  .spin-wheel-conc .options,
  .spin-wheel-conc .nav-row { grid-template-columns: 1fr; }
  .spin-wheel-conc .question-body,
  .spin-wheel-conc .thankyou-card { padding: 32px 22px; }
  .spin-wheel-conc .thankyou-header { align-items: flex-start; }
  .spin-wheel-conc .wheel-wrap { width: 300px; height: 300px; }
  .spin-wheel-conc .wheel { width: 270px; height: 270px; }
  .spin-wheel-conc .wheel::after { inset: 82px; }
  .spin-wheel-conc .wheel-label {
    margin-top: -112px;
    transform-origin: 50% 112px;
    font-size: 12px;
  }
}

/* Shrink the modal content on short viewports so it always fits within
   95vh and the popup never needs its own scrollbar mid-spin. */
@media (max-height: 750px) {
  .spin-wheel-conc .spin-card { padding: 28px 24px 24px; }
  .spin-wheel-conc .spin-card h2 { font-size: 24px; margin-top: 8px; }
  .spin-wheel-conc .wheel-wrap { width: 280px; height: 280px; margin-bottom: 16px; }
  .spin-wheel-conc .wheel { width: 250px; height: 250px; }
  .spin-wheel-conc .wheel::after { inset: 76px; }
  .spin-wheel-conc .wheel-label {
    width: 100px;
    height: 28px;
    margin-left: -50px;
    margin-top: -100px;
    transform-origin: 50% 100px;
    font-size: 11px;
  }
  .spin-wheel-conc .reward-card { padding: 28px 24px; }
  .spin-wheel-conc .reward-card h1 { font-size: 20px; }
  .spin-wheel-conc .reward-prize-box { margin: 12px 0 16px; padding: 14px 18px; font-size: 18px !important; }
  .spin-wheel-conc .reward-message { margin-bottom: 16px; }
}
