/*
  Footer "connect" band: social profiles as icons, then e-mail, directions and
  hours as quiet links. Markup comes from contract/footerConnect.ts and sits
  between the footer grid and the copyright row; the wrapper is removed when
  there is nothing to show.

  Everything below the token block is the same file in every template (keep it
  that way: change it everywhere or nowhere). Only the tokens differ, and they
  only say how THIS template's dark footer is coloured and spaced.
*/

.footer-connect {
  /* Per-template tokens. */
  --connect-accent: var(--accent-on-dark); /* the footer's own icon colour: link icons and the hover fill */
  --connect-on-accent: var(--ink); /* glyph drawn over the hover fill */
  --connect-strong: #FFFFFF; /* heading and icon glyphs */
  --connect-rule: rgba(255, 255, 255, 0.12); /* the band's hairline */
  --connect-gap: 2.5rem; /* space above the band; 0 where the grid already leaves it */

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: var(--connect-gap);
  padding-block: 1.5rem;
  border-top: 1px solid var(--connect-rule);
}

/* The band closes onto the copyright row's hairline, so the two frame it. */
.site-footer .footer-connect + .footer-bottom,
.site-footer .footer-connect + .footer-bottom-row {
  margin-top: 0;
}

.connect-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
}

.connect-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--connect-strong);
}

.connect-icons,
.connect-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.connect-icons {
  gap: 0.6rem;
}

.connect-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid color-mix(in srgb, var(--connect-strong) 22%, transparent);
  border-radius: 50%;
  color: color-mix(in srgb, var(--connect-strong) 85%, transparent);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.connect-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* A prospect demo's decorative placeholder: shows where profiles will go and invites no click. */
.connect-icon-sample {
  cursor: default;
  opacity: 0.55;
}

a.connect-icon:hover,
a.connect-icon:focus-visible {
  background: var(--connect-accent);
  border-color: var(--connect-accent);
  color: var(--connect-on-accent);
  transform: translateY(-2px);
}

a.connect-icon:focus-visible,
.connect-item:focus-visible {
  outline: 2px solid var(--connect-strong);
  outline-offset: 3px;
}

.connect-list {
  align-items: center;
  gap: 0.75rem 1.75rem;
}

.connect-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-size: 0.92rem;
  text-decoration: none;
}

a.connect-item:hover {
  color: var(--connect-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.connect-item-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--connect-accent);
}

.connect-item-text {
  overflow-wrap: anywhere;
}

/* Read out by screen readers only: the clock icon is decoration. */
.connect-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/*
  The footer logo (an owner image beside the business name). A template that
  already sizes it keeps its own rules: `:where()` carries no specificity, so
  these only fill in what a template leaves unset.
*/
:where(.site-footer .owner-logo-chip) {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  vertical-align: middle;
}

:where(.site-footer .owner-logo-image) {
  display: block;
  width: auto;
  height: auto;
  max-width: 112px;
  max-height: 36px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .footer-connect {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .connect-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .connect-icon {
    transition: none;
  }

  a.connect-icon:hover,
  a.connect-icon:focus-visible {
    transform: none;
  }
}
