/*
 * Feedback & Complaints page — v12.9.0
 * Scoped to the dedicated template so no other public page is affected.
 */

.ha-feedback-page {
  --ha-feedback-ink: #102b3a;
  --ha-feedback-muted: #49626e;
  --ha-feedback-line: #d3e2e7;
  --ha-feedback-cyan: #1686a1;
  --ha-feedback-magenta: #87005f;
  --ha-feedback-header-height: 139px;
  --ha-feedback-jump-height: 75px;
  color: var(--ha-feedback-ink);
  background: #fff;
}

.ha-feedback-page :where(#choose-pathway, #your-rights, #what-happens-next, #contact-options, #share-feedback) {
  scroll-margin-top: calc(var(--ha-feedback-header-height) + var(--ha-feedback-jump-height) + 1rem);
}

.ha-feedback-hero {
  padding-block: clamp(3.2rem, 6vw, 5.75rem);
  background:
    radial-gradient(circle at 5% 92%, rgba(157, 43, 120, .08), transparent 22rem),
    linear-gradient(122deg, #94b4bf 0%, #fff 56%, #fdf6fa 100%);
}

.ha-feedback-hero::after {
  top: -13rem;
  right: -8rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(56, 165, 193, .13);
  background: rgba(255, 255, 255, .24);
  box-shadow: 0 0 0 4.5rem rgba(255, 255, 255, .13);
}

.ha-feedback-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .72fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.75rem);
}

.ha-feedback-hero__copy { min-width: 0; }
.ha-feedback-hero h1 {
  max-width: 780px;
  margin-bottom: 1.15rem;
  font-size: clamp(3rem, 6.5vw, 5.75rem);
  line-height: .99;
  letter-spacing: -.055em;
}

.ha-feedback-hero .ha-page-lead {
  max-width: 720px;
  margin-bottom: 0;
  color: #304f5c;
  font-size: clamp(1.08rem, 1.8vw, 1.27rem);
}

.ha-feedback-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 1.45rem;
  margin-top: 1.8rem;
}

.ha-feedback-hero__actions .ha-button {
  min-height: 50px;
  padding-inline: 1.25rem;
  border-radius: 10px;
  background: var(--ha-feedback-magenta);
}

.ha-feedback-hero__actions .ha-text-link { color: var(--ha-feedback-ink); }

.ha-feedback-assurance {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(16, 43, 58, .13);
  border-radius: 18px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 24px 60px rgba(16, 43, 58, .13);
  backdrop-filter: blur(10px);
}

.ha-feedback-assurance::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--ha-feedback-cyan), var(--ha-feedback-magenta));
}

.ha-feedback-assurance__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: .95rem;
  padding: 1.2rem 1.35rem 1.2rem 1.55rem;
}

