/**
 * HZM Events – front styles.
 *
 * Scoped to .hzm-ev* only. Field, button and checkbox looks come from the
 * theme (.form-control, .btn-primary, .custom-checkbox), so the form matches
 * the contact form in both the classic- and hummingbird-based shops.
 */

.hzm-ev {
  margin-bottom: 2rem;
}

.hzm-ev__title {
  margin-bottom: 1.25rem;
}

.hzm-ev__intro {
  margin-bottom: 1.5rem;
}

.hzm-ev__messages:empty {
  display: none;
}

.hzm-ev__errors {
  margin: 0;
  padding-left: 1.25rem;
}

.hzm-ev__required {
  color: #ff4c4c;
  font-size: 1em;
  top: 0;
}

/* Bootstrap 5 themes (hummingbird) drop .form-group spacing and do not always
   ship .offset-md-3 — restore both inside our scope only. */
.hzm-ev .form-group {
  margin-bottom: 1rem;
}

.hzm-ev .row > .offset-md-3 {
  margin-left: 25%;
}

@media (max-width: 767px) {
  .hzm-ev .row > .offset-md-3 {
    margin-left: 0;
  }
}

.hzm-ev__privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

.hzm-ev__privacy-text {
  line-height: 1.35;
}

/* Honeypot — must stay in the DOM and out of sight. */
.hzm-ev__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hzm-ev__submit--busy {
  opacity: 0.6;
  pointer-events: none;
}

.hzm-ev__success {
  margin-bottom: 0;
}

.hzm-ev--closed .hzm-ev__closed-message {
  margin-bottom: 0;
}

/* Placeholder while the shortcode form is being fetched. */
.hzm-ev-placeholder--loading {
  min-height: 4rem;
  position: relative;
}

.hzm-ev-placeholder--loading::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: -0.75rem;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  animation: hzm-ev-spin 0.8s linear infinite;
}

@keyframes hzm-ev-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hzm-ev-placeholder--loading::after {
    animation: none;
  }
}

.hzm-ev-unsubscribe__summary ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.hzm-ev-unsubscribe__summary li {
  margin-bottom: 0.25rem;
}

@media print {
  .hzm-ev__form,
  .hzm-ev__hp {
    display: none !important;
  }
}
