.cave-contact-flow [hidden] { display: none !important; }

/* Numbered section heading shared with the site's other redesigned subpages. */
body.cave-subpage-redesign.page-id-111 .post_content h2.cave-contact-section-heading {
  display: grid;
  position: static;
  box-sizing: border-box;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(30px, 4vw, 48px);
  align-items: start;
  width: 100%;
  margin: 0 0 30px !important;
  padding: 25px 4px 27px;
  border: 0;
  border-top: 1px solid #c9d1d4;
  border-bottom: 1px solid #c9d1d4;
  background: #fff;
  color: #16191b;
  font-family: "Noto Sans JP", "Yu Gothic", YuGothic, sans-serif;
  line-height: 1;
  text-align: left;
}

body.cave-subpage-redesign.page-id-111 .post_content h2.cave-contact-section-heading::before,
body.cave-subpage-redesign.page-id-111 .post_content h2.cave-contact-section-heading::after {
  display: none !important;
  content: none !important;
}

body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__label {
  display: flex;
  min-height: 76px;
  margin: 0;
  padding: 0 24px 0 5px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-right: 1px solid #c9d1d4;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
}

body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__number {
  display: block;
  color: #16191b;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -.045em;
}

body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__kicker {
  display: block;
  color: #087da8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  white-space: nowrap;
}

body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__content {
  display: block;
  align-self: center;
  min-width: 0;
}

body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__title {
  display: block;
  color: #16191b;
  font-size: clamp(22px, 2vw, 27px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .035em;
}

body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__description {
  display: block;
  margin-top: 7px;
  color: #667178;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .02em;
}

/* Reuse the CAVE BJJ contact card on CAVE's input, review and completion pages. */
body.page-id-111 #article .wpcf7,
.cave-contact-flow {
  --cave-contact-accent: #17395f;
  box-sizing: border-box;
  margin: 0 0 35px;
  padding: 32px;
  border: 1px solid #dce4e8;
  border-top: 3px solid #267a9a;
  border-radius: 6px;
  background: #f8fafb;
  font-size: 14px;
  line-height: 1.6;
}

body.page-id-111 #article .wpcf7 form { margin: 0; }

.cave-contact-steps {
  display: flex;
  gap: 0;
  list-style: none !important;
  margin: 0 0 32px !important;
  padding: 0 !important;
  border-bottom: 1px solid #dedede;
}

body.page-id-111 #article .cave-contact-steps li,
.cave-contact-flow .cave-contact-steps li {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 !important;
  padding: 15px 6px;
  border-bottom: 3px solid transparent;
  color: #666;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

body.page-id-111 #article .cave-contact-steps li[aria-current="step"],
.cave-contact-flow .cave-contact-steps li[aria-current="step"] {
  border-color: var(--cave-contact-accent, #17395f);
  color: var(--cave-contact-accent, #17395f);
  font-weight: 700;
}

.cave-contact-steps span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: #eee;
  color: #555;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
}

.cave-contact-steps li[aria-current="step"] span {
  background: var(--cave-contact-accent, #17395f);
  color: #fff;
}

body.page-id-111 #article .cave-contact-fields > p { margin: 0 0 24px; }

body.page-id-111 #article .cave-contact-fields label {
  display: block;
  color: #30363c;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: .01em;
}

body.page-id-111 #article .cave-contact-fields .wpcf7-form-control-wrap {
  display: block;
  margin-top: 8px;
}

body.page-id-111 #article .cave-contact-fields label > br { display: none; }

body.page-id-111 #article .cave-contact-fields input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
body.page-id-111 #article .cave-contact-fields select,
body.page-id-111 #article .cave-contact-fields textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #b8c5ce;
  border-radius: 4px;
  background: #fff;
  color: #30363c;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}

body.page-id-111 #article .cave-contact-fields textarea {
  min-height: 240px;
  resize: vertical;
}

body.page-id-111 #article .cave-contact-fields :is(input, select, textarea):focus-visible {
  outline: 2px solid #267a9a;
  outline-offset: 2px;
}

body.page-id-111 #article .cave-contact-fields > p:has(.wpcf7-submit) {
  margin: 4px 0 0;
  text-align: center;
}

