/*
 * Uninstall page. Tokens, header and buttons come from /styles.css.
 * The feedback form is a white sheet in both themes, like the invoice
 * paper on the landing page.
 */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/Manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20BD;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang__btn {
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.lang__btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-fg);
}

.bye {
  padding-block: clamp(32px, 6vw, 88px) clamp(48px, 7vw, 96px);
}

.bye__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.bye__title {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.bye__lead {
  max-width: 26em;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* ---------- Sheet ---------- */

.sheet {
  padding: clamp(20px, 3vw, 36px);
  background: var(--paper);
  color: var(--paper-text);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(23 48 42 / 10%), 0 24px 48px -24px rgb(23 48 42 / 45%);
}

.reasons {
  margin: 0;
  padding: 0;
  border: 0;
}

.reasons legend,
.sheet__title {
  width: 100%;
  margin: 0 0 8px;
  padding: 0 0 12px;
  border-bottom: 1.5px solid var(--paper-text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--paper-rule);
  cursor: pointer;
}

.opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.opt__text::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  margin-right: 14px;
  vertical-align: -4px;
  border: 1.5px solid var(--paper-muted);
  border-radius: 50%;
  background: transparent;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.opt:hover .opt__text::before {
  border-color: var(--paper-text);
}

.opt input:checked + .opt__text {
  font-weight: 700;
}

.opt input:checked + .opt__text::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 4px var(--paper);
}

.opt:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.field {
  margin-top: 24px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field textarea,
.field input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--paper-rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--paper-text);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.field textarea:focus-visible,
.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.error {
  margin-top: 16px;
  padding: 10px 12px;
  border-left: 4px solid #b3261e;
  background: #fbe9e7;
  color: #7a1712;
  font-size: 0.9375rem;
}

.sheet__submit {
  width: 100%;
  margin-top: 24px;
}

.sheet__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.done {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding-block: 24px;
  color: var(--primary);
}

.done[hidden] {
  display: none;
}

.done__title {
  color: var(--paper-text);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.done p {
  max-width: 28em;
  color: var(--paper-muted);
}

@media (max-width: 960px) {
  .bye__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .opt__text::before {
    transition: none;
  }
}
