/* ==========================================================
   CANDLE LEAD — перехід між Stage 2 та Stage 3
   ========================================================== */

.cohbg-candle-lead {
  position: relative;
  border-radius: 28px;
  padding: 10px 40px 40px;
  background: radial-gradient(circle at top, #111827 0%, #020617 45%, #000000 100%);
  color: #e5e7eb;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Inter",
    sans-serif;
  overflow: hidden;
}

.cohbg-candle-lead__content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.cohbg-candle-lead__title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  color: #f9fafb;
  margin-bottom: 25px;
  padding-bottom: unset;
}

.cohbg-candle-lead__subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: #9ca3af;
  margin-bottom: 18px;
}

/* ----------------------------------------------------------
   СЦЕНА: свічка + сірник + форма
   ---------------------------------------------------------- */

.cohbg-candle-lead__scene {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 760px;
  min-height: 360px;
  overflow: visible;
}

/* ----------------------------------------------------------
   СВІЧКА
   ---------------------------------------------------------- */

.cohbg-candle-lead__candle {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 160px;
  height: 200px;
  pointer-events: none;
}

.cohbg-candle-lead__candle-glow {
  display: none;
}

.cohbg-candle-lead__candle-body {
  position: absolute;
  left: 50%;
  bottom: 0px;
  transform: translateX(-50%);
  width: 140px;
  height: 165px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  z-index: 2;
}

.cohbg-candle-lead__candle-wick {
  position: absolute;
  left: 50%;
  bottom: 120px;
  width: 12px;
  height: 16px;
  transform: translateX(-50%);
  z-index: 2;
}

.cohbg-candle-lead__candle-hotspot {
  position: absolute;
  left: 50%;
  bottom: 128px;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  z-index: 3;
}

.cohbg-candle-lead__candle-flame {
  position: absolute;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  width: 32px;
  height: 60px;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.cohbg-candle-lead__candle-flame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 15%, #fef3c7 0%, #f97316 40%, #b45309 100%);
  filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.85));
}

.cohbg-candle-lead__candle--lit .cohbg-candle-lead__candle-flame::before {
  animation: cohbg-candle-lead-flame 1.2s ease-in-out infinite alternate;
}

@keyframes cohbg-candle-lead-flame {
  0% {
    transform: scale(1) translateY(0);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.05) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: scale(0.96) translateY(1px);
    opacity: 0.9;
  }
}

.cohbg-candle-lead__candle--unlit .cohbg-candle-lead__candle-body {
  background-image: url('../img/lead/candle-off.png');
}

.cohbg-candle-lead__candle--lit .cohbg-candle-lead__candle-body {
  background-image: url('../img/lead/candle-on.png');
}

.cohbg-candle-lead__candle--lit .cohbg-candle-lead__candle-flame {
  opacity: 1;
}

/* ----------------------------------------------------------
   СІРНИК (PNG-картинка, draggable)
   ---------------------------------------------------------- */

.cohbg-candle-lead__match {
  position: absolute;
  right: 18px;
  bottom: 40px;
  border: none;
  padding: 0;
  cursor: grab;
  touch-action: none;
  background: transparent;
  background-color: unset !important;
  width: 130px;
  height: 70px;

  background-image: url('../img/lead/match-lit.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  display: block;

  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
  z-index: 4;

  transition:
    transform 0.15s ease-out,
    opacity 0.3s ease-out,
    filter 0.3s ease-out;
}

.cohbg-candle-lead__match:active {
  cursor: grabbing;
}

.cohbg-candle-lead__match--used {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  filter: grayscale(1) opacity(0);
}

.cohbg-candle-lead__match-flame,
.cohbg-candle-lead__match-stick {
  display: none;
}

/* ----------------------------------------------------------
   ФОРМА НАД СВІЧКОЮ (всередині сцени)
   ---------------------------------------------------------- */

.cohbg-candle-lead__form-wrapper {
  position: absolute;
  left: 50%;
  top: -40px;
  transform: translateX(-50%);
  max-width: 560px;
  width: 100%;
  padding: 14px 22px 20px;
  text-align: left;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  z-index: 5;
}

.cohbg-candle-lead__form-wrapper::before {
  content: '';
  position: absolute;
  inset: -70px -70px -160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.95) 0%, transparent 70%);
  opacity: 1;
  z-index: -1;
}

