/* ==========================================================
   POPUP REGISTRATION FORM
   Standalone styles – loaded via functions.php
   ========================================================== */

/* Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.popup-overlay.is-active {
  opacity: 0.95;
  visibility: visible;
}

/* Container */
.popup-form-wrap {
  position: relative;
  width: clamp(320px, 88vw, 720px) !important;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.5rem);
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.35s ease;
}
.popup-overlay.is-active .popup-form-wrap {
  transform: scale(1);
  opacity: 1;
}

/* Close button */
.popup-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  width: clamp(28px, 4vw, 36px);
  height: clamp(28px, 4vw, 36px);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 0.2s ease;
}
.popup-close:hover { opacity: 0.5; }
.popup-close svg {
  width: 100%;
  height: 100%;
  stroke: var(--color-primary);
  stroke-width: 1.5;
}

/* Logo */
.popup-logo {
  text-align: center;
  margin-bottom: clamp(1rem, 3vw, 1.75rem);
}
.popup-logo img {
  width: clamp(160px, 35vw, 230px);
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Heading */
.popup-form-wrap h4 {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  font-weight: 500;
  letter-spacing: clamp(2px, 0.4vw, 4px);
  text-transform: uppercase;
  text-align: center;
  color: var(--color-primary);
  margin: 0 0 clamp(0.5rem, 1.5vw, 1rem);
}

/* Intro text */
.popup-form-wrap .popup-intro {
  font-family: var(--font-body);
  font-size: clamp(0.825rem, 1.6vw, 0.95rem);
  font-weight: 300;
  line-height: 1.65;
  text-align: center;
  color: #333;
  margin: 0 auto clamp(1.25rem, 3vw, 2rem);
  max-width: 90%;
}
.popup-intro .seren-form-phone {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.popup-intro .seren-form-phone:hover { opacity: 0.7; }

/* Form grid */
.popup-register-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  max-width: 95%;
  margin: 0 auto;
}

/* Fields */
.popup-register-form .form-field {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: clamp(6px, 1vw, 10px);
}
.popup-register-form label {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.4vw, 0.825rem);
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #000;
  white-space: nowrap;
}
.popup-register-form input {
  flex: 1;
  width: 100%;
  padding: clamp(6px, 1vw, 8px) 0;
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.4vw, 1rem) !important;
  height: auto !important;
  letter-spacing: 0.3px;
  color: #000;
  background: transparent;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
.popup-register-form input::placeholder { color: transparent; }
.popup-register-form input:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

/* Comments textarea */
.popup-register-form .form-field.full-width {
  grid-column: 1 / -1;
}
.popup-register-form textarea {
  flex: 1;
  width: 100%;
  padding: clamp(6px, 1vw, 8px) 0;
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.4vw, 1rem) !important;
  height: auto !important;
  letter-spacing: 0.3px;
  color: #000;
  background: transparent;
  box-sizing: border-box;
  -webkit-appearance: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.popup-register-form textarea:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

/* Submit */
.popup-register-form .form-submit-row {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
}
.popup-register-form .form-submit-row .button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.4vw, 0.825rem);
  font-weight: 400;
  letter-spacing: clamp(2px, 0.3vw, 3px);
  text-transform: uppercase;
  color: #fff;
  background: #6693b6e8;
  text-decoration: none;
  padding: clamp(8px, 1.4vw, 12px) clamp(30px, 7vw, 55px);
  border: none;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.popup-register-form .form-submit-row .button:hover { opacity: 0.85; }

/* Mobile single-column */
@media (max-width: 540px) {
  .popup-register-form {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .popup-register-form .form-field {
    flex-direction: column;
    gap: 2px;
  }
  .popup-register-form label {
    line-height: 1;
  }
  .popup-register-form input {
    margin-top: 0;
  }
  .popup-intro .seren-form-phone {
    display: block;
    margin-top: 5px;
  }
}
/* ==========================================================
   HUBSPOT FORM OVERRIDES
   Scoped to #kiama-hubspot-form to avoid bleed
   ========================================================== */

/* Two-column grid matching original form layout */
#kiama-hubspot-form .hs-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(1rem, 3vw, 2rem);
  row-gap: clamp(1rem, 2.5vw, 1.5rem);
  max-width: 95%;
  margin: 0 auto;
}

/* Field groups — one column by default */
#kiama-hubspot-form .hs-form-field {
  margin-bottom: 0;
}

/* Comments, submit, legal, reCAPTCHA — full width */
#kiama-hubspot-form .hs_comment,
#kiama-hubspot-form .hs_submit,
#kiama-hubspot-form .legal-consent-container,
#kiama-hubspot-form .hs-recaptcha {
  grid-column: 1 / -1;
}

#kiama-hubspot-form .hs_submit {
  text-align: center;
}

/* Labels */
#kiama-hubspot-form label {
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.5px !important;
  text-transform: none !important;
  color: #000 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

/* Text inputs */
#kiama-hubspot-form input[type="text"],
#kiama-hubspot-form input[type="email"],
#kiama-hubspot-form input[type="tel"] {
  width: 100% !important;
  padding: clamp(6px, 1vw, 8px) 0 !important;
  border: none !important;
  border-bottom: 1px solid #000 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.75rem, 1.4vw, 1rem) !important;
  font-weight: 300 !important;
  height: auto !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#kiama-hubspot-form input[type="text"]:focus,
#kiama-hubspot-form input[type="email"]:focus,
#kiama-hubspot-form input[type="tel"]:focus {
  border-bottom-color: var(--color-primary) !important;
}

/* Textarea (Comments) */
#kiama-hubspot-form textarea {
  width: 100% !important;
  padding: clamp(6px, 1vw, 8px) 0 !important;
  border: none !important;
  border-bottom: 1px solid #000 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.75rem, 1.4vw, 1rem) !important;
  font-weight: 300 !important;
  height: auto !important;
  min-height: 60px !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  resize: vertical !important;
}

#kiama-hubspot-form textarea:focus {
  border-bottom-color: var(--color-primary) !important;
}

/* Submit button */
#kiama-hubspot-form input[type="submit"],
#kiama-hubspot-form .hs-button {
  display: inline-block !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: clamp(2px, 0.3vw, 3px) !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: #6693b6 !important;
  padding: clamp(8px, 1.4vw, 12px) clamp(30px, 7vw, 55px) !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: opacity 0.25s ease !important;
  margin-top: 0 !important;
}
#kiama-hubspot-form input[type="submit"]:hover,
#kiama-hubspot-form .hs-button:hover {
  opacity: 0.85 !important;
}

/* Error messages */
#kiama-hubspot-form .hs-error-msgs {
  font-size: 11px !important;
  color: #c00 !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 4px 0 0 !important;
}

/* reCAPTCHA spacing */
#kiama-hubspot-form .hs-recaptcha {
  margin-bottom: 8px !important;
}

/* Mobile: single column */
@media (max-width: 540px) {
  #kiama-hubspot-form .hs-form {
    grid-template-columns: 1fr !important;
  }
}
