/* ==========================================================================
   Contact details, form and map
   --------------------------------------------------------------------------
   Two white cards side by side on a wide screen (details, then the form),
   stacked on a narrow one, with the map across the full width underneath.
   The form is Gravity Forms; the rules at the end give it the site's own
   fields and button, so it does not arrive in the plugin's blue.
   ========================================================================== */

.cpanel__grid { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 56rem) {
  .cpanel__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-6); }
}

.cpanel__details, .cpanel__form {
  background: var(--color-tile-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(var(--sp-4), 2.2vw, var(--sp-5));
}

.cpanel__title { margin: 0 0 var(--sp-3); font-size: var(--fs-h4); color: var(--color-heading); }
.cpanel__intro { margin: 0 0 var(--sp-4); color: var(--color-text); }

.cpanel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.cpanel__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.cpanel__icon { color: var(--color-heading); margin-block-start: 0.15rem; }
.cpanel__label {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-eyebrow);
}
.cpanel__address { font-style: normal; }
.cpanel__row a { color: var(--color-heading); font-weight: var(--fw-semi); text-decoration: none; overflow-wrap: anywhere; }
.cpanel__row a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.cpanel__row .cpanel__more { display: inline-block; margin-block-start: var(--sp-1); font-size: var(--fs-sm); color: var(--color-link-accent); }
.cpanel__row .cpanel__more:hover { color: var(--color-link-accent-hover); }

.cpanel__hours { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--sp-4); line-height: var(--lh-snug); }
.cpanel__hours dt { margin: 0; }
.cpanel__hours dd { margin: 0; white-space: nowrap; }
.cpanel__hours-note { grid-column: 1 / -1; color: var(--color-text-muted); font-size: var(--fs-sm); }

.cpanel__todo {
  margin: 0; padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); color: var(--color-text-muted);
  border: 1px dashed var(--color-border); border-radius: var(--radius-md);
}

.cpanel__map {
  margin-block-start: var(--sp-5);
  block-size: clamp(18rem, 32vw, 26rem);   /* a height, not a ratio: a ratio with a minimum height forced the map wider than a phone */
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-warm);
}
.cpanel__map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* --- The form ---------------------------------------------------------- */
.cpanel__form .gform_wrapper { margin: 0; font-family: inherit; }
.cpanel__form .gform_wrapper .gfield_label,
.cpanel__form .gform_wrapper legend.gfield_label {
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--color-text-strong);
}
.cpanel__form .gform_wrapper .gform-field-label--type-sub { font-size: var(--fs-xs); color: var(--color-text-muted); }
.cpanel__form .gform_wrapper .gfield_required { color: var(--color-text-muted); font-weight: var(--fw-normal); }
.cpanel__form .gform_wrapper input[type="text"],
.cpanel__form .gform_wrapper input[type="email"],
.cpanel__form .gform_wrapper input[type="tel"],
.cpanel__form .gform_wrapper textarea {
  width: 100%;
  font: inherit;
  color: var(--color-text-strong);
  background: var(--color-surface);
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem !important;
  min-block-size: 0 !important;
  line-height: 1.4 !important;
  box-shadow: none;
}
.cpanel__form .gform_wrapper textarea { min-block-size: 0 !important; block-size: 6.5rem !important; }
/* Kept tight so the whole form shows on one laptop screen (Liam, 19 Nov
   2026). !important: the plugin's theme sets its own, larger gaps. */
.cpanel__form .gform_wrapper .gform_fields { row-gap: var(--sp-3) !important; column-gap: var(--sp-3) !important; }
.cpanel__form .gform_wrapper .gfield_label, .cpanel__form .gform_wrapper legend.gfield_label { margin-block-end: var(--sp-1) !important; }
.cpanel__form .gform_wrapper .ginput_complex { row-gap: 0 !important; column-gap: var(--sp-3) !important; }
.cpanel__form .gform_wrapper .gform-field-label--type-sub { margin: 2px 0 0 !important; line-height: 1.2 !important; }
.cpanel__form .gform_wrapper input:focus-visible,
.cpanel__form .gform_wrapper textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-focus);
}
.cpanel__form .gform_wrapper .gform_footer { margin: var(--sp-3) 0 0 !important; padding: 0 !important; }
.cpanel__form .gform_wrapper .gform_footer input[type="submit"],
.cpanel__form .gform_wrapper .gform_footer button {
  /* !important: Gravity Forms' own theme sets these with a long selector
     and its blue; this is the site's ordinary primary button. */
  appearance: none;
  font: inherit !important;
  font-weight: var(--fw-semi) !important;
  color: var(--color-btn-primary-fg) !important;
  background: var(--color-btn-primary-bg) !important;
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  padding: 0.7rem 1.5rem !important;
  min-block-size: 0 !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color var(--transition);
}
.cpanel__form .gform_wrapper .gform_footer input[type="submit"]:hover,
.cpanel__form .gform_wrapper .gform_footer button:hover { background: var(--color-btn-primary-bg-hover) !important; }
.cpanel__form .gform_wrapper .gform_footer input[type="submit"]:focus-visible,
.cpanel__form .gform_wrapper .gform_footer button:focus-visible { outline: 3px solid var(--color-focus) !important; outline-offset: 2px; }
.cpanel__form .gform_confirmation_message { font-weight: var(--fw-semi); color: var(--color-heading); }

/* --- Equal cards (Liam, 19 Nov 2026) ----------------------------------- */
/* Side by side, the two cards are the same height: the form card stretches
   to match the details card and the Message box takes up the difference, so
   there is no empty band under the Send button. Every wrapper between the
   card and the box has to pass the height down, hence the chain. */
@media (min-width: 56rem) {
  .cpanel__grid { align-items: stretch; }
  .cpanel__form { display: flex; flex-direction: column; }
  .cpanel__form .gform_wrapper,
  .cpanel__form .gform_wrapper form,
  .cpanel__form .gform_wrapper .gform_body { flex: 1 1 auto; display: flex !important; flex-direction: column; }
  .cpanel__form .gform_wrapper .gform_fields { flex: 1 1 auto; grid-template-rows: auto auto 1fr; }
  .cpanel__form .gform_wrapper .gfield--type-textarea { display: flex; flex-direction: column; }
  .cpanel__form .gform_wrapper .ginput_container_textarea { flex: 1 1 auto; display: flex; flex-direction: column; }
  .cpanel__form .gform_wrapper textarea { block-size: 0 !important; flex: 1 1 0; min-block-size: 6.5rem !important; }
}

/* First / Last line up with Phone / Email underneath (the plugin gives the
   name pair its own negative margins and padding). */
.cpanel__form .gform_wrapper .ginput_complex { gap: 0 var(--sp-3) !important; margin-inline: 0 !important; inline-size: 100% !important; }
.cpanel__form .gform_wrapper .ginput_complex > span { padding: 0 !important; }

/* A little more air above the cards and above the map. */
.cpanel__grid { margin-block-start: var(--sp-5); }
.cpanel .cpanel__map { margin-block-start: var(--sp-7); }
