.haotechcw-event {
  --event-accent: var(--haotechcw-event-card-accent, #6b42c6);
  --event-title: var(--haotechcw-event-card-title, #231f41);
  --event-text: var(--haotechcw-event-card-text, #3f3a5d);
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  color: var(--event-text);
  font-family: inherit;
}

.haotechcw-event-modal-open {
  overflow: hidden;
}

.haotechcw-event-card,
.haotechcw-event-form-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--event-accent) 10%, transparent), transparent 38%),
    var(--haotechcw-event-card-bg, #fff);
  box-shadow: 0 24px 60px rgba(35, 31, 65, 0.16);
}

.haotechcw-event-card::before,
.haotechcw-event-form-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--event-accent), color-mix(in srgb, var(--event-accent) 70%, #ffffff));
}

.haotechcw-event-card {
  display: grid;
  gap: 9px;
  max-width: 390px;
  margin: 0 auto;
  padding: 26px 24px 22px;
  text-align: center;
}

.haotechcw-event-minimize,
.haotechcw-event-form-close {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid color-mix(in srgb, var(--event-accent) 70%, #ffffff);
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.94);
  color: var(--event-accent);
  cursor: pointer;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(35, 31, 65, 0.14);
  transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.haotechcw-event-minimize {
  top: 12px;
  right: 12px;
}

.haotechcw-event-form-close {
  top: 20px;
  right: 20px;
}

.haotechcw-event-minimize:hover,
.haotechcw-event-minimize:focus,
.haotechcw-event-form-close:hover,
.haotechcw-event-form-close:focus {
  border-color: var(--event-accent);
  color: var(--event-title);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(35, 31, 65, 0.2);
}

.haotechcw-event-kicker {
  margin: 0;
  padding: 0 44px 0 8px;
  color: var(--haotechcw-event-card-muted, #6b42c6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.haotechcw-event-card h2 {
  margin: 0;
  color: var(--event-title);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 650;
  line-height: 1.08;
}

.haotechcw-event-date {
  color: var(--haotechcw-event-card-muted, #6b42c6);
  font-size: 16px;
  font-weight: 700;
}

.haotechcw-event-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 8px;
  margin: 2px 0 6px;
}

.haotechcw-event-countdown > div {
  padding: 9px 5px;
  border: 1px solid rgba(35, 31, 65, 0.1);
  border-radius: 16px;
  background: var(--haotechcw-event-card-box-bg, #f4f4f7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.haotechcw-event-countdown strong {
  display: block;
  color: var(--event-title);
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
}

.haotechcw-event-countdown span {
  display: block;
  margin-top: 4px;
  color: var(--haotechcw-event-card-muted, #6b42c6);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.haotechcw-event-ready {
  margin: 8px 0 10px;
  color: var(--event-accent);
  font-size: 16px;
  font-weight: 650;
}

.haotechcw-event-button,
.haotechcw-event-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--haotechcw-event-button-bg, #6b42c6);
  color: var(--haotechcw-event-button-text, #fff) !important;
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--haotechcw-event-button-bg, #6b42c6) 32%, transparent);
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.haotechcw-event-button {
  gap: 10px;
  width: 100%;
  max-width: 350px;
  justify-self: center;
  padding: 0 20px 0 8px;
  animation: haotechcw-event-pulse 2s infinite;
}

.haotechcw-event-button-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(35, 31, 65, 0.08), 0 8px 18px rgba(35, 31, 65, 0.12);
}

.haotechcw-event-button-icon img {
  width: 22px;
  height: 22px;
}

.haotechcw-event-button:hover,
.haotechcw-event-button:focus,
.haotechcw-event-submit:hover,
.haotechcw-event-submit:focus {
  background: var(--haotechcw-event-button-bg-hover, #231f41);
  color: var(--haotechcw-event-button-text-hover, #fff) !important;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(35, 31, 65, 0.26);
}

.haotechcw-event-form {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-items: center;
  max-width: none;
  margin: 0;
  padding: 22px;
  overflow-y: auto;
  background: rgba(15, 12, 31, 0.52);
  backdrop-filter: blur(10px);
}

.haotechcw-event.is-form-open .haotechcw-event-form {
  display: grid;
}

.haotechcw-event.is-form-open:not(.is-minimized) .haotechcw-event-card {
  display: grid;
}

.haotechcw-event-form-panel {
  display: grid;
  width: min(100%, 620px);
  gap: 15px;
  padding: 36px 30px 30px;
  animation: haotechcw-event-modal-in .22s ease-out;
}

.haotechcw-event-form-head {
  max-width: 620px;
  padding-right: 54px;
}

.haotechcw-event-form-head h3 {
  margin: 0 0 8px;
  color: var(--event-title);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 650;
  line-height: 1.08;
}

.haotechcw-event-form-head p {
  margin: 0;
  color: var(--event-text);
  font-size: 17px;
  line-height: 1.55;
}

.haotechcw-event-form label {
  display: grid;
  gap: 9px;
  color: var(--event-title);
  font-weight: 650;
}

.haotechcw-event-form label span {
  font-size: 15px;
}

.haotechcw-event-form b {
  color: var(--event-accent);
}

.haotechcw-event .haotechcw-event-form input[type="text"],
.haotechcw-event .haotechcw-event-form input[type="email"] {
  width: 100% !important;
  min-height: 60px !important;
  padding: 16px 20px !important;
  border: 1px solid color-mix(in srgb, var(--event-accent) 20%, #d7d3e7) !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), color-mix(in srgb, var(--haotechcw-event-card-bg, #fff) 88%, #f4f4f7)) !important;
  color: var(--event-title) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 10px 24px rgba(35, 31, 65, 0.05) !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease !important;
}

.haotechcw-event .haotechcw-event-form input[type="text"]::placeholder,
.haotechcw-event .haotechcw-event-form input[type="email"]::placeholder {
  color: color-mix(in srgb, var(--event-text) 58%, #ffffff) !important;
  font-weight: 600;
}

.haotechcw-event .haotechcw-event-form input[type="text"]:focus,
.haotechcw-event .haotechcw-event-form input[type="email"]:focus {
  outline: 0 !important;
  border-color: var(--event-accent) !important;
  background: #fff !important;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--event-accent) 14%, transparent),
    0 14px 28px rgba(35, 31, 65, 0.08) !important;
}

.haotechcw-event .haotechcw-event-form button.haotechcw-event-submit {
  width: max-content;
  min-width: 220px;
  min-height: 56px !important;
  margin-top: 8px;
  padding: 0 30px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--haotechcw-event-button-bg, #6b42c6) !important;
  color: var(--haotechcw-event-button-text, #ffffff) !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  text-align: center !important;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--haotechcw-event-button-bg, #6b42c6) 32%, transparent) !important;
  appearance: none;
}

.haotechcw-event .haotechcw-event-form button.haotechcw-event-submit:hover,
.haotechcw-event .haotechcw-event-form button.haotechcw-event-submit:focus {
  border: 0 !important;
  background: var(--haotechcw-event-button-bg-hover, #231f41) !important;
  color: var(--haotechcw-event-button-text-hover, #ffffff) !important;
  box-shadow: 0 18px 36px rgba(35, 31, 65, 0.26) !important;
}

.haotechcw-event-success,
.haotechcw-event-error {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 650;
  line-height: 1.45;
}

.haotechcw-event-success {
  border: 1px solid rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .1);
  color: #166534;
}

.haotechcw-event-error {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #9f1239;
}

.haotechcw-event-success[hidden],
.haotechcw-event-error[hidden] {
  display: none;
}

.haotechcw-event-mini {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 2px solid color-mix(in srgb, var(--event-accent) 72%, #ffffff);
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.96);
  color: var(--event-accent);
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(35, 31, 65, 0.22);
  animation: haotechcw-event-float-pulse 2.4s infinite;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.haotechcw-event:not(.is-minimized) .haotechcw-event-mini {
  display: none !important;
}

.haotechcw-event-mini:hover,
.haotechcw-event-mini:focus {
  border-color: var(--event-accent);
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(35, 31, 65, 0.28);
}

.haotechcw-event-mini img {
  width: 31px;
  height: 31px;
}

.haotechcw-event.is-minimized .haotechcw-event-card,
.haotechcw-event.is-minimized .haotechcw-event-form {
  display: none;
}

.haotechcw-event.is-minimized .haotechcw-event-mini {
  display: inline-flex;
}

@keyframes haotechcw-event-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--haotechcw-event-button-bg, #6b42c6) 32%, transparent);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 18px 38px color-mix(in srgb, var(--haotechcw-event-button-bg, #6b42c6) 46%, transparent);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--haotechcw-event-button-bg, #6b42c6) 32%, transparent);
  }
}

@keyframes haotechcw-event-float-pulse {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes haotechcw-event-modal-in {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 680px) {
  .haotechcw-event {
    max-width: min(100%, 390px);
  }

  .haotechcw-event-card {
    padding: 28px 18px 20px;
  }

  .haotechcw-event-kicker {
    padding: 0 46px 0 8px;
  }

  .haotechcw-event-countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .haotechcw-event-form {
    padding: 16px;
  }

  .haotechcw-event-form-panel {
    padding: 34px 20px 22px;
    border-radius: 22px;
  }

  .haotechcw-event-form-head {
    padding-right: 44px;
  }

  .haotechcw-event-form-head h3 {
    font-size: 27px;
  }

  .haotechcw-event-submit,
  .haotechcw-event-button {
    width: 100%;
  }
}
