/* ——— Feedback modal ——— */
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s;
}

.feedback-modal.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.feedback-modal[hidden] {
  display: none !important;
}

.feedback-modal:not([hidden]).is-open {
  display: grid;
}

.feedback-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 18, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feedback-modal.is-open .feedback-modal__backdrop {
  opacity: 1;
}

.feedback-modal__dialog {
  position: relative;
  width: min(100%, 22.5rem);
  overflow: hidden;
  background: #faf8f4;
  border: 1px solid rgba(15, 41, 35, 0.08);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 1px 0 rgba(201, 160, 74, 0.25) inset,
    0 20px 50px rgba(15, 41, 35, 0.2);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.feedback-modal__dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-mid), transparent);
  opacity: 0.85;
}

.feedback-modal.is-open .feedback-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.feedback-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem 1.35rem 0;
}

.feedback-modal__intro {
  min-width: 0;
  padding-right: 0.25rem;
}

.feedback-modal__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.feedback-modal__title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--green-deep);
  line-height: 1.2;
}

.feedback-modal__desc {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(15, 41, 35, 0.55);
}

.feedback-modal__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 41, 35, 0.06);
  color: rgba(15, 41, 35, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.feedback-modal__close:hover,
.feedback-modal__close:focus-visible {
  background: rgba(15, 41, 35, 0.1);
  color: var(--green-deep);
  transform: rotate(90deg);
}

#feedbackFormWrap.is-hidden {
  display: none;
}

.feedback-form {
  padding: 1.25rem 1.35rem 1.35rem;
}

.feedback-form__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.feedback-form__fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.feedback-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feedback-form__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15, 41, 35, 0.55);
}

.feedback-form__label span {
  color: var(--gold);
}

.feedback-form__input {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--green-deep);
  background: #fff;
  border: 1px solid rgba(15, 41, 35, 0.1);
  border-radius: 11px;
  box-shadow: 0 1px 2px rgba(15, 41, 35, 0.04);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.feedback-form__input::placeholder {
  color: rgba(15, 41, 35, 0.32);
  font-weight: 400;
}

.feedback-form__input:hover {
  border-color: rgba(15, 41, 35, 0.16);
}

.feedback-form__input:focus {
  outline: none;
  border-color: rgba(166, 124, 46, 0.5);
  box-shadow: 0 0 0 3px rgba(166, 124, 46, 0.12);
}

.feedback-form__field.is-invalid .feedback-form__input {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.feedback-form__error {
  min-height: 0.95rem;
  margin: 0;
  font-size: 0.6875rem;
  color: #c0392b;
}

.feedback-form__actions {
  margin-top: 1.15rem;
}

.feedback-form__submit {
  width: 100%;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 11px;
}

.feedback-form__submit.is-loading {
  pointer-events: none;
  opacity: 0.82;
}

.feedback-form__submit .feedback-form__spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: feedbackSpin 0.7s linear infinite;
}

.feedback-form__submit.is-loading .feedback-form__spinner {
  display: inline-block;
}

.feedback-form__legal {
  margin: 0.65rem 0 0;
  font-size: 0.625rem;
  line-height: 1.45;
  text-align: center;
  color: rgba(15, 41, 35, 0.38);
}

.feedback-form__status {
  display: none;
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.feedback-form__status.is-visible {
  display: block;
}

.feedback-form__status--success {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.2);
  color: #1e6b42;
}

.feedback-form__status--error {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.18);
  color: #962d22;
}

.feedback-modal__success {
  display: none;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
}

.feedback-modal__success.is-visible {
  display: block;
}

.feedback-modal__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background: rgba(39, 174, 96, 0.12);
  color: #27ae60;
  font-size: 1.2rem;
}

.feedback-modal__success-title {
  margin: 0 0 0.45rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--green-deep);
}

.feedback-modal__success-text {
  margin: 0 0 1.15rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(15, 41, 35, 0.58);
}

body.feedback-modal-open,
html.feedback-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.feedback-modal__dialog {
  overscroll-behavior: contain;
}

@keyframes feedbackSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-modal,
  .feedback-modal__backdrop,
  .feedback-modal__dialog,
  .feedback-modal__close {
    transition: none;
  }

  .feedback-form__submit .feedback-form__spinner {
    animation: none;
  }
}

@media (max-width: 480px) {
  .feedback-modal {
    padding: 0.85rem;
    align-items: flex-end;
  }

  .feedback-modal__dialog {
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .feedback-modal__head,
  .feedback-form {
    padding-inline: 1.15rem;
  }
}
