/* ==========================================================================
   Article enquiry pop-up - styles the HubSpot form (classic embed, loaded with css: '').
   Same look as the Klass pop-up (assets/css/klass/enquiry.css), with olg-enquiry class
   names so the two never affect each other. Loaded by inc/article-revamp.php.
   ========================================================================== */
html.olg-enquiry-open {
  overflow: hidden;
}
.olg-enquiry {
  /* margin:auto centres the dialog */
  margin: auto;
  width: min(92vw, 700px);
  max-width: none;
  max-height: calc(100vh - 40px);
  padding: 30px 32px 24px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  color: #333f48;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.5;
}
.olg-enquiry::backdrop {
  background: rgba(51, 63, 72, 0.62);
}
.olg-enquiry[open] {
  animation: olg-enquiry-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes olg-enquiry-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.olg-enquiry-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6b7780;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.olg-enquiry-close:hover {
  background: #ececef;
  color: #333f48;
}
.olg-enquiry h2.olg-enquiry-title {
  margin: 0 0 4px;
  padding: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #333f48;
}
.olg-enquiry-context {
  margin: 0 0 18px;
  font-size: 14px;
  color: #6b7780;
}
.olg-enquiry-loading {
  margin: 30px 0;
  color: #6b7780;
  text-align: center;
}
.olg-enquiry-promise {
  margin: 12px 0 0;
  font-size: 13px;
  font-style: italic;
  color: #6b7780;
  text-align: center;
}

/* ---------- HubSpot form markup ---------- */
.olg-enquiry .hs-form fieldset {
  max-width: none !important;
  margin: 0;
  padding: 0;
  border: 0;
}
.olg-enquiry .hs-form fieldset.form-columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
}
.olg-enquiry .hs-form fieldset .hs-form-field {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
}
.olg-enquiry .hs-form-field {
  margin-bottom: 14px;
}
.olg-enquiry .hs-form-field > label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #5c6770;
}
.olg-enquiry .hs-form-required {
  margin-left: 2px;
  color: #94193b;
}
.olg-enquiry .hs-form .input {
  margin: 0 !important;
}
.olg-enquiry .hs-input:not([type="radio"]):not([type="checkbox"]) {
  width: 100% !important;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #b2b4b2;
  border-radius: 4px;
  background: #ffffff;
  color: #333f48;
  font-size: 15px;
  line-height: 1.3;
}
.olg-enquiry .hs-input:not([type="radio"]):not([type="checkbox"]):focus {
  outline: none;
  border-color: #00a7b5;
  box-shadow: 0 0 0 3px rgba(0, 167, 181, 0.18);
}
.olg-enquiry .hs-input.invalid.error {
  border-color: #b3261e !important;
}

/* "I am..." radios and "Files needed" checkboxes */
.olg-enquiry .hs_lead_pot > label {
  color: #94193b;
}
.olg-enquiry .inputs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.olg-enquiry .inputs-list li {
  margin: 0 0 8px;
}
.olg-enquiry .hs-form-radio-display,
.olg-enquiry .hs-form-checkbox-display,
.olg-enquiry .hs-form-booleancheckbox-display {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  font-weight: 400;
  color: #333f48;
  cursor: pointer;
}
.olg-enquiry .hs-form-radio-display input,
.olg-enquiry .hs-form-checkbox-display input,
.olg-enquiry .hs-form-booleancheckbox-display input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #94193b;
}

/* Consent and privacy text */
.olg-enquiry .legal-consent-container {
  margin: 4px 0 6px;
}
.olg-enquiry .legal-consent-container .hs-richtext,
.olg-enquiry .legal-consent-container .hs-richtext p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: #6b7780;
}
.olg-enquiry .legal-consent-container .hs-form-booleancheckbox-display {
  font-size: 14px;
}
/* HubSpot indents the consent label; keep it next to its checkbox */
.olg-enquiry .legal-consent-container .hs-form-booleancheckbox-display > span {
  margin-left: 0 !important;
}
.olg-enquiry .legal-consent-container a {
  color: #94193b;
  text-decoration: underline;
}

/* Errors */
.olg-enquiry .hs-error-msgs {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}
.olg-enquiry .hs-error-msg,
.olg-enquiry .hs-error-msgs label {
  font-size: 12.5px;
  font-weight: 400;
  color: #b3261e;
}
.olg-enquiry .hs_error_rollup {
  display: none;
}

/* reCAPTCHA badge and submit */
.olg-enquiry .hs_recaptcha {
  margin: 6px 0 12px;
}
.olg-enquiry .hs_submit .actions {
  margin: 0;
  padding: 0;
}
/* Colours are set directly: the Klass page's --btn-bg buttons (klass/base.css) aren't loaded here */
.olg-enquiry .hs-button {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 30px;
  background: #94193b;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.olg-enquiry .hs-button:hover {
  background: #7a1430;
  color: #ffffff;
}
.olg-enquiry .hs-button:focus-visible {
  outline: 2px solid #00a7b5;
  outline-offset: 3px;
}

/* ---------- Thank-you step ---------- */
.olg-enquiry-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0 6px;
  text-align: center;
}
.olg-enquiry-thanks[hidden] {
  display: none;
}
.olg-enquiry-tick {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e3f1e8;
  color: #2e7d4f;
  font-size: 28px;
  font-weight: 700;
}
.olg-enquiry-thanks p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}
.olg-enquiry-thanks .olg-enquiry-small {
  font-size: 13px;
  color: #6b7780;
}
.olg-enquiry-back {
  margin-top: 6px;
  padding: 11px 26px;
  border: 2px solid #94193b;
  border-radius: 30px;
  background: #ffffff;
  color: #94193b;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.olg-enquiry-back:hover {
  background: #94193b;
  color: #ffffff;
}
.olg-enquiry-back:focus-visible,
.olg-enquiry-close:focus-visible {
  outline: 2px solid #00a7b5;
  outline-offset: 3px;
}

/* ---------- Small screens ---------- */
@media screen and (max-width: 600px) {
  .olg-enquiry {
    width: 100vw;
    max-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 26px 18px 20px;
    border-radius: 0;
  }
  .olg-enquiry .hs-form fieldset.form-columns-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .olg-enquiry h2.olg-enquiry-title {
    font-size: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .olg-enquiry[open] {
    animation: none;
  }
  .olg-enquiry .hs-button,
  .olg-enquiry-back {
    transition: none;
  }
}