.cohbg-candle-lead__form-wrapper--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.cohbg-candle-lead__form-wrapper--hidden::before {
  opacity: 0;
}

.cohbg-candle-lead__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cohbg-candle-lead__fields-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cohbg-candle-lead__field {
  flex: 1 1 0;
  min-width: 0;
}

.cohbg-candle-lead__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fefce8;
  margin-bottom: 6px;
}

.cohbg-candle-lead__input {
  width: 100%;
  border-radius: 999px !important;
  border: 1px solid rgba(254, 240, 138, 0.9) !important;
  background: rgba(15, 23, 42, 0.65);
  color: #f9fafb !important;
  padding: 10px 16px !important;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.cohbg-candle-lead__input::placeholder {
  color: rgba(249, 250, 251, 0.75);
}

.cohbg-candle-lead__input:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.9);
  background: rgba(15, 23, 42, 0.9);
}

.cohbg-candle-lead__field--error .cohbg-candle-lead__input {
  border-color: #f97373;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6);
}

.cohbg-candle-lead__error {
  margin-top: 4px;
  font-size: 12px;
  color: #fecaca;
  min-height: 14px;
}

.cohbg-candle-lead__checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
}

.cohbg-candle-lead__checkbox {
  margin-top: 3px;
  width: 16px;
  height: 16px;
}

.cohbg-candle-lead__checkbox-label {
  font-size: 13px;
  line-height: 1.45;
  color: #fefce8;
}

.cohbg-candle-lead__checkbox-row--error .cohbg-candle-lead__checkbox-label {
  color: #fecaca;
}

/* ----------------------------------------------------------
   КНОПКИ
   ---------------------------------------------------------- */

