/* ==========================================================
   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(180px, 35vw, 270px);
  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 .lasverandas-form-phone {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.popup-intro .lasverandas-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 !important;
  border: none !important;
  border-bottom: 1px solid #000 !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  background: transparent !important;
  height: auto !important;
  box-shadow: none !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
.popup-register-form input::placeholder { color: #999; }
.popup-register-form input: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.65rem, 1.3vw, 0.8rem);
  font-weight: 400;
  letter-spacing: clamp(2px, 0.3vw, 3px);
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  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; }

/* Full-width fields (timeline, message) */
.popup-register-form .form-field-full {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4px, 0.8vw, 8px);
}

/* Select dropdown */
.popup-register-form select {
  width: 100%;
  padding: clamp(8px, 1.2vw, 12px) clamp(8px, 1vw, 12px) !important;
  border: 1px solid #ccc !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  background: #fff !important;
  height: auto !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.popup-register-form select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Textarea */
.popup-register-form textarea {
  width: 100%;
  padding: clamp(8px, 1.2vw, 12px) !important;
  border: 1px solid #ccc !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  background: #fff !important;
  height: auto !important;
  box-shadow: none !important;
  resize: vertical;
  min-height: 80px;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
.popup-register-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.popup-register-form textarea::placeholder {
  color: #999;
}

/* Privacy note */
.popup-privacy {
  font-family: var(--font-body);
  font-size: clamp(0.6rem, 1.2vw, 0.72rem);
  color: #888;
  text-align: center;
  margin-top: clamp(0.75rem, 1.5vw, 1rem);
  letter-spacing: 0.3px;
}

/* 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 .lasverandas-form-phone {
    display: block;
    margin-top: 5px;
  }
}
/* ==========================================================
   HUBSPOT EMBEDDED FORM OVERRIDES
   Scoped to popup — forces HS markup to match site aesthetic
   ========================================================== */

/* Container reset */
.popup-form-wrap .hs-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;
}

/* Each field wrapper */
.popup-form-wrap .hs-form-field {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: clamp(6px, 1vw, 10px);
}

/* Full-width fields — textarea, select, and hidden fields */
.popup-form-wrap .hs-form-field.hs-fieldtype-textarea,
.popup-form-wrap .hs-form-field.hs-fieldtype-select,
.popup-form-wrap .hs-form-field.field.hs-form-field:has(textarea),
.popup-form-wrap .hs-form-field.field.hs-form-field:has(select) {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4px, 0.8vw, 8px);
}

/* Hide hidden fields completely */
.popup-form-wrap .hs-form-field.hs-fieldtype-hidden {
  display: none !important;
}

/* Labels */
.popup-form-wrap .hs-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;
  color: #000 !important;
  white-space: nowrap;
}

/* Required asterisk — match color */
.popup-form-wrap .hs-form label .hs-form-required {
  color: #000 !important;
}

/* Input wrapper — let it fill */
.popup-form-wrap .hs-form .input {
  flex: 1;
  width: 100%;
}

/* Text inputs */
.popup-form-wrap .hs-form input.hs-input[type="text"],
.popup-form-wrap .hs-form input.hs-input[type="email"],
.popup-form-wrap .hs-form input.hs-input[type="tel"],
.popup-form-wrap .hs-form input.hs-input[type="number"] {
  width: 100% !important;
  padding: clamp(6px, 1vw, 8px) 0 !important;
  border: none !important;
  border-bottom: 1px solid #000 !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  background: transparent !important;
  height: auto !important;
  box-shadow: none !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
.popup-form-wrap .hs-form input.hs-input::placeholder { color: #999 !important; }
.popup-form-wrap .hs-form input.hs-input:focus {
  outline: none !important;
  border-bottom-color: var(--color-primary) !important;
}

/* Select dropdown */
.popup-form-wrap .hs-form select.hs-input {
  width: 100% !important;
  padding: clamp(8px, 1.2vw, 12px) clamp(8px, 1vw, 12px) !important;
  border: 1px solid #ccc !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  background: #fff !important;
  height: auto !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.popup-form-wrap .hs-form select.hs-input:focus {
  outline: none !important;
  border-color: var(--color-primary) !important;
}

/* Textarea */
.popup-form-wrap .hs-form textarea.hs-input {
  width: 100% !important;
  padding: clamp(8px, 1.2vw, 12px) !important;
  border: 1px solid #ccc !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.825rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  color: #000 !important;
  background: #fff !important;
  height: auto !important;
  box-shadow: none !important;
  resize: vertical;
  min-height: 80px;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
.popup-form-wrap .hs-form textarea.hs-input:focus {
  outline: none !important;
  border-color: var(--color-primary) !important;
}
.popup-form-wrap .hs-form textarea.hs-input::placeholder { color: #999 !important; }

/* Submit button row */
.popup-form-wrap .hs-form .hs_submit {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
}
.popup-form-wrap .hs-form .hs-button {
  display: inline-block !important;
  font-family: var(--font-body) !important;
  font-size: clamp(0.65rem, 1.3vw, 0.8rem) !important;
  font-weight: 400 !important;
  letter-spacing: clamp(2px, 0.3vw, 3px) !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: var(--color-primary) !important;
  text-decoration: none !important;
  padding: clamp(8px, 1.4vw, 12px) clamp(30px, 7vw, 55px) !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  transition: opacity 0.25s ease;
  box-shadow: none !important;
}
.popup-form-wrap .hs-form .hs-button:hover { opacity: 0.85; }

/* Error messages */
.popup-form-wrap .hs-form .hs-error-msgs {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.popup-form-wrap .hs-form .hs-error-msgs li label {
  font-size: clamp(0.6rem, 1.1vw, 0.72rem) !important;
  color: #c00 !important;
  font-weight: 400 !important;
}

/* Kill HubSpot's default field descriptions and legal consent spacing */
.popup-form-wrap .hs-form .hs-field-desc {
  font-family: var(--font-body) !important;
  font-size: clamp(0.6rem, 1.1vw, 0.72rem) !important;
  color: #888 !important;
}

/* Hide HubSpot's duplicate branding, legal text, and rich text blocks */
.popup-form-wrap .hs-form .legal-consent-container,
.popup-form-wrap .hs-form .hs-richtext {
  display: none !important;
}

/* Mobile single-column */
@media (max-width: 540px) {
  .popup-form-wrap .hs-form {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .popup-form-wrap .hs-form-field {
    flex-direction: column;
    gap: 2px;
  }
  .popup-form-wrap .hs-form label {
    line-height: 1;
  }
}