.feedback-page {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 2rem;
}

.feedback-card {
  padding: clamp(1rem, 3vw, 2rem);
}

.feedback-card h2{
  text-align: center;
}

.feedback-form {
  width: 100%;
}

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

.feedback-field {
  position: relative;
  margin-bottom: 1.25rem;
}

.feedback-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.feedback-control {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text);
  background: var(--bg-card);
  font: inherit;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.feedback-control:focus {
  border-color: #4d8dff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.18);
}

.feedback-control[readonly] {
  cursor: default;
  opacity: 0.78;
}

.feedback-control--textarea {
  min-height: 160px;
  resize: vertical;
}

.feedback-field__counter {
  margin-top: 0.35rem;
  color: #818181;
  font-size: 0.8rem;
  text-align: right;
}

.feedback-control.is-invalid,
.feedback-check__input.is-invalid {
  border-color: #dc3545;
}

.feedback-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.35rem;
  color: #dc3545;
  font-size: 0.85rem;
  line-height: 1.35;
}

.is-invalid + .invalid-feedback,
.feedback-field .is-invalid ~ .invalid-feedback,
.feedback-check .is-invalid ~ .invalid-feedback,
.form-attach.is-invalid > .invalid-feedback {
  display: block;
}

.form-attach__wrapper {
  position: relative;
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  border: 2px dashed var(--border-color);
  border-radius: 0.65rem;
  background: var(--bg-card);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form-attach__wrapper:hover,
.form-attach__wrapper:focus,
.form-attach__wrapper:focus-within,
.form-attach__wrapper.is-dragover {
  border-color: #4d8dff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.12);
}

.form-attach.is-invalid .form-attach__wrapper {
  border-color: #dc3545;
}

.form-attach__input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.form-attach__description {
  display: grid;
  gap: 0.35rem;
  color: #818181;
  text-align: center;
  pointer-events: none;
}

.form-attach__description strong {
  color: var(--text);
  font-size: 0.95rem;
}

.form-attach__description span {
  font-size: 0.8rem;
}

.form-attach__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.form-attach__item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 150px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  background: var(--bg-card);
}

.form-attach__image {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
  background: rgba(127, 127, 127, 0.08);
}

.form-attach__file-type {
  display: flex;
  width: 100%;
  height: 100px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #dc2626;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-attach__name {
  padding: 0.55rem 0.55rem 0.2rem;
  overflow: hidden;
  color: var(--text);
  font-size: 0.75rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-attach__size {
  padding: 0 0.55rem 0.55rem;
  color: #818181;
  font-size: 0.7rem;
}

.form-attach__remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  z-index: 3;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.form-attach__remove:hover,
.form-attach__remove:focus {
  background: #dc3545;
  outline: 0;
}

.feedback-check {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.65rem;
  margin: 0.25rem 0 1.25rem;
}

.feedback-check__input {
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  accent-color: #4d8dff;
}

.feedback-check__label {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.feedback-check__label a {
  text-decoration: underline;
}

.feedback-check .invalid-feedback {
  grid-column: 2;
}

.feedback-captcha {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.feedback-captcha .invalid-feedback {
  text-align: center;
}

.feedback-config-warning {
  padding: 0.75rem 1rem;
  border: 1px solid #dc3545;
  border-radius: 0.5rem;
  color: #dc3545;
}

.feedback-submit {
  text-align: center;
}

.feedback-submit__button {
  position: relative;
  display: inline-flex;
  min-width: 170px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid #0d6efd;
  border-radius: 0.5rem;
  color: #fff;
  background: #0d6efd;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}

.feedback-submit__button:hover:not(:disabled) {
  border-color: #0b5ed7;
  background: #0b5ed7;
}

.feedback-submit__button:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.22);
}

.feedback-submit__button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.feedback-submit__button.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: feedback-spinner 0.7s linear infinite;
}

.form-error {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #dc3545;
  border-radius: 0.5rem;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.06);
  font-size: 0.9rem;
}

.form-error_hide {
  display: none;
}

.feedback-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.feedback-success {
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid #198754;
  border-radius: 0.5rem;
  color: #157347;
  background: rgba(25, 135, 84, 0.1);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.feedback-success.is-hiding {
  opacity: 0;
}

@keyframes feedback-spinner {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .feedback-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-attach__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .form-attach__items {
    grid-template-columns: 1fr;
  }

  .form-attach__item {
    min-height: 190px;
  }

  .form-attach__image {
    height: 140px;
  }
}
