/*
 * Universal Contact Widget - one shared card (web.partials.contact-widget)
 * appearing on Kontakt, Login, Report, and every Add-a-Business/Claim step.
 *
 * 2026-10 restyle (IP-Help-Widget.md): quieter treatment so it reads as
 * part of the page instead of competing with the form next to it - no
 * filled background, outer border or shadow; a single 3px accent line on
 * the left instead (--border, the same gray a form field's own border
 * already uses), body-font typography throughout (was an oversized
 * heading plus bold/uppercase labels and links), and a fluid width
 * instead of a fixed 360px cap - the card now fills whatever column
 * hosts it. The horizontal divider under the intro is gone too - the
 * left line now does that job.
 *
 * The label text itself ("FORMULARZ"/"CONTACT FORM" etc.) was stored
 * fully uppercase in the lang files, not just uppercased by CSS -
 * dropping text-transform alone wouldn't have produced sentence case, so
 * those strings were rewritten too (site.php, both languages).
 *
 * Responsive: container queries, not viewport media queries - narrower
 * than 560px of the WIDGET's own width (see .contact-widget-card's own
 * container-type below), .contact-widget-body just stacks the contact
 * rows above the map, same order as before this restyle; at 560px and
 * up it splits into two side-by-side columns. This makes the widget
 * respond to whatever column actually hosts it (a narrow sidebar today,
 * potentially a full-width row elsewhere) rather than the browser
 * viewport, which is what the handoff spec explicitly asked for. In a
 * browser with no container-query support, the @container rule below is
 * simply skipped and every width stays on the plain stacked layout -
 * the acceptable, non-breaking degrade the handoff itself allows for
 * ("if container queries cause a problem, fall back and tell Jarek").
 */
.contact-widget-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
  width: 100%;
  border-left: 3px solid var(--border, #dedede);
  padding: 0 0 0 var(--space-4, 16px);
  box-sizing: border-box;
}
.contact-widget-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-widget-heading {
  margin: 0;
  font: 500 var(--body-size, 16px)/var(--body-line-height, 24px) var(--font-sans);
  color: var(--ink);
}
.contact-widget-message {
  margin: 0;
  font: var(--body-weight, 400) var(--body-size, 16px)/var(--body-line-height, 24px) var(--font-sans);
  color: var(--ink-muted);
}
.contact-widget-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
}
.contact-widget-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-4, 16px);
}
/* Contact rows on the left, map on the right, once the widget itself
   (not the viewport) is at least 560px wide - IP-Help-Widget.md §3. */
@container (min-width: 560px) {
  .contact-widget-body {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-5, 24px);
  }
  .contact-widget-rows,
  .contact-widget-map {
    flex: 1 1 0;
    min-width: 0;
  }
}
.contact-widget-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-widget-label {
  font: 700 13px/1.4 var(--font-sans);
  color: var(--ink-muted);
}
/* position:relative + the ::before below give this link (and the email
   link) a real 44px-tall tap target (IP-Help-Widget.md §3's own locked
   phone-check rule) without visually growing the compact row itself -
   the pseudo-element is an invisible, absolutely-positioned overlay
   centered on the link's own line, not extra padding/line-height that
   would push the label above it and the next row below further apart. */
.contact-widget-link {
  position: relative;
  font: 400 var(--body-size, 16px)/var(--body-line-height, 24px) var(--font-sans);
  color: var(--brand-blue, #3270a2);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-widget-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  min-height: 44px;
  transform: translateY(-50%);
}
.contact-widget-link:hover {
  color: var(--link-hover, #3c77a6);
  text-decoration: underline;
}
.contact-widget-link:focus-visible {
  outline: 2px solid var(--focus-ring, #2e6fe0);
  outline-offset: 2px;
}
.contact-widget-text {
  font: 400 var(--body-size, 16px)/var(--body-line-height, 24px) var(--font-sans);
  color: var(--ink);
}
/* E-mail row: label/link stacked on the left, copy button pinned to the
   right - the only row that isn't a simple label+value stack. Stays a
   row (never wraps the button below the link) at every width, including
   when a long email address wraps onto two lines via .contact-widget-
   link's own overflow-wrap:anywhere. */
.contact-widget-row--email {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.contact-widget-email-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.contact-widget-copy-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #dedede);
  border-radius: var(--radius-md, 8px);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.contact-widget-copy-btn:hover {
  background: var(--border, #dedede);
}
.contact-widget-copy-btn:focus-visible {
  outline: 2px solid var(--focus-ring, #2e6fe0);
  outline-offset: 2px;
}
.contact-widget-copy-btn.is-copied {
  border-color: var(--secondary-dark, #47810f);
  background: var(--success-bg, #f3f8ee);
  color: var(--secondary-dark, #47810f);
}
.contact-widget-copy-btn.is-error {
  border-color: var(--danger-text, #9e4a46);
  color: var(--danger-text, #9e4a46);
}
/* Fixed 170px height replaced with a fluid 16:9 box (IP-Help-Widget.md
   §3) - full width of whatever column/side the map lands in, at every
   size, instead of a height that stayed the same regardless of width. */
.contact-widget-map {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border, #dedede);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}

/* Two-column page grid the widget's host pages opt into - every page
   that uses it (Kontakt, Report, Login, every New Listing/Claim step)
   already has its own Bootstrap .row > col-lg-8/col-lg-4 grid; this
   only sizes the right-hand col-lg-4 slot those pages place the widget
   in so the card reads the same size everywhere. Not a new grid system,
   and separate from the widget's own internal fluid width above - the
   widget fills whatever this (or any other) container gives it. */
.contact-widget-col {
  width: 360px;
  max-width: 100%;
  flex: none;
}
@media (max-width: 991px) {
  .contact-widget-col {
    width: 100%;
    margin-top: var(--space-5, 24px);
  }
}