.ha-feedback-assurance__item + .ha-feedback-assurance__item { border-top: 1px solid var(--ha-feedback-line); }
.ha-feedback-assurance__item > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e9f7fa;
  color: #0c7189;
}
.ha-feedback-assurance__item:nth-child(2) > span { background: #f8edf4; color: var(--ha-feedback-magenta); }
.ha-feedback-assurance__item:nth-child(3) > span { background: #edf6f2; color: #176d50; }
.ha-feedback-assurance__item .ha-icon { width: 22px; height: 22px; }
.ha-feedback-assurance__item strong { display: block; margin: .08rem 0 .22rem; font-size: .98rem; }
.ha-feedback-assurance__item p { margin: 0; color: var(--ha-feedback-muted); font-size: .84rem; line-height: 1.55; }

.ha-feedback-jump {
  position: sticky;
  top: var(--ha-feedback-header-height);
  z-index: 190;
  border-bottom: 1px solid var(--ha-feedback-line);
  background: #fff;
  box-shadow: 0 10px 25px rgba(16, 43, 58, .035);
}
.ha-feedback-jump .ha-container {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-block: .8rem;
  scrollbar-width: thin;
}
.ha-feedback-jump a {
  flex: 0 0 auto;
  min-height: 44px;
  padding: .72rem .95rem;
  border-radius: 8px;
  color: #274551;
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}
.ha-feedback-jump a:hover { background: #f0f8fa; color: var(--ha-feedback-magenta); }

.ha-feedback-section { padding-block: clamp(3.8rem, 7vw, 6.6rem); }
.ha-feedback-section-heading { max-width: 790px; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.ha-feedback-section-heading .ha-eyebrow { margin-bottom: .65rem; }
.ha-feedback-section-heading h2 {
  margin-bottom: .8rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.ha-feedback-section-heading > p:last-child {
  max-width: 740px;
  margin: 0;
  color: var(--ha-feedback-muted);
  line-height: 1.7;
}
.ha-feedback-section-heading--compact { margin-bottom: 1.45rem; }
.ha-feedback-section-heading--compact h2 { font-size: clamp(1.75rem, 3vw, 2.55rem); }

.ha-feedback-pathways { background: linear-gradient(180deg, #fff 0%, #f9fcfd 100%); }
.ha-feedback-pathway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.ha-feedback-pathway-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-content: start;
  gap: .95rem 1rem;
  min-height: 290px;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--ha-feedback-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 43, 58, .055);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ha-feedback-pathway-card::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: rgba(56, 165, 193, .055);
  pointer-events: none;
}
.ha-feedback-pathway-card:hover {
  transform: translateY(-5px);
  border-color: #afced7;
  box-shadow: 0 22px 45px rgba(16, 43, 58, .1);
}
.ha-feedback-pathway-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: #eaf7fa;
  color: #0f7188;
}
.ha-feedback-pathway-card:nth-child(2) .ha-feedback-pathway-card__icon { background: #f8eef5; color: var(--ha-feedback-magenta); }
.ha-feedback-pathway-card--complaint .ha-feedback-pathway-card__icon { background: #edf5f2; color: #176b4f; }
.ha-feedback-pathway-card__icon .ha-icon { width: 25px; height: 25px; }
.ha-feedback-pathway-card .ha-card-kicker { margin: .04rem 0 .25rem; font-size: .69rem; }
.ha-feedback-pathway-card h3 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.48rem); line-height: 1.2; }
.ha-feedback-pathway-card > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ha-feedback-muted);
  font-size: .93rem;
  line-height: 1.67;
}
.ha-feedback-pathway-card .ha-text-link { grid-column: 1 / -1; align-self: end; margin-top: auto; color: var(--ha-feedback-magenta); }

.ha-feedback-information {
  border-top: 1px solid #edf3f5;
  background: #fff;
}
.ha-feedback-information__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 355px);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.ha-feedback-information__main { min-width: 0; }
.ha-feedback-rights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 2rem;
}
.ha-feedback-rights-grid > div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid #d9e6ea;
  border-radius: 12px;
  background: #fbfdfe;
}
.ha-feedback-rights-grid .ha-icon {
  width: 22px;
  height: 22px;
  margin-top: .12rem;
  padding: 3px;
  border-radius: 50%;
  background: #dff2e9;
  color: #126845;
}
.ha-feedback-rights-grid p { margin: 0; color: #314e5a; font-size: .9rem; line-height: 1.58; }

.ha-feedback-editorial {
  margin: 2rem 0 3.25rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--ha-feedback-line);
  border-left: 5px solid var(--ha-feedback-cyan);
  border-radius: 10px 16px 16px 10px;
  background: linear-gradient(135deg, #f4fafc, #fff 70%);
  box-shadow: none;
}
.ha-feedback-editorial > :first-child { margin-top: 0; }
.ha-feedback-editorial > :last-child { margin-bottom: 0; }
.ha-feedback-editorial h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.ha-feedback-editorial .ha-form { display: none; }

.ha-feedback-process { padding-top: .75rem; }
.ha-feedback-process__list {
  counter-reset: none;
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ha-feedback-process__list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  margin: 0;
  padding: 1.05rem 1.15rem;
  border: 1px solid #d9e5e9;
  border-radius: 12px;
  background: #fff;
}
.ha-feedback-process__list li > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--ha-feedback-ink);
  color: #fff;
  font-size: .8rem;
  font-weight: 850;
}
.ha-feedback-process__list h3 { margin: .02rem 0 .25rem; font-size: 1.05rem; }
.ha-feedback-process__list p { margin: 0; color: var(--ha-feedback-muted); font-size: .87rem; line-height: 1.58; }
.ha-feedback-process__note {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: .7rem;
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: #edf7fa;
  color: #294b58;
  font-size: .86rem;
  line-height: 1.6;
}
.ha-feedback-process__note .ha-icon { width: 23px; height: 23px; color: #0d7189; }

.ha-feedback-channels { padding-top: clamp(3rem, 6vw, 4.8rem); }
.ha-feedback-channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.ha-feedback-channel-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  min-width: 0;
  min-height: 92px;
  padding: .95rem;
  border: 1px solid var(--ha-feedback-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ha-feedback-ink);
  text-decoration: none;
}
.ha-feedback-channel-card > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e9f7fa;
  color: #0c7189;
}
.ha-feedback-channel-card .ha-icon { width: 20px; height: 20px; }
.ha-feedback-channel-card small { display: block; margin-bottom: .14rem; color: var(--ha-feedback-muted); font-size: .7rem; }
.ha-feedback-channel-card strong { display: block; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.35; }
a.ha-feedback-channel-card:hover { border-color: #a9ccd6; background: #f8fcfd; }
.ha-feedback-address {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 1rem 0 0;
  color: var(--ha-feedback-muted);
  font-size: .86rem;
  line-height: 1.55;
}
.ha-feedback-address .ha-icon { width: 20px; height: 20px; flex: 0 0 20px; margin-top: .12rem; color: var(--ha-feedback-cyan); }

.ha-feedback-support {
  position: sticky;
  top: calc(var(--ha-header-height, 90px) + 1.5rem);
  display: grid;
  gap: .9rem;
}
.ha-feedback-support-card {
  padding: 1.35rem;
  border: 1px solid var(--ha-feedback-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 43, 58, .055);
}
.ha-feedback-support-card--independent {
  border-top: 4px solid var(--ha-feedback-cyan);
  background: linear-gradient(150deg, #f3fafc, #fff 60%);
}
.ha-feedback-support-card--urgent {
  border-color: #e2c7cb;
  background: #fff9f9;
}
.ha-feedback-support-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: .85rem;
  border-radius: 12px;
  background: #e7f5f8;
  color: #0b7088;
}
.ha-feedback-support-card--urgent .ha-feedback-support-card__icon { background: #f8e9eb; color: #9a2f3e; }
.ha-feedback-support-card__icon .ha-icon { width: 23px; height: 23px; }
.ha-feedback-support-card .ha-card-kicker { margin-bottom: .35rem; font-size: .68rem; }
.ha-feedback-support-card h2 { margin: 0 0 .65rem; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; }
.ha-feedback-support-card > p:not(.ha-card-kicker) { color: var(--ha-feedback-muted); font-size: .86rem; line-height: 1.62; }
.ha-feedback-support-card .ha-button { width: 100%; margin-top: .45rem; border-radius: 9px; font-size: .78rem; }
.ha-feedback-support-card--urgent .ha-button { background: #8a2635; }
.ha-feedback-support-card__phone {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  margin-top: 1rem;
  padding: .75rem;
  border-radius: 10px;
  background: #eaf6f9;
  color: var(--ha-feedback-ink);
  text-decoration: none;
}
.ha-feedback-support-card__phone .ha-icon { width: 22px; height: 22px; color: #0a6e86; }
.ha-feedback-support-card__phone small { display: block; color: var(--ha-feedback-muted); font-size: .68rem; }
.ha-feedback-support-card__phone strong { font-size: 1.05rem; }
.ha-feedback-support-card__meta { margin: .85rem 0; font-size: .77rem !important; }
.ha-feedback-support-card__links { display: grid; gap: .5rem; margin-top: .9rem; }
.ha-feedback-support-card__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .65rem .75rem;
  border-radius: 8px;
  background: #f4f8fa;
  color: var(--ha-feedback-magenta);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.ha-feedback-form-section {
  padding-block: clamp(4rem, 7vw, 6.75rem);
  border-top: 1px solid #d8e6ea;
  background:
    radial-gradient(circle at 95% 12%, rgba(157, 43, 120, .07), transparent 21rem),
    linear-gradient(140deg, #edf7fa 0%, #fff 58%, #fcf7fa 100%);
}
.ha-feedback-form-section__grid {
  display: grid;
  grid-template-columns: minmax(260px, .67fr) minmax(0, 1.33fr);
  align-items: start;
  gap: clamp(2.25rem, 5vw, 4.75rem);
}
.ha-feedback-form-section__intro { position: sticky; top: calc(var(--ha-header-height, 90px) + 1.5rem); }
.ha-feedback-form-section__intro h2 {
  margin-bottom: .8rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.ha-feedback-form-section__intro > p:not(.ha-eyebrow) { color: var(--ha-feedback-muted); line-height: 1.7; }
.ha-feedback-form-assurances { display: grid; gap: .65rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.ha-feedback-form-assurances li { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: .6rem; color: #2c4b57; font-size: .87rem; line-height: 1.55; }
.ha-feedback-form-assurances .ha-icon { width: 21px; height: 21px; padding: 3px; border-radius: 50%; background: #dcefe7; color: #146849; }
.ha-feedback-privacy-note {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: .65rem;
  margin-top: 1.45rem !important;
  padding: 1rem;
  border: 1px solid #cfdee3;
  border-radius: 10px;
  background: rgba(255, 255, 255, .65);
  font-size: .8rem !important;
}
.ha-feedback-privacy-note .ha-icon { width: 23px; height: 23px; color: #0f7189; }
.ha-feedback-privacy-note a { color: var(--ha-feedback-magenta); font-weight: 750; }

.ha-feedback-form-wrap { min-width: 0; }
.ha-feedback-form-wrap .ha-form {
  padding: clamp(1.35rem, 3.2vw, 2.2rem);
  border: 1px solid rgba(16, 43, 58, .13);
  border-radius: 16px;
  box-shadow: 0 24px 58px rgba(16, 43, 58, .11);
}
.ha-feedback-form-wrap .ha-form-intro { border-radius: 9px; }
.ha-feedback-form-wrap .ha-form input:not([type="checkbox"]),
.ha-feedback-form-wrap .ha-form select,
.ha-feedback-form-wrap .ha-form textarea { border-radius: 8px; }
.ha-feedback-form-wrap .ha-button--submit { min-height: 50px; border-radius: 9px; background: var(--ha-feedback-magenta); }
.ha-feedback-form-wrap .ha-form-help { font-size: .78rem; line-height: 1.55; }
.ha-feedback-identity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}
.ha-feedback-identity-fields[hidden] { display: none !important; }
.ha-feedback-identity-help { margin: -.15rem 0 0; color: var(--ha-feedback-muted); font-size: .76rem; line-height: 1.5; }
.ha-feedback-anonymous-note {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid #b9d9d0;
  border-radius: 10px;
  background: #edf8f4;
  color: #244b3f;
}
.ha-feedback-anonymous-note[hidden] { display: none !important; }
.ha-feedback-anonymous-note .ha-icon { width: 27px; height: 27px; color: #146748; }
.ha-feedback-anonymous-note p { margin: 0; font-size: .82rem; line-height: 1.55; }
.ha-feedback-form-wrap .ha-check { min-height: 44px; align-items: flex-start; padding-block: .45rem; }
.ha-feedback-form-wrap .ha-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: .06rem; }

@media (max-width: 1080px) {
  .ha-feedback-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr); gap: 2.5rem; }
  .ha-feedback-pathway-card { min-height: 315px; }
  .ha-feedback-information__grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 2.25rem; }
  .ha-feedback-channel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ha-feedback-hero__grid,
  .ha-feedback-information__grid,
  .ha-feedback-form-section__grid { grid-template-columns: 1fr; }
  .ha-feedback-assurance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ha-feedback-assurance::before { inset: 0 0 auto; width: auto; height: 5px; }
  .ha-feedback-assurance__item { grid-template-columns: 42px minmax(0, 1fr); padding: 1.2rem; }
  .ha-feedback-assurance__item + .ha-feedback-assurance__item { border-top: 0; border-left: 1px solid var(--ha-feedback-line); }
  .ha-feedback-pathway-grid { grid-template-columns: 1fr; }
  .ha-feedback-pathway-card { min-height: 0; }
  .ha-feedback-support,
  .ha-feedback-form-section__intro { position: static; }
  .ha-feedback-support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ha-feedback-support-card--independent { grid-row: span 2; }
}

@media (max-width: 680px) {
  .ha-feedback-hero { padding-block: 2.75rem 3.25rem; }
  .ha-feedback-hero h1 { font-size: clamp(2.7rem, 13vw, 4.25rem); }
  .ha-feedback-hero__actions { display: grid; gap: .8rem; }
  .ha-feedback-hero__actions .ha-button { width: 100%; }
  .ha-feedback-assurance { grid-template-columns: 1fr; }
  .ha-feedback-assurance__item + .ha-feedback-assurance__item { border-top: 1px solid var(--ha-feedback-line); border-left: 0; }
  .ha-feedback-jump .ha-container { width: 100%; padding-inline: 14px; }
  .ha-feedback-section { padding-block: 3.5rem; }
  .ha-feedback-pathway-card { grid-template-columns: 48px minmax(0, 1fr); padding: 1.25rem; }
  .ha-feedback-pathway-card__icon { width: 46px; height: 46px; }
  .ha-feedback-rights-grid,
  .ha-feedback-support,
  .ha-feedback-identity-fields { grid-template-columns: 1fr; }
  .ha-feedback-support-card--independent { grid-row: auto; }
  .ha-feedback-process__list li { grid-template-columns: 40px minmax(0, 1fr); padding: .95rem; }
  .ha-feedback-process__list li > span { width: 38px; height: 38px; }
  .ha-feedback-form-wrap .ha-form { padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ha-feedback-pathway-card { transition: none; }
  .ha-feedback-pathway-card:hover { transform: none; }
}

@media (forced-colors: active) {
  .ha-feedback-assurance,
  .ha-feedback-pathway-card,
  .ha-feedback-rights-grid > div,
  .ha-feedback-support-card,
  .ha-feedback-channel-card,
  .ha-feedback-form-wrap .ha-form { border: 1px solid CanvasText; }
}

@media print {
  .ha-feedback-jump,
  .ha-feedback-hero__actions,
  .ha-feedback-form-section,
  .ha-feedback-support-card--urgent .ha-button { display: none !important; }
  .ha-feedback-information__grid { display: block; }
  .ha-feedback-support { position: static; margin-top: 2rem; }
  .ha-feedback-pathway-card,
  .ha-feedback-support-card { break-inside: avoid; box-shadow: none; }
}
