/* v17: a compact dismiss control without changing the two contact buttons. */
@media screen and (max-width: 560px) {
  /* The header adds exactly 36px: a 32px row, -4px margin and the 8px gap.
     The existing columns, horizontal padding, button sizes and gap stay intact. */
  body { padding-bottom: 102px; }
  .mobile-contact-bar__header {
    position: relative;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    height: 32px;
    min-width: 0;
    margin-top: -4px;
    padding: 0 48px 0 8px;
  }
  .mobile-contact-bar__caption {
    color: #c8d9cf;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .02em;
  }
  .mobile-contact-bar__close {
    position: absolute;
    top: -6px;
    right: -4px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #e4eee7;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-contact-bar__close::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid #78978b;
    border-radius: inherit;
    background: #234749;
  }
  .mobile-contact-bar__close > svg {
    position: relative;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
  }
  .mobile-contact-bar__close:active::before { background: #355d59; border-color: #afc5b9; }
  .mobile-contact-bar__close:focus-visible { outline: 3px solid #f3b369; outline-offset: 0; }

  .mobile-contact-bar.is-closing {
    visibility: visible;
    pointer-events: none;
    animation: mobile-contact-dismiss .18s ease-in both;
  }
  /* Keep the email notice clear of the taller panel, including its close control. */
  .mobile-contact-bar.is-visible ~ .email-toast,
  .mobile-contact-bar.is-closing ~ .email-toast {
    bottom: calc(120px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 148px - env(safe-area-inset-bottom));
  }
}
@keyframes mobile-contact-dismiss {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(calc(100% + 16px)); }
}
@media (hover: hover) and (pointer: fine) {
  .mobile-contact-bar__close:hover::before { background: #355d59; border-color: #afc5b9; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-contact-bar.is-closing { visibility: hidden; animation: none; }
}
