/* ==========================================================================
   MRIYA Marketing — WordPress integration layer

   Loaded after global.css / styles.css. Contains only what the WordPress
   runtime adds on top of the static layout: the Contact Form 7 wrappers, the
   admin bar and the anchor offset for the fixed mobile header.
   The layout files themselves stay untouched.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Anchor offset — the header is fixed below 1024px, so #section links
      would otherwise land underneath it.
   -------------------------------------------------------------------------- */
@media (max-width: 63.9375em) {
  html {
    scroll-padding-top: 5rem; /* 64px header + breathing room */
  }
}

/* --------------------------------------------------------------------------
   2. Admin bar — only ever applies to logged-in users.
   -------------------------------------------------------------------------- */
@media (max-width: 63.9375em) {
  body.admin-bar .header {
    inset-block-start: 32px;
  }
}

@media (max-width: 600px) {
  body.admin-bar .header {
    inset-block-start: 0;
  }
}

/* --------------------------------------------------------------------------
   3. Contact Form 7

   CF7 wraps every form in <div class="wpcf7">. Inside .contact__grid that
   wrapper would become the grid item instead of the form, so it is dissolved
   and the form itself (given class:form via html_class) takes its place.
   -------------------------------------------------------------------------- */
.contact__grid > .wpcf7 {
  display: contents;
}

/* The form-tag wrappers CF7 injects around every control must not interrupt
   the .field column. */
.form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* Consent row: CF7 renders the acceptance tag as span > span > label > input,
   so the flex row that the layout puts on .form__consent is re-created on the
   generated label. */
.form__consent .wpcf7-list-item {
  margin: 0;
}

.form__consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem; /* 10px */
}

.form__consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 0.875rem; /* 14px */
  height: 0.875rem;
  margin-block-start: 0.0625rem;
  accent-color: var(--color-bg-ink);
}

/* Validation and response messages live inside <form>, after the fields. */
.form .wpcf7-not-valid-tip {
  margin-block-start: 0.25rem;
  font-size: 0.75rem; /* 12px */
  line-height: 1.2;
  color: #b3261e;
}

.form .wpcf7-response-output {
  margin: 0 var(--space-2xl) var(--space-2xl);
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem; /* 14px */
  line-height: 1.3;
  color: #0c0d0e;
  background-color: rgba(255, 255, 255, 0.65);
}

.form .wpcf7-spinner {
  display: block;
  margin: 0.5rem auto 0;
}
