.feedback-page {
  max-width: 1020px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.feedback-hero {
  padding: 46px 24px 40px;
  text-align: center;
}

.feedback-hero-icon {
  font-size: 30px;
  color: var(--blue);
  margin-bottom: 14px;
}

.feedback-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 650;
  color: var(--text);
}

.feedback-hero p {
  max-width: 490px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 12px;
}

.feedback-create-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.feedback-create-trigger:hover {
  border-color: var(--blue);
}

.feedback-create-trigger span:last-child {
  font-size: 24px;
  line-height: 1;
  color: var(--blue);
}

.feedback-form {
  max-width: 650px;
  margin: 0 auto 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

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

.feedback-form h2 {
  margin: 0 0 20px;
  font-size: 17px;
}

.feedback-form label {
  display: block;
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
}

.feedback-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.feedback-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 20px;
}

.feedback-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feedback-filters select,
.feedback-filters input {
  min-height: 39px;
  font-size: 12px;
}

.feedback-filters input {
  width: 200px;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.feedback-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 58px;
  min-height: 65px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.feedback-vote span {
  font-size: 20px;
}

.feedback-vote strong {
  font-size: 14px;
  color: var(--text);
}

.feedback-vote.voted {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--interactive-highlight);
}

.feedback-card-body {
  min-width: 0;
  flex: 1;
}

.feedback-card h3 {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--text);
}

.feedback-card-body > p {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.feedback-category,
.feedback-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--interactive-highlight);
  color: var(--text);
}

.feedback-status-completed {
  color: #168359;
}

.feedback-status-in_progress,
.feedback-status-planned {
  color: var(--blue);
}

.feedback-status-rejected {
  color: var(--muted);
}

.feedback-official-response {
  margin-top: 17px;
  padding: 14px;
  border-left: 2px solid var(--blue);
  background: var(--interactive-highlight);
  border-radius: 8px;
}

.feedback-official-response strong {
  font-size: 12px;
}

.feedback-official-response p {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-empty {
  padding: 65px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
}

.feedback-empty h3 {
  margin: 0 0 8px;
  color: var(--text);
}

@media (max-width: 700px) {
  .feedback-hero {
    padding: 28px 5px 30px;
  }

  .feedback-toolbar,
  .feedback-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-filters input,
  .feedback-filters select {
    width: 100%;
  }

  .feedback-card {
    padding: 15px;
    gap: 12px;
  }

  .feedback-vote {
    flex-basis: 46px;
    min-height: 58px;
  }

  .feedback-form {
    padding: 18px;
  }
}

/* Раскрывающийся редактор идей */
.feedback-composer {
  width: min(100%, 600px);
  margin: 0 auto;
  text-align: left;
}

.feedback-composer .feedback-create-trigger {
  width: 100%;
}

.feedback-composer .feedback-create-trigger[hidden],
.feedback-composer .feedback-form[hidden] {
  display: none;
}

.feedback-composer .feedback-form {
  max-width: none;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 5%);
}

.feedback-composer #feedback-title,
.feedback-composer #feedback-description {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 10px 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  outline: none;
}

.feedback-composer #feedback-title {
  font-size: 14px;
  font-weight: 600;
}

.feedback-composer #feedback-description {
  min-height: 140px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.6;
}

.feedback-composer #feedback-title:focus,
.feedback-composer #feedback-description:focus {
  border: 0;
  outline: none;
  box-shadow: none;
}

.feedback-description-count {
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  margin: 4px 0 12px;
}

.feedback-composer .feedback-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.feedback-composer #feedback-category {
  width: auto;
  min-width: 180px;
  max-width: 100%;
  min-height: 40px;
  font-size: 12px;
}

.feedback-form-buttons {
  display: flex;
  gap: 8px;
}

@media (max-width: 700px) {
  .feedback-composer .feedback-form {
    padding: 14px;
  }

  .feedback-composer .feedback-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-composer #feedback-category {
    width: 100%;
  }

  .feedback-form-buttons {
    justify-content: flex-end;
  }
}

/* Каталог идей: поиск без фильтра категорий */
.feedback-filters {
  margin-left: auto;
}

.feedback-filters input {
  width: 240px;
}

@media (max-width: 700px) {
  .feedback-filters {
    width: 100%;
    margin-left: 0;
  }

  .feedback-filters input {
    width: 100%;
  }
}

/* Пагинация каталога предложений */
.feedback-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.feedback-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.feedback-pagination button.active {
  border-color: var(--blue);
  background: var(--interactive-highlight);
  color: var(--blue);
  font-weight: 600;
}

.feedback-pagination button:hover:not(.active) {
  background: var(--surface-hover);
}

/* Итоговое расположение пагинации */
.feedback-pagination {
  justify-content: space-between;
  gap: 16px;
}

.feedback-pagination-summary {
  font-size: 12px;
  color: var(--muted);
}

.feedback-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 700px) {
  .feedback-pagination {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* Компактные и раскрытые карточки предложений */
.feedback-idea-title {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.feedback-idea-title:hover {
  color: var(--blue);
}

.feedback-idea-title:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}

.feedback-card:not(.expanded) .feedback-card-body > p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.feedback-card:not(.expanded) .feedback-official-response {
  display: none;
}

.feedback-idea-back {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.feedback-idea-back[hidden] {
  display: none;
}

.feedback-idea-back:hover {
  text-decoration: underline;
}