body.page-id-111 #article .cave-contact-fields .wpcf7-submit,
.cave-contact-flow .cave-flow-button {
  appearance: none;
  display: inline-block;
  box-sizing: border-box;
  min-height: 48px;
  padding: 15px 25px;
  border: 1px solid var(--cave-contact-accent, #17395f);
  border-radius: 3px;
  background: var(--cave-contact-accent, #17395f);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

body.page-id-111 #article .cave-contact-fields .wpcf7-submit {
  width: 260px;
  max-width: 100%;
  margin: 0;
}

body.page-id-111 #article .cave-contact-fields .wpcf7-submit:hover,
.cave-contact-flow .cave-flow-button:hover {
  background: var(--cave-contact-accent, #17395f);
  color: #fff;
  filter: brightness(.93);
}

body.page-id-111 #article .cave-contact-fields .wpcf7-submit:focus-visible,
.cave-contact-flow .cave-flow-button:focus-visible {
  outline: 3px solid #222;
  outline-offset: 3px;
}

.cave-contact-flow h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.5;
}

.cave-contact-flow p { line-height: 1.8; }

.cave-flow-summary {
  margin: 24px 0;
  border-top: 1px solid #ddd;
}

.cave-flow-summary > div {
  display: grid;
  grid-template-columns: minmax(135px, 33%) minmax(0, 1fr);
  border-bottom: 1px solid #ddd;
}

.cave-flow-summary dt,
.cave-flow-summary dd {
  margin: 0;
  padding: 17px 18px;
  overflow-wrap: anywhere;
  line-height: 1.7;
  white-space: pre-wrap;
}

.cave-flow-summary dt {
  background: #f5f5f5;
  font-weight: 700;
}

.cave-flow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0 8px;
}

.cave-contact-flow .cave-flow-back {
  border-color: #999;
  background: #fff;
  color: #333;
}

.cave-contact-flow .cave-flow-back:hover {
  background: #fff;
  color: #333;
}

.cave-contact-flow .cave-flow-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.cave-flow-status:not(:empty),
.cave-flow-input-error {
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid #ba202b;
  background: #fff5f5;
  color: #8c121d;
  overflow-wrap: anywhere;
}

.cave-contact-flow .cave-flow-back[aria-disabled="true"] {
  pointer-events: none;
  opacity: .6;
}

.cave-flow-receipt { padding: 28px 0; }

@media (max-width: 767px) {
  body.cave-subpage-redesign.page-id-111 .post_content h2.cave-contact-section-heading {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 24px !important;
    padding: 19px 0 21px;
  }

  body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__label {
    min-height: 68px;
    padding: 0 15px 0 2px;
  }

  body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__number { font-size: 34px; }

  body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__kicker {
    font-size: 10px;
    letter-spacing: .1em;
  }

  body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__title { font-size: 20px; }

  body.page-id-111 .cave-contact-section-heading .cave-gym-section-heading__description {
    margin-top: 5px;
    font-size: 12px;
  }

  body.page-id-111 #article .wpcf7,
  .cave-contact-flow { padding: 20px 16px; }

  body.page-id-111 #article .cave-contact-steps li,
  .cave-contact-flow .cave-contact-steps li {
    flex-direction: column;
    gap: 6px;
    padding: 12px 2px;
    font-size: 13px;
    line-height: 1.5;
  }

  .cave-contact-steps span {
    width: 22px;
    height: 22px;
  }

  body.page-id-111 #article .cave-contact-fields > p { margin-bottom: 22px; }

  body.page-id-111 #article .cave-contact-fields .wpcf7-submit {
    width: 100%;
    min-width: 0;
  }

  .cave-contact-flow h2 { font-size: 21px; }
  .cave-flow-summary > div { grid-template-columns: minmax(0, 1fr); }
  .cave-flow-summary dt { padding: 10px 14px; }
  .cave-flow-summary dd { padding: 12px 14px 18px; }
  .cave-flow-actions { flex-direction: column-reverse; align-items: stretch; }
  .cave-contact-flow .cave-flow-button { width: 100%; margin: 0; }
}
