.contact-confirm[hidden] {
  display: none;
}

body.contact-confirm-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.contact-confirm {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 40px 24px;
  color: #333;
  font-family: "Zen Kaku Gothic Antique", sans-serif;
}

.contact-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(51, 51, 51, .64);
  backdrop-filter: blur(5px);
}

.contact-confirm__dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100dvh - 80px);
  overflow: auto;
  box-sizing: border-box;
  padding: 64px 72px 56px;
  background: #f8f7f1;
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(51, 51, 51, .24);
  outline: none;
}

.contact-confirm__accent {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 8px;
  padding: 24px 0 0 28px;
}

.contact-confirm__accent i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #d74d30;
}

.contact-confirm__accent i:nth-child(2) {
  background: #3f7e57;
}

.contact-confirm__accent i:nth-child(3) {
  background: #e79f18;
}

.contact-confirm__close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.contact-confirm__close::before,
.contact-confirm__close::after {
  position: absolute;
  top: 21px;
  left: 12px;
  width: 20px;
  height: 2px;
  background: #333;
  content: "";
}

.contact-confirm__close::before { transform: rotate(45deg); }
.contact-confirm__close::after { transform: rotate(-45deg); }

.contact-confirm__eyebrow {
  margin: 0 0 8px;
  color: #d74d30;
  font: 600 15px/1.4 Poppins, Arial, sans-serif;
  letter-spacing: .05em;
}

.contact-confirm__dialog h2 {
  margin: 0;
  color: #333;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .03em;
}

.contact-confirm__lead {
  margin: 14px 0 36px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
}

.contact-confirm__list {
  margin: 0;
  border-top: 1px solid #d4ca76;
}

.contact-confirm__list > div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 8px;
  border-bottom: 1px solid rgba(212, 202, 118, .65);
}

.contact-confirm__list dt,
.contact-confirm__list dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}

.contact-confirm__list dt {
  font-weight: 700;
}

.contact-confirm__list dd {
  overflow-wrap: anywhere;
  font-weight: 500;
  white-space: pre-wrap;
}

.contact-confirm__list dd.is-empty {
  color: #888;
}

.contact-confirm__agreed {
  position: relative;
  padding-left: 28px;
  color: #416fa6;
  font-weight: 700 !important;
}

.contact-confirm__agreed::before {
  position: absolute;
  top: 5px;
  left: 0;
  width: 20px;
  height: 20px;
  background: #416fa6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.25 6.25 11.5 13 4.75' fill='none' stroke='%23fff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  border-radius: 5px;
  content: "";
}

.contact-confirm__actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 40px;
}

.contact-confirm__actions button {
  min-height: 60px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Zen Kaku Gothic Antique", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
}

.contact-confirm__back {
  background: #fff;
  box-shadow: inset 0 0 0 1px #416fa6;
  color: #416fa6;
}

.contact-confirm__send {
  min-width: 238px;
  background: #df4e2c;
  color: #fff;
}

.contact-confirm__send span {
  margin-left: 24px;
  font-family: Poppins, Arial, sans-serif;
  font-size: 18px;
}

.contact-confirm__actions button:hover,
.contact-confirm__actions button:focus-visible,
.contact-confirm__close:hover,
.contact-confirm__close:focus-visible {
  filter: brightness(.96);
}

.contact-confirm__actions button:focus-visible,
.contact-confirm__close:focus-visible {
  outline: 3px solid #416fa6;
  outline-offset: 3px;
}

.contact-confirm__send:disabled {
  cursor: wait;
  opacity: .65;
}

.contact-confirm__actions button[hidden] {
  display: none;
}

.contact-confirm__result-close {
  min-width: 190px;
  background: #416fa6;
  color: #fff;
}

.contact-confirm__dialog.is-success {
  width: min(760px, 100%);
}

.contact-confirm__dialog.is-success h2,
.contact-confirm__dialog.is-success .contact-confirm__lead {
  text-align: center;
}

.contact-confirm__dialog.is-success .contact-confirm__eyebrow {
  display: none;
}

.contact__form .wpcf7-response-output[hidden] {
  display: none !important;
}

.contact-confirm__dialog.is-success .contact-confirm__lead {
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

.contact-confirm__status--error {
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(202, 0, 51, .08);
  color: #ca0033;
  font-weight: 700;
}

@media (max-width: 768px) {
  .contact-confirm {
    align-items: center;
    padding: 16px 12px;
  }

  .contact-confirm__dialog {
    max-height: calc(100dvh - 32px);
    padding: 54px 20px 28px;
    border-radius: 24px;
  }

  .contact-confirm__accent {
    gap: 6px;
    padding: 20px 0 0 20px;
  }

  .contact-confirm__accent i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
  }

  .contact-confirm__close {
    top: 14px;
    right: 16px;
  }

  .contact-confirm__dialog h2 {
    padding-right: 32px;
    font-size: 23px;
  }

  .contact-confirm__lead {
    margin-bottom: 24px;
    font-size: 13px;
  }

  .contact-confirm__list > div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 2px;
  }

  .contact-confirm__list dt,
  .contact-confirm__list dd {
    font-size: 13px;
  }

  .contact-confirm__list dt {
    color: #416fa6;
  }

  .contact-confirm__actions {
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: 28px;
  }

  .contact-confirm__actions button {
    width: 100%;
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .contact-confirm:not([hidden]) .contact-confirm__backdrop {
    animation: contact-confirm-fade .2s ease both;
  }

  .contact-confirm:not([hidden]) .contact-confirm__dialog {
    animation: contact-confirm-rise .28s ease both;
  }
}

@keyframes contact-confirm-fade {
  from { opacity: 0; }
}

@keyframes contact-confirm-rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
}
