.er-feedback-tab {
  position: fixed;
  right: 22px;
  bottom: 84px;
  z-index: 980;
  min-width: 92px;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--er-rule-hair);
  border-radius: var(--er-r-sm);
  background: var(--er-paper);
  color: var(--er-ink-2);
  box-shadow: var(--er-shadow-card);
  font-family: var(--er-sans);
  font-size: var(--er-fs-ui);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: 0.86;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.er-feedback-tab:hover,
.er-feedback-tab:focus-visible {
  opacity: 1;
  background: var(--er-ivory);
  color: var(--er-ink);
  border-color: var(--er-clay-deep);
  transform: translateY(-1px);
}

.er-feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(31, 27, 20, 0.34);
}

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

.er-feedback-modal__panel {
  position: relative;
  width: min(100%, 420px);
  max-height: min(720px, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid var(--er-rule-hair);
  border-radius: var(--er-r-md);
  background: var(--er-paper);
  color: var(--er-ink-2);
  box-shadow: var(--er-shadow-modal);
  padding: 1.35rem;
}

.er-feedback-modal__panel:focus {
  outline: none;
}

.er-feedback-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: var(--er-r-sm);
  background: transparent;
  color: var(--er-ink-3);
  font-family: var(--er-sans);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.er-feedback-modal__close:hover,
.er-feedback-modal__close:focus-visible {
  border-color: var(--er-rule);
  background: var(--er-ivory);
  color: var(--er-ink);
}

.er-feedback-modal h2 {
  margin: 0 2rem 0.45rem 0;
  font-family: var(--er-serif);
  font-size: 1.45rem;
  line-height: var(--er-lh-heading);
  color: var(--er-ink);
}

.er-feedback-modal__note {
  margin: 0 0 1rem;
  max-width: none;
  font-family: var(--er-sans);
  font-size: var(--er-fs-ui);
  line-height: 1.5;
  color: var(--er-ink-3);
}

.er-feedback-form {
  display: grid;
  gap: 0.9rem;
}

.er-feedback-form__field {
  display: grid;
  gap: 0.35rem;
}

.er-feedback-form label {
  font-family: var(--er-sans);
  font-size: var(--er-fs-ui-sm);
  font-weight: 700;
  color: var(--er-ink-2);
}

.er-feedback-form label span {
  font-weight: 500;
  color: var(--er-ink-3);
}

.er-feedback-form select,
.er-feedback-form textarea,
.er-feedback-form input[type="email"] {
  width: 100%;
  border: 1px solid var(--er-rule-hair);
  border-radius: var(--er-r-sm);
  background: #fffdf7;
  color: var(--er-ink);
  font-family: var(--er-sans);
  font-size: var(--er-fs-ui);
  line-height: 1.45;
  padding: 0.68rem 0.72rem;
}

.er-feedback-form textarea {
  resize: vertical;
  min-height: 132px;
}

.er-feedback-form select:focus,
.er-feedback-form textarea:focus,
.er-feedback-form input[type="email"]:focus {
  outline: 2px solid rgba(142, 78, 46, 0.28);
  border-color: var(--er-clay-deep);
}

.er-feedback-form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.er-feedback-form__url {
  margin: 0;
  max-width: none;
  overflow-wrap: anywhere;
  font-family: var(--er-sans);
  font-size: var(--er-fs-caption);
  line-height: 1.45;
  color: var(--er-ink-3);
}

.er-feedback-form__status {
  min-height: 1.35rem;
  margin: 0;
  max-width: none;
  font-family: var(--er-sans);
  font-size: var(--er-fs-ui-sm);
  line-height: 1.4;
  color: var(--er-ink-3);
}

.er-feedback-form__status[data-state="success"] {
  color: var(--er-olive);
}

.er-feedback-form__status[data-state="error"] {
  color: var(--er-clay-deep);
}

.er-feedback-form__submit {
  justify-self: start;
  min-height: 40px;
  border: 1px solid var(--er-ink);
  border-radius: var(--er-r-sm);
  background: var(--er-ink);
  color: var(--er-paper);
  font-family: var(--er-sans);
  font-size: var(--er-fs-ui);
  font-weight: 700;
  line-height: 1;
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.er-feedback-form__submit:hover,
.er-feedback-form__submit:focus-visible {
  background: var(--er-clay-deep);
  border-color: var(--er-clay-deep);
}

.er-feedback-form__submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.er-feedback-footer-link {
  cursor: pointer;
}

body.er-feedback-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .er-feedback-tab {
    display: none;
  }

  .er-feedback-modal {
    align-items: end;
    padding: 0.75rem;
  }

  .er-feedback-modal__panel {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
    padding: 1.15rem;
  }
}