.cohbg-candle-lead__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.cohbg-candle-lead__btn {
  min-height: 40px;
  border-radius: 999px;
  padding-inline: 18px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cohbg-candle-lead__btn .cohbg-btn-label {
  color: inherit;
}

.cohbg-candle-lead .cohbg-candle-lead__btn--primary {
  background: #a2cbef;
  color: #1e1e1e;
  border: none;
  box-shadow: 0 10px 25px rgba(162, 203, 239, 0.55);
}

.cohbg-candle-lead .cohbg-candle-lead__btn--primary:hover {
  filter: brightness(1.03);
}

.cohbg-candle-lead .cohbg-candle-lead__btn--ghost {
  background: #ea997d;
  color: #1e1e1e;
  border: none;
  box-shadow: 0 10px 25px rgba(234, 153, 125, 0.55);
}

.cohbg-candle-lead .cohbg-candle-lead__btn--ghost:hover {
  filter: brightness(1.03);
}

.cohbg-candle-lead__btn .cohbg-btn-icon {
  display: inline-block;
  flex-shrink: 0;
}

.cohbg-candle-lead .cohbg-candle-lead__btn--primary .cohbg-btn-icon--mail {
  width: 30px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='31' height='20' viewBox='0 0 31 20' fill='none'%3E%3Cg clip-path='url(%23clip0_6654_99908)'%3E%3Cpath d='M30.3212 1.71012V18.2893C30.3212 19.2339 29.535 19.9994 28.571 19.9994H1.74817C0.784169 19.9994 0 19.2333 0 18.2893V1.71012C0 1.51358 0.0340943 1.32639 0.0982719 1.1499L13.0267 11.294C13.6919 11.8167 14.4888 12.0775 15.2863 12.0775C16.0838 12.0775 16.8814 11.8161 17.5459 11.294L30.2711 1.30834C30.3032 1.43803 30.3212 1.57174 30.3212 1.71012Z' fill='%231E1E1E'/%3E%3Cpath d='M28.9614 0.0447906L16.4013 9.90273C15.7455 10.4162 14.827 10.4182 14.1712 9.90073L1.56763 0.0113648C1.62712 0.00467961 1.68662 0 1.74813 0H28.571C28.706 0 28.8357 0.0180499 28.9614 0.0447906Z' fill='%231E1E1E'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_6654_99908'%3E%3Crect width='30.3212' height='20' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
}

.cohbg-candle-lead .cohbg-candle-lead__btn--ghost .cohbg-btn-icon--arrow {
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3.33789 7C5.06694 4.01099 8.29866 2 12.0001 2C17.5229 2 22.0001 6.47715 22.0001 12C22.0001 17.5228 17.5229 22 12.0001 22C8.29866 22 5.06694 19.989 3.33789 17M12 16L16 12M16 12L12 8M16 12H2' stroke='%231E1E1E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.cohbg-candle-lead__btn[disabled],
.cohbg-candle-lead__btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.cohbg-candle-lead__btn[disabled]:hover,
.cohbg-candle-lead__btn[aria-disabled='true']:hover {
  filter: none;
}

/* ----------------------------------------------------------
   THANK YOU MODAL
   ---------------------------------------------------------- */

.cohbg-candle-lead__thanks-backdrop {
  backdrop-filter: blur(4px);
}

.cohbg-candle-lead__thanks-modal {
  max-width: 360px;
}

.cohbg-candle-lead__thanks-btn {
  min-width: 140px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1024px) {
  .cohbg-candle-lead {
    padding: 24px 20px 32px;
    border-radius: 24px;
  }

  .cohbg-candle-lead__title {
    font-size: 26px;
  }

  .cohbg-candle-lead__scene {
    max-width: 100%;
    min-height: 400px;
  }

  .cohbg-candle-lead__form-wrapper {
    max-width: 580px;
    top: -36px;
  }

  .cohbg-candle-lead__form-wrapper::before {
    inset: -70px -60px -165px;
  }
}

@media (max-width: 768px) {
  .cohbg-candle-lead {
    padding: 22px 16px 28px;
  }

  .cohbg-candle-lead__title {
    font-size: 22px;
  }

  .cohbg-candle-lead__subtitle {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .cohbg-candle-lead__scene {
    min-height: 420px;
  }

  .cohbg-candle-lead__candle {
    width: 140px;
    height: 180px;
  }
	
 .cohbg-candle-lead__scene--expanded {
    min-height: 520px;
  }

  .cohbg-candle-lead__candle-body {
    width: 120px;
    height: 160px;
  }

  .cohbg-candle-lead__form-wrapper {
    max-width: 100%;
    padding-inline: 14px;
    top: -28px;
  }

  .cohbg-candle-lead__form-wrapper::before {
    inset: -60px -40px -155px;
  }

  .cohbg-candle-lead__fields-row {
    flex-direction: column;
  }

  .cohbg-candle-lead__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cohbg-candle-lead__btn {
    width: 100%;
  }

  .cohbg-candle-lead__match {
    right: 12px;
    bottom: 28px;
    width: 120px;
    height: 64px;
  }
}

@media (max-width: 480px) {
  .cohbg-candle-lead {
    padding: 20px 14px 24px;
  }

  .cohbg-candle-lead__title {
    font-size: 20px;
  }

  .cohbg-candle-lead__scene {
  }
 .cohbg-candle-lead__scene--expanded {
    min-height: 560px;
  }

  .cohbg-candle-lead__candle {
    width: 130px;
    height: 170px;
  }

  .cohbg-candle-lead__candle-body {
    width: 110px;
    height: 150px;
  }

  .cohbg-candle-lead__form-wrapper {
    top: -24px;
  }

  .cohbg-candle-lead__match {
    right: 10px;
    bottom: 24px;
    width: 110px;
    height: 58px;
  }
	
	
.cohbg-candle-lead__candle-flame {
  bottom: 100px;
}
}
