body.feedback-selecting,
body.feedback-selecting * {
  cursor: crosshair !important;
}

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

.feedback-launch {
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(211, 84, 0, 0.45);
  border-radius: 999px;
  background: rgba(211, 84, 0, 0.12);
  color: #d35400;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 0 0 0 rgba(211, 84, 0, 0);
}

.feedback-launch:hover,
.feedback-launch:focus-visible,
.feedback-launch[aria-pressed="true"] {
  background: rgba(211, 84, 0, 0.2);
  border-color: rgba(211, 84, 0, 0.8);
  box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.18);
  outline: none;
}

.feedback-launch:hover {
  transform: translateY(-1px);
}

.feedback-launch__icon {
  width: 1.1rem;
  height: 1.1rem;
}

.feedback-banner {
  position: sticky;
  top: 0;
  z-index: 55;
  padding: 0.75rem 1rem 0;
}

.feedback-banner__body {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(211, 84, 0, 0.45);
  border-radius: 1rem;
  background: rgba(13, 17, 23, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.feedback-banner__copy {
  min-width: 0;
}

.feedback-banner__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f5f5f3;
}

.feedback-banner__text {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: #c9d1d9;
}

.feedback-banner__button,
.feedback-modal__secondary,
.feedback-modal__primary,
.feedback-modal__icon-button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.feedback-banner__button,
.feedback-modal__secondary {
  padding: 0.7rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(48, 54, 61, 1);
  background: rgba(0, 0, 0, 0.28);
  color: #c9d1d9;
}

.feedback-modal__primary {
  padding: 0.75rem 1.1rem;
  border-radius: 0.9rem;
  background: #d35400;
  color: #fff;
  font-weight: 700;
}

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

.feedback-modal__icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: #c9d1d9;
  font-size: 1.4rem;
  line-height: 1;
}

.feedback-highlight {
  position: fixed;
  z-index: 65;
  pointer-events: none;
  border: 2px solid rgba(211, 84, 0, 0.95);
  border-radius: 1rem;
  background: rgba(211, 84, 0, 0.08);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.14);
}

.feedback-highlight__label {
  position: absolute;
  top: -0.8rem;
  left: 0.75rem;
  display: inline-flex;
  max-width: min(20rem, calc(100vw - 3rem));
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: #d35400;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.feedback-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.feedback-modal__dialog {
  position: relative;
  width: min(100% - 2rem, 34rem);
  margin: 8vh auto 0;
  padding: 1.25rem;
  border: 1px solid rgba(48, 54, 61, 1);
  border-radius: 1.35rem;
  background: rgba(13, 17, 23, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.feedback-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.feedback-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f5f5f3;
}

.feedback-modal__target {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: #d35400;
  font-weight: 600;
}

.feedback-modal__field {
  display: block;
  margin-top: 1rem;
}

.feedback-modal__label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #c9d1d9;
}

.feedback-modal__textarea {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(48, 54, 61, 1);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.3);
  color: #f5f5f3;
  resize: vertical;
}

.feedback-modal__textarea:focus {
  outline: 2px solid rgba(211, 84, 0, 0.4);
  outline-offset: 2px;
}

.feedback-modal__status {
  min-height: 1.4rem;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: #c9d1d9;
}

.feedback-modal__status[data-tone="error"] {
  color: #ffb4a2;
}

.feedback-modal__status[data-tone="success"] {
  color: #ffcf99;
}

.feedback-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1rem;
}

.feedback-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 85;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.95rem 1rem;
  border: 1px solid rgba(211, 84, 0, 0.45);
  border-radius: 1rem;
  background: rgba(13, 17, 23, 0.96);
  color: #f5f5f3;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.feedback-toast a {
  color: #ffcf99;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

@media (max-width: 640px) {
  .feedback-banner__body {
    align-items: flex-start;
    flex-direction: column;
  }

  .feedback-banner__button {
    width: 100%;
  }

  .feedback-modal__dialog {
    width: 100%;
    margin-top: auto;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 42rem);
    overflow-y: auto;
  }

  .feedback-modal__actions {
    flex-direction: column-reverse;
  }

  .feedback-modal__actions > * {
    width: 100%;
  }

  .feedback-toast {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-launch {
    transition: none;
  }
}
