/* ==========================================================================
   Thanks page — page-thanks.php（送信完了）
   ========================================================================== */

/* 本文が少ないときも白ブロックをフッター直前まで伸ばす */
body.page:has(.thanks-section) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.admin-bar.page:has(.thanks-section) {
  min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

.thanks-section.section-bg-white {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: auto;
  padding-top: 0;
  padding-bottom: 6rem;
  padding-left: 6vw;
  margin-top: 6rem;
  margin-bottom: 4rem;
}

.thanks-pin {
  position: static;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 7rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.thanks-article {
  width: 60%;
  max-width: 60%;
  margin-inline: auto;
}

.thanks-title {
  margin: 0 0 24px;
  font-family: "Shippori Mincho", serif;
  font-size: clamp(2.5rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-black);
  text-align: center;
}

.thanks-body p {
  font-size: var(--text-sm);
  line-height: 1.8;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  text-align: center;
}

.thanks-body > :last-child {
  margin-bottom: 0;
}

.thanks-body :is(.wp-block-button, p.has-text-align-center) {
  text-align: center;
}

.thanks-body .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 送信ボタン（#contact .form-submit）と同型・色は黒 */
.thanks-back-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  text-align: center;
}

.thanks-back-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
  width: auto;
  max-width: 100%;
  margin-top: 1.5rem;
  padding: 20px 32px;
  padding-right: 120px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--text-black);
  text-decoration: none;
  background-color: transparent;
  border: 1px solid var(--text-black);
  border-radius: 50px;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.thanks-back-btn::after {
  content: "";
  position: absolute;
  right: 32px;
  top: 50%;
  width: 40px;
  height: 6px;
  transform: translateY(-50%);
  background: url("../img/arrow_btn.svg") no-repeat center / contain;
  filter: brightness(0);
  transition: filter 0.15s ease;
  pointer-events: none;
}

.thanks-back-btn:hover {
  color: var(--text-white);
  background-color: var(--bg-black);
}

.thanks-back-btn:hover::after {
  background-image: url("../img/arrow_btn.svg");
  filter: none;
}

.thanks-back-btn:focus-visible {
  outline: 2px solid var(--text-black);
  outline-offset: 4px;
}

@media (min-width: 768px) {
  .thanks-body p {
    font-size: var(--text-base);
  }
}

@media (min-width: 1024px) {
  .thanks-title {
    margin-bottom: 40px;
  }
}

@media (max-width: 1024px) {
  .thanks-article {
    width: 100%;
    max-width: 100%;
  }

  .thanks-pin {
    padding-top: 5rem;
  }

  .thanks-section.section-bg-white {
    margin-top: 4.5rem;
  }
}

@media (max-width: 768px) {
  .thanks-section.section-bg-white {
    padding-bottom: 3rem;
    margin-top: 4.5rem;
    margin-bottom: 4rem;
  }

  .thanks-pin {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }
}
