/* =========================================================
   Feedback page
   ========================================================= */

.page-feedback {
  width: 100%;
}

.hero--feedback {
  min-height: 100vh;
  height: auto;
  padding-top: 96px;
  margin-top: -96px;
  padding-bottom: 40px;
  align-items: center;
}

.feedback-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feedback-hero-text {
  max-width: 880px;
  text-align: center;
  margin: 0 auto;
}

.feedback-banner {
  background-color: rgba(14, 17, 17, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px 24px;
  text-align: center;
}

.feedback-banner p {
  margin: 0;
  line-height: 1.6;
}

.feedback-banner__meta {
  margin-top: 8px !important;
  color: var(--muted);
  font-size: 0.95rem;
}

.feedback-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.feedback-card {
  background-color: rgba(14, 17, 17, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}

.feedback-card__icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.feedback-card h2 {
  font-size: 1.65rem;
  margin-bottom: 12px;
}

.feedback-card__description {
  line-height: 1.6;
  margin-bottom: 24px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.feedback-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.feedback-fieldset legend,
.feedback-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

.rating-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rating-pill,
.option-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.rating-pill {
  min-width: 56px;
  padding: 0 18px;
}

.option-pill {
  width: 100%;
  justify-content: flex-start;
  padding: 16px 18px;
  margin-bottom: 12px;
  text-align: left;
  line-height: 1.5;
}

.rating-pill:hover,
.option-pill:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

.rating-pill input,
.option-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.rating-pill span,
.option-pill span {
  pointer-events: none;
}

.rating-pill input:checked + span,
.option-pill input:checked + span {
  color: var(--brand-contrast);
}

.rating-pill:has(input:checked),
.option-pill:has(input:checked) {
  background: var(--brand);
  border-color: var(--brand);
}

.feedback-field textarea,
.feedback-field input[type="text"] {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  padding: 16px 18px;
  resize: vertical;
}

.feedback-field textarea:focus,
.feedback-field input[type="text"]:focus,
.feedback-submit:focus-visible,
.rating-pill:has(input:focus-visible),
.option-pill:has(input:focus-visible) {
  outline: 3px solid var(--brand-soft);
  outline-offset: 2px;
}

.field-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.feedback-submit {
  border: 0;
  border-radius: 16px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font: inherit;
  font-weight: 700;
  padding: 15px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.feedback-submit:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.feedback-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.form-status {
  min-height: 1.5em;
  font-size: 0.96rem;
  line-height: 1.5;
}

.form-status.is-success {
  color: #8bd7aa;
}

.form-status.is-error {
  color: #ffb4ab;
}

.feedback-honeypot,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

@media (prefers-color-scheme: light) {
  .hero--feedback {
    --overlay-top: rgba(246, 247, 248, 0.38);
    --overlay-mid: rgba(246, 247, 248, 0.28);
    --overlay-bottom: rgba(246, 247, 248, 0.43);
  }

  .feedback-banner,
  .feedback-card {
    background-color: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  }

  .rating-pill,
  .option-pill,
  .feedback-field textarea,
  .feedback-field input[type="text"] {
    background: rgba(255, 255, 255, 0.56);
    border-color: rgba(14, 17, 17, 0.12);
  }

  .field-help {
    color: #4f6264;
    font-weight: 500;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .form-status.is-success {
    color: #1f6b42;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .form-status.is-error {
    color: #a33b33;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
  }
}

@media (max-width: 920px) {
  .feedback-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .feedback-card {
    padding: 24px 18px;
  }

  .feedback-card h2 {
    font-size: 1.45rem;
  }

  .feedback-banner {
    padding: 18px 16px;
  }

  .rating-group {
    gap: 10px;
  }

  .rating-pill {
    min-width: 48px;
    min-height: 48px;
    padding: 0 14px;
  }
}
