/*
 * Green St Kitchen - the Contact details block ("Reach us directly").
 * No literal colour values. Everything comes from tokens.css.
 *
 * This block's styling lives in its own file, and loads on every front end page,
 * because the block can be placed anywhere: on another page, inside a group,
 * inside a synced pattern, or in a widget. It was previously inside contact.css,
 * which was gated on has_block(), and that gate cannot see through a
 * core/block reference - so the card rendered with no background, no radius and
 * no padding whenever it was placed via a synced pattern.
 *
 * The file is small and gzips well, and loading it unconditionally is cheaper
 * than a detection mechanism that can be wrong. See MAINTAINER.md.
 *
 * Measured from 05_GSK_Web_June-2026_Contact.pdf.
 * ========================================================================= */

/* White surface, 20px radius, 32px padding with a deeper foot, as drawn. */
.gs-contact-details {
  background-color: var(--gs-white);
  border-radius: var(--gs-card-radius-lg);
  padding: var(--gs-space-lg);
}

@media (min-width: 768px) {
  .gs-contact-details {
    /* Top and sides 32, foot 51. The drawing really is asymmetric here; see
     * BUILD-REPORT.md. */
    padding: var(--gs-space-lg) var(--gs-space-lg) var(--gs-contact-card-foot);
  }
}

/* 17.5px Unbounded Bold with negative tracking. This is the one outlined string
 * in the PDF; see the note on --gs-tracking-reach in tokens.css for how the font
 * and size were identified. */
.gs-contact-details__title {
  font-size: var(--gs-step-reach);
  letter-spacing: var(--gs-tracking-reach);
  margin-block-end: 6px;
}

.gs-contact-details__intro {
  color: var(--gs-ink-muted);
  font-size: var(--gs-step-sm);
  line-height: 1.47;
  margin: 0;
}

/* Three rows, 58px apart in the drawing: a 40px disc and a 40px text block with
 * an 18px gap between rows. */
.gs-contact-details__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: var(--gs-space-md) 0 0;
  padding: 0;
  list-style: none;
}

.gs-contact-details__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  column-gap: 12px;
}

/* The disc carries the shape colour of the pickled things range, sampled from
 * the mockup, with the two letter glyphs in the range accent itself.
 *
 * That pairing measures 3.45:1, which fails AA for text this size. It is the
 * mockup's own colour and was kept deliberately; the discs are aria-hidden and
 * each duplicates the label beside it. To make it pass, change this one colour
 * to var(--gs-ink), which measures 6.84:1. Read the contrast section of
 * BUILD-REPORT.md first. */
.gs-contact-details__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--gs-shape-pickled-things);
  color: var(--gs-pickled-things);
  font-family: var(--gs-font-heading);
  font-weight: 700;
  font-size: var(--gs-step-pill-sm);
  line-height: 1;
}

/* Block, so the label and value stack without the container generating a line
 * box. Left inline, the container's own 24px strut made each row 1.5px taller
 * than drawn and the three rows drifted out of the mockup's 58px pitch. */
.gs-contact-details__text {
  display: block;
  min-width: 0;
}

.gs-contact-details__label {
  display: block;
  color: var(--gs-ink-label);
  font-family: var(--gs-font-body);
  font-weight: 600;
  font-size: var(--gs-step-detail);
  line-height: 1.2;
}

.gs-contact-details__value {
  display: block;
  color: var(--gs-ink-label);
  font-size: var(--gs-step-detail-value);
  line-height: 1.48;
  text-decoration: none;
}

/* The email and Instagram values are links, and their text is only 20px tall,
 * short of the 44px target size in PROJECT-BRIEF section 9. The hit area is
 * grown to 44px and the extra height pulled back out with negative margin, so
 * the row keeps the 58px pitch the mockup draws and the text does not move.
 * This is the same treatment the wordmark already uses in the header.
 * Rows are 58px apart, so neighbouring 44px areas cannot overlap. */
a.gs-contact-details__value {
  /* Grown with padding rather than min-height and centring, so the text stays
   * exactly where normal flow put it: 12 + 20 + 12 is the 44px, and the negative
   * margin takes the added height back out of the row.
   * Block level, not inline, so it generates no line box of its own.
   * width: fit-content keeps the hit area on the text, not the whole column. */
  display: block;
  width: fit-content;
  padding-block: 12px;
  margin-block: -12px;
}

a.gs-contact-details__value:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* The address is two lines in the drawing and is composed from the same site
 * values the Organization schema uses, so they cannot disagree. */
.gs-contact-details__value span {
  display: block;
}
