/*
 * Contact page component styles.
 *
 * This is an independent clean-room implementation, written from a
 * structured written specification (facts, selectors, and literal
 * values only -- no source stylesheet text was ever read, viewed, or
 * pasted in producing this file). Section grouping, comment wording,
 * declaration order (where the cascade allows), and shorthand vs.
 * longhand choices below are this author's own.
 *
 * Scope: the two-column contact-details / map-or-hours layout, plus
 * the hours list and contact item rows. Two selector groups below
 * pair a real, markup-matched class with class names that are not
 * emitted anywhere in this theme's PHP/JS (kept per spec, not
 * "cleaned up", to preserve identical rendering behavior).
 */

/* Section wrapper ---------------------------------------------------- */

.ocf-contact,
.ocf-contact-page {
  background: var(--ocf-bg);
}

/* Two-column grid: contact details on one side, map or hours on the other */

.contact-grid,
.ocf-contact-page__grid {
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  display: grid;
}

.ocf-contact-heading {
  margin-top: 0;
}

.ocf-contact-intro {
  margin: 1rem 0 0;
  max-width: 60ch;
}

/* Left column: contact details block --------------------------------- */

.ocf-contact-details,
.ocf-contact-info {
  margin-top: 1.75rem;
  gap: 1.05rem;
  display: grid;
}

.ocf-contact-meta {
  gap: 1rem;
  display: grid;
}

.ocf-contact-item,
.ocf-contact-info__card,
.ocf-contact-card {
  color: var(--ocf-heading);
  padding: 0;
  background: transparent;
  border: 0;
  gap: 1.05rem;
  align-items: center;
  display: flex;
}

.ocf-contact-icon {
  color: var(--ocf-primary);
  background: color-mix(in srgb, var(--ocf-bg-alt) 52%, var(--ocf-bg));
  border-radius: var(--card-radius, 0.75rem);
  border: var(--card-border-width) solid var(--card-border-color);
  place-items: center;
  flex: 0 0 auto;
  height: 3.15rem;
  width: 3.15rem;
  display: inline-grid;
}

.ocf-contact-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.ocf-contact-hours-label svg {
  height: 1.15rem;
  width: 1.15rem;
}

.ocf-contact-item-body {
  min-width: 0;
  gap: 0.15rem;
  display: grid;
}

.ocf-contact-item-body strong {
  line-height: 1.25;
  font-weight: var(--font-weight-bold);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  color: var(--ocf-heading);
}

.ocf-contact-item-body span {
  font-size: var(--font-label-size);
  color: var(--ocf-body);
}

/* Right column, variant A: map card (kept per spec; not emitted by
   current markup in this theme, so this rule is currently unreachable) */

.ocf-contact-map-card {
  overflow: hidden;
  background: var(--ocf-bg-alt);
  border-radius: var(--card-radius);
  border: var(--card-border-width) solid var(--card-border-color);
  margin-top: 2rem;
  min-height: clamp(12rem, 22vw, 17rem);
  position: relative;
}

.ocf-contact-map-card iframe {
  filter: grayscale(1) contrast(0.95);
  border: 0;
  height: 100%;
  width: 100%;
  inset: 0;
  position: absolute;
}

html[data-theme="dark"] .ocf-contact-map-card iframe {
  opacity: 1;
  filter: grayscale(0.7) invert(0.82) brightness(0.95) contrast(1.18);
}

/* Right column, variant B: opening-hours card */

.ocf-contact-hours {
  padding: clamp(1.15rem, 2.6vw, 1.55rem);
  background: color-mix(in srgb, var(--ocf-bg-alt) 52%, var(--ocf-bg));
  border-radius: var(--card-radius, 0.75rem);
  border: var(--card-border-width) solid var(--card-border-color);
  max-width: 42rem;
  margin-top: 1.6rem;
}

.ocf-contact-hours-label {
  color: var(--ocf-heading);
  margin: 0 0 0.8rem;
  gap: 0.65rem;
  align-items: center;
  display: flex;
}

.ocf-contact-hours-label svg {
  color: var(--ocf-primary);
}

.ocf-hours-list {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  display: grid;
}

.ocf-hours-list li {
  padding-block: 0.68rem;
  border-top: 1px solid var(--ocf-border-light);
  gap: 1rem;
  justify-content: space-between;
  display: flex;
}

.ocf-hours-list li:last-child {
  padding-bottom: 0;
}

/* Kept per spec; the markup uses ocf-contact-emergency-hours (with a
   -hours suffix), so this selector does not currently match anything --
   reproduced as-is rather than "corrected" to preserve behavior */

.ocf-contact-emergency {
  font-size: var(--font-label-size);
  color: var(--ocf-label);
  margin: 0.75rem 0 0;
}

.ocf-contact-map {
  background: color-mix(in srgb, var(--ocf-heading) 8%, transparent);
  overflow: hidden;
  border-radius: var(--card-radius, 0.75rem);
  aspect-ratio: 4 / 3;
  margin-top: 1.75rem;
}

.ocf-contact-map iframe {
  border: 0;
  height: 100%;
  width: 100%;
  display: block;
}

/* Responsive adjustments ---------------------------------------------- */

@media (max-width: 860px) {
  .contact-grid,
  .ocf-contact-page__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .ocf-contact-item,
  .ocf-contact-info__card,
  .ocf-contact-card {
    gap: 0.9rem;
  }

  .ocf-contact-icon {
    height: 3rem;
    width: 3rem;
  }
}
