/* Coolbreeze HVAC demo refinements
   Preserve the cool-blue theme while keeping mobile navigation, the photo
   preview and the quote form clear, readable and accessible. */
.demo-hvac {
  --c-dark: #18213a;
  --c-dark-2: #33415c;
  --c-brand: #2563c9;
  --c-brand-soft: #dfe8f8;
  --c-accent: #b1322b;
  --c-accent-ink: #ffffff;
  --c-accent-soft: #fbe1df;
  --c-paper: #f7f8fb;
  --c-tint: #ebeef5;
  --c-line: #d8dde8;
  --focus: var(--c-brand);
  --hvac-mobile-call-space: calc(88px + env(safe-area-inset-bottom, 0px));
}

.demo-hvac .hero h1,
.demo-hvac .section h2 {
  text-wrap: balance;
}

.demo-hvac .template-banner a,
.demo-hvac .contact-info > p a,
.demo-hvac .site-footer a:not(.brand) {
  text-decoration: underline;
  text-underline-offset: 0.17em;
}

.demo-hvac .template-banner a:focus-visible,
.demo-hvac .site-footer a:focus-visible,
.demo-hvac .lightbox-close:focus-visible {
  outline-color: var(--white);
}

.demo-hvac .packages .btn {
  width: 100%;
  justify-content: center;
}

.demo-hvac .ba-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-hvac .ba-pair .photo-placeholder {
  justify-content: end;
  padding: 1.8rem 0.375rem 0.65rem;
}

.demo-hvac .lightbox {
  overflow: auto;
  overscroll-behavior: contain;
}

.demo-hvac .lightbox-close {
  min-width: 44px;
  min-height: 44px;
}

.demo-hvac .field select {
  background-color: var(--white);
  color: var(--text);
}

.demo-hvac .field :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.demo-hvac :is(button, summary, .btn, .mobile-call) {
  touch-action: manipulation;
}

.demo-hvac .mobile-call:not(.is-visible),
.demo-hvac:has(.contact-form:focus-within) .mobile-call {
  visibility: hidden;
}

@media (max-width: 900px) {
  html:has(.demo-hvac) {
    scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .demo-hvac {
    padding-bottom: var(--hvac-mobile-call-space);
  }

  .demo-hvac .primary-nav {
    position: absolute;
    inset: 100% 0 auto;
    max-height: calc(100dvh - var(--nav-top, var(--header-h)) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .demo-hvac .primary-nav ul {
    align-items: stretch;
  }

  html:not(.js) .demo-hvac {
    padding-bottom: 0;
  }

  html:not(.js) .demo-hvac .site-header {
    position: static;
  }

  html:not(.js) .demo-hvac .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }

  html:not(.js) .demo-hvac .nav-toggle {
    display: none;
  }

  html:not(.js) .demo-hvac .primary-nav {
    position: static;
    flex: 0 0 100%;
    max-height: none;
    padding: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}
