/* cz-hero/module.css
   Base layout in main.css: .banner-with-form-wrapper, .banner-left-side,
   .banner-right-side, .banner-form-wrapper, .banner-form-input, .form-title-sm
*/

/* ----------------------------------------------------------------
   Hero section — reduce top padding; HubSpot DnD section wrapper
   adds its own padding on top of main.css's 66px, totalling ~120px.
   Resetting here brings it back to ~64px.
---------------------------------------------------------------- */
.banner-with-form-wrapper {
  padding-top: 0;
}

/* ----------------------------------------------------------------
   Hero slogan strip
---------------------------------------------------------------- */
.cz-hero-slogan {
  color: #52525a;
  opacity: 0.7;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding-bottom: 44px;
  padding-top: 28px;
  text-align: center;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------
   Hero h1 — override global 3rem
---------------------------------------------------------------- */
.banner-with-form-wrapper .banner-left-side h1 {
  font-size: 2.25rem;
  line-height: 120%;
  text-align: left;
}

/* ----------------------------------------------------------------
   Rotating headline
   All phrases are in the DOM (SEO-visible). Only .cz-phrase-active
   is visually shown; others are clipped/hidden for screen readers
   but remain indexable by crawlers.
---------------------------------------------------------------- */
.cz-rotating-container {
  display: block;
  min-height: 1.2em; /* prevents layout jump */
  position: relative;
}

.cz-rotating-phrase {
  /* Same colour as body text, smaller than static prefix */
  color: #1d1d1b;
  display: block;
  font-size: 0.65em;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  white-space: nowrap;
  visibility: hidden;
}

.cz-rotating-phrase.cz-phrase-active {
  opacity: 1;
  position: relative;
  transform: translateY(0);
  visibility: visible;
}

.cz-rotating-phrase.cz-phrase-exit {
  opacity: 0;
  position: absolute;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  visibility: hidden;
}

/* ----------------------------------------------------------------
   Intro text
---------------------------------------------------------------- */
.cz-hero-intro {
  color: #52525a;
  margin-bottom: 16px;
}

.cz-hero-intro strong {
  color: #374151;
  font-weight: 600;
}

.banner-with-form-wrapper .banner-left-side .cz-hero-intro p {
  margin-bottom: 14px;
  padding-bottom: 0;
}

.banner-with-form-wrapper .banner-left-side .cz-hero-intro p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------
   Form heading (H2) — match previous H3 size for visual consistency
   (changed from H3 to H2 for proper heading hierarchy after page H1)
---------------------------------------------------------------- */
.banner-with-form-wrapper .banner-form-wrapper h2 {
  font-size: 1.25rem;
  font-weight: 500;
  padding-bottom: 32px;
  text-align: left;
}

/* ----------------------------------------------------------------
   CTA buttons
---------------------------------------------------------------- */
.banner-left-side .cz-hero-btn,
.banner-left-side .cz-hero-btn:hover,
.banner-left-side .cz-hero-btn:focus {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

/* main.css sets border-bottom on .banner-left-side a span — override for btns */
.banner-left-side .cz-hero-btn span {
  border-bottom: none !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.banner-left-side .btn-green.cz-hero-btn,
.banner-left-side .btn-green.cz-hero-btn span {
  color: #fff !important;
}

.banner-left-side .btn-coral.cz-hero-btn,
.banner-left-side .btn-coral.cz-hero-btn span {
  color: #fff !important;
}

.banner-left-side .btn-grey.cz-hero-btn,
.banner-left-side .btn-grey.cz-hero-btn span {
  color: #fff !important;
}

/* ----------------------------------------------------------------
   Left group — text + illustration side by side.
   display:flex + align-items:stretch gives the illustration column
   the same height as the text column (content-driven, always definite).
   Width/flex-proportion is set on .cz-hero-row > .cz-hero-left-group
   below (with the other layout rules).
---------------------------------------------------------------- */
.cz-hero-left-group {
  align-items: stretch;
  display: flex;
}

.cz-hero-left-group .banner-left-side {
  flex: 1 1 0;
  min-width: 0;             /* allow shrink past content width */
  padding-right: 32px;      /* breathing room between text and illustration */
}

/* ----------------------------------------------------------------
   Side illustration.
   No fixed column width: the column self-sizes to the image's natural
   rendered width (height:100% drives height; width:auto gives the
   matching aspect-ratio width). This avoids any clipping from a
   too-narrow fixed column.

   max-height on the image caps growth at narrower viewports where the
   text column wraps to many lines and would otherwise make the image
   disproportionately large. width:auto tracks the cap proportionally.

   display:flex + align-items:flex-end anchors the image feet to the
   bottom of the column when max-height is active (so there's no
   floating gap above the illustration).
---------------------------------------------------------------- */
.cz-hero-side-col {
  align-items: flex-end;    /* anchor image feet to base of column */
  align-self: stretch;      /* height = text column content height (definite) */
  display: flex;
  flex: 0 0 auto;
  /* no fixed width — column self-sizes to image's rendered width */
}

/* Hidden on narrow mobile */
@media (max-width: 767px) {
  .cz-hero-side-col {
    display: none;
  }
}

/* Centre image vertically at tablet — at desktop flex-end (bottom) looks right
   because the illustration's feet naturally align with the content baseline;
   at tablet the column is shorter and bottom-anchoring overlaps the buttons */
@media (min-width: 768px) and (max-width: 991px) {
  .cz-hero-side-col {
    align-items: center;
  }
}

.cz-hero-side-col img {
  display: block;
  height: 100%;             /* fill column height (= text column height) */
  max-height: 440px;        /* desktop cap: prevent runaway size */
  width: auto;              /* aspect-ratio width, tracks max-height proportionally */
}

@media (min-width: 768px) and (max-width: 991px) {
  .cz-hero-side-col img {
    max-height: 320px;      /* tablet: tighter cap as viewport narrows */
  }
}

/* Form card fills its column */
.banner-right-side .banner-form-wrapper {
  width: 100%;
}

/* Own container — 5-tier fixed widths */
.cz-hero-inner {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  width: 100%;
}

/* SM: 540px */
@media (min-width: 576px) {
  .cz-hero-inner {
    max-width: 540px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* MD: 720px */
@media (min-width: 768px) {
  .cz-hero-inner {
    max-width: 720px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* LG: 960px */
@media (min-width: 992px) {
  .cz-hero-inner {
    max-width: 960px;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* XL: 1300px */
@media (min-width: 1280px) {
  .cz-hero-inner {
    max-width: 1300px;
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Two-column layout — replaces Bootstrap row + col-md-7 + col-md-5.
   flex-grow ratios 7:5 match the old Bootstrap 7/12 + 5/12 split.
   align-items:center vertically centers the form against the left content. */
.cz-hero-row {
  align-items: center;
  display: flex;
  gap: 32px;
}

.cz-hero-left-group {
  flex: 7 1 0;
  min-width: 0;
}

.banner-with-form-wrapper .banner-right-side {
  flex: 5 1 0;
  min-width: 0;
}

/* SM and below: stack columns */
@media (max-width: 767px) {
  .cz-hero-row {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  
  /* More breathing room for multi-line slogan */
  .cz-hero-slogan {
    line-height: 1.6;
  }
  
  /* Remove right padding — illustration is hidden on mobile */
  .cz-hero-left-group .banner-left-side {
    padding-right: 0;
  }
  
  /* Center CTA buttons */
  .banner-left-side .ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .banner-left-side .cz-hero-btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ----------------------------------------------------------------
   Form overlay (disabled state)
---------------------------------------------------------------- */
.cz-form-disabled {
  position: relative;
}

.cz-form-disabled .form-wraps {
  pointer-events: none;
}

.cz-form-overlay {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: absolute;
  right: 0;
  text-align: center;
  top: 0;
  z-index: 10;
}

.cz-form-overlay-text {
  color: #e97677;
  font-family: 'Recoleta', serif;
  font-weight: 500;
  line-height: 1.2;
  padding-bottom: 0 !important;
  font-size: 2rem;
}

/* ----------------------------------------------------------------
   Address autocomplete dropdown
---------------------------------------------------------------- */
.banner-form-wrapper .banner-form-input {
  position: relative;
}

.cz-address-dropdown {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  display: none;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  width: 100%;
  z-index: 200;
}

.cz-address-option {
  color: #374151;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  padding: 10px 16px;
  transition: background 0.15s;
}

.cz-address-option:hover,
.cz-address-option--focused {
  background: #f0faf9;
  color: #279a93;
}

/* Clear button inside address input */
.cz-address-clear {
  align-items: center;
  background: none;
  border: none;
  bottom: 0;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  line-height: 1;
  padding: 0 12px 3px; /* bottom padding shifts the ✕ glyph up visually */
  position: absolute;
  right: 0;
  top: 0;
  transition: color 0.15s;
  z-index: 2;
}
.cz-address-clear:hover {
  color: #374151;
}

/* Right-padding creates room for the X button */
.cz-address-wrap .address-input {
  padding-right: 38px;
}

/* Fade+padding only once an address is locked in — not during typing */
.cz-address-wrap .selected-address-input {
  padding-right: 38px;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 72px), transparent calc(100% - 16px));
  mask-image: linear-gradient(to right, black calc(100% - 72px), transparent calc(100% - 16px));
}

/* ----------------------------------------------------------------
   Submission spinner
---------------------------------------------------------------- */
.cz-spinner {
  animation: cz-spin 0.75s linear infinite;
  border: 4px solid rgba(233, 118, 119, 0.2);
  border-radius: 50%;
  border-top-color: #e97677;
  height: 44px;
  width: 44px;
}

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

/* ----------------------------------------------------------------
   Field validation errors
---------------------------------------------------------------- */
.cz-field-error {
  color: #e97677;
  display: block;
  font-size: 0.875rem;
  min-height: 0;
  padding: 6px 4px 4px;
}

.cz-form-error {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 8px 6px;
  text-align: center;
}

/* ----------------------------------------------------------------
   Selected address display (readonly)
---------------------------------------------------------------- */
.selected-address-input {
  /* Use only longhand background properties — never the background shorthand,
     which resets background-image to none when it appears before background-image
     in the same or a competing rule. */
  background-attachment: scroll !important;
  background-clip: border-box !important;
  background-color: #f8f9fa !important;
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxOSIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDE1IDE5Ij48cGF0aCBmaWxsPSIjQkFCQUJBIiBkPSJtNy41IDE2LjU4MyA0LjEyNS00LjEyNWE1LjgzMyA1LjgzMyAwIDEgMC04LjI1IDBMNy41IDE2LjU4M1ptMCAyLjM1Ny01LjMwMy01LjMwM2E3LjUgNy41IDAgMSAxIDEwLjYwNiAwTDcuNSAxOC45NFptMC04Ljk0YTEuNjY3IDEuNjY3IDAgMSAwIDAtMy4zMzNBMS42NjcgMS42NjcgMCAwIDAgNy41IDEwWm0wIDEuNjY3QTMuMzMzIDMuMzMzIDAgMSAxIDcuNSA1YTMuMzMzIDMuMzMzIDAgMCAxIDAgNi42NjdaIi8+PC9zdmc+) !important;
  background-origin: padding-box !important;
  background-position: 14px center !important;
  background-repeat: no-repeat !important;
  background-size: auto !important;
  cursor: default;
  padding-left: 41px !important;
}

.selected-address-input:focus {
  background-color: #f8f9fa !important;
  outline: none;
}

/* Halve the gap between form fields (main.css has 10px margin-bottom) */
.banner-with-form-wrapper .banner-form-wrapper .banner-form-input {
  margin-bottom: 4px;
}

/* Form inputs — full width (Bootstrap .form-control replacement) */
.banner-with-form-wrapper .banner-form-input .form-control,
.banner-with-form-wrapper .form-field-group .form-control {
  font-size: 1rem;
  width: 100%;
}

/* Placeholder text — corporate grey for consistency */
.banner-with-form-wrapper .banner-form-input .form-control::placeholder,
.banner-with-form-wrapper .form-field-group .form-control::placeholder {
  color: #52525a;
  opacity: 1;
}

/* Submit button — full width, replaces Bootstrap w-100 */
.banner-with-form-wrapper .cz-hero-submit {
  width: 100%;
}

/* ----------------------------------------------------------------
   Address box — envelope-style display after address selected
   Replaces the readonly input + workarounds.
   16/03 11:13
/* ----------------------------------------------------------------
   Address box — envelope-style display after address selected
   Replaces the readonly input + workarounds.
   16/03 11:13
---------------------------------------------------------------- */
.cz-address-box {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-sizing: border-box;
  margin-bottom: 4px;
  padding: 16px 18px;
  position: relative;
  width: 100%;
}

/* Entering animation — fade in + slight scale up */
.cz-address-box--entering {
  opacity: 0;
  transform: scale(0.98);
}

.cz-address-box:not(.cz-address-box--entering):not(.cz-address-box--exiting) {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Exiting animation — fade out + slight scale down */
.cz-address-box--exiting {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cz-address-box-lines {
  color: #374151;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.cz-address-box-lines div {
  margin-bottom: 2px;
}

.cz-address-box-lines div:last-child {
  margin-bottom: 0;
}

.cz-address-box-change {
  align-items: center;
  background: none;
  border: none;
  color: #279a93;
  cursor: pointer;
  display: inline-flex;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  transition: color 0.15s;
}

/* Underline only the text, not the icon */
.cz-address-box-change:hover {
  color: #1e7a73;
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

.cz-address-box-change svg {
  flex-shrink: 0;
  height: 14px;
  width: 14px;
}

/* Address input animations — fade in/out when transitioning */
.cz-address-input--exiting {
  animation: cz-fade-out 0.2s ease forwards;
}

.cz-address-input--entering {
  animation: cz-fade-in 0.2s ease forwards;
  opacity: 0;
}

@keyframes cz-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes cz-fade-in {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}
