/* ==========================================================================
   GCKK — WordPress adaptations (site-wide)
   Contact Form 7 markup → mock-up form styles · WP admin bar offset · default page content
   ========================================================================== */

/* ---------- CF7: the wrapper must not break the mock-up layout (form = direct flex/grid child) ---------- */
.wpcf7 {
  display: contents;
}

.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* the control was a flex item in the mock-up; inside the CF7 span it is inline → remove the line-box gap */
.wpcf7-form-control-wrap > .field__control {
  display: block;
}

.wpcf7 .hidden-fields-container {
  display: none;
}

/* select placeholder colour (CF7 has no :invalid state on the empty option) */
.field__select select:has(option[value=""]:checked) {
  color: var(--color-placeholder);
}

/* validation */
.wpcf7-not-valid.field__control {
  border-color: var(--color-primary);
}

.wpcf7-not-valid-tip {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-small);
  color: var(--color-primary);
}

/* file input inside the upload area */
.upload .wpcf7-form-control-wrap {
  position: static;
  width: auto;
}

.upload .wpcf7-not-valid-tip {
  font-style: normal;
}

/* radio: CF7 list items → .radio look */
.radio-group__options .wpcf7-form-control-wrap,
.radio-group__options .wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.radio-group__options .wpcf7-list-item {
  display: flex;
  margin: 0;
}

.radio-group__options .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.radio-group__options .wpcf7-list-item input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.radio-group__options .wpcf7-list-item label:has(input:not(:checked)) {
  color: var(--color-text);
}

/* submit */
.wpcf7-form .btn[type="submit"] {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.wpcf7-form :has(> .wpcf7-submit) {
  position: relative;
  display: flex;
  flex-direction: column;
}

.wpcf7-form .wpcf7-spinner {
  position: absolute;
  top: 50%;
  right: var(--space-4);
  margin: 0;
  transform: translateY(-50%);
}

/* response message (replaces .form__status) */
.wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  color: var(--color-dark);
}

.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output {
  display: none;
}

/* ---------- WP admin bar: the header is absolutely positioned at the top ---------- */
.admin-bar .header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}

/* ---------- Default page (page.php) ---------- */
.default-page__content {
  max-width: 50rem;
  font-size: var(--fs-body-l);
  line-height: 1.5;
  color: var(--color-dark);
}

.default-page__content > * + * {
  margin-top: var(--space-4);
}

.default-page__content h2,
.default-page__content h3 {
  margin-top: var(--space-6);
  font-weight: 500;
  line-height: 1.2;
}

.default-page__content h2 { font-size: 1.75rem; }
.default-page__content h3 { font-size: 1.375rem; }

.default-page__content ul,
.default-page__content ol {
  padding-left: 1.25em;
  list-style: revert;
}

.default-page__content a {
  color: var(--color-primary);
  text-decoration: underline;
}
