.nav-feedback-button {
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.18);
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  min-height: 2.1rem;
  padding: 0 0.8rem;
  cursor: pointer;
}

.nav-feedback-button:hover {
  background: rgb(255 255 255 / 0.28);
}

.admin-nav .nav-feedback-button {
  border: 0;
  border-radius: 999px;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
}

.feedback-modal {
  width: min(640px, calc(100% - 1.5rem));
  border: 0;
  border-radius: 14px;
  padding: 0;
  color: #2f3437;
  max-height: calc(100vh - 2rem);
}

.feedback-modal::backdrop {
  background: rgb(0 0 0 / 0.35);
}

.feedback-modal-panel {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
}

.feedback-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.feedback-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.feedback-modal-close {
  border: 1px solid rgb(47 52 55 / 0.22);
  border-radius: 10px;
  background: #fff;
  color: #2f3437;
  font: inherit;
  font-weight: 700;
  min-height: 2.15rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

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

.feedback-modal label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.feedback-modal input,
.feedback-modal textarea,
.feedback-modal button {
  font: inherit;
}

.feedback-types {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0.6rem 0.7rem 0.7rem;
  border: 1px solid rgb(47 52 55 / 0.18);
  border-radius: 12px;
}

.feedback-types legend {
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0 0.35rem;
}

.feedback-types-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.feedback-types-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgb(47 52 55 / 0.16);
  border-radius: 10px;
  background: #fff;
  margin: 0;
}

.feedback-types-list input[type='radio'] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: #2e8b7a;
  border: 0;
  background: transparent;
  box-shadow: none;
  appearance: auto;
}

.feedback-message-label {
  display: grid;
  gap: 0.45rem;
}

.feedback-form textarea {
  width: 100%;
  min-height: 8.5rem;
  border: 1px solid rgb(47 52 55 / 0.24);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
}

.feedback-context {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
}

.feedback-context input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0.1rem 0 0;
  padding: 0;
  accent-color: #2e8b7a;
  border: 0;
  background: transparent;
  box-shadow: none;
  appearance: auto;
}

.feedback-modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.feedback-secondary {
  border: 1px solid rgb(47 52 55 / 0.25);
  border-radius: 10px;
  background: #fff;
  color: #2f3437;
  font: inherit;
  font-weight: 700;
  min-height: 2.2rem;
  padding: 0 0.85rem;
  cursor: pointer;
}

.feedback-secondary:hover {
  background: #f5f7f8;
}

.feedback-primary {
  border: 0;
  border-radius: 10px;
  background: #2e8b7a;
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: 2.2rem;
  padding: 0 0.85rem;
  cursor: pointer;
}

.feedback-primary:hover {
  background: #256f62;
}

.feedback-secondary:disabled,
.feedback-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.feedback-status {
  min-height: 1.2rem;
  margin: 0;
}

.feedback-status.ok {
  color: #1f5f46;
}

.feedback-status.error {
  color: #8a2d2d;
}

@media (max-width: 640px) {
  .nav-feedback-button {
    font-size: 0.8rem;
    min-height: 2rem;
    padding: 0 0.65rem;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .feedback-modal-panel {
    padding: 1rem;
  }

  .feedback-types-list {
    grid-template-columns: 1fr;
  }

  .feedback-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .site-nav .nav-feedback-button,
  .admin-nav .nav-feedback-button {
    margin-left: 0;
    max-width: 100%;
  }
}
