/* Support/contact UI - isolated from the quiz bundle. */
.support-trigger {
  appearance: none;
  border: 1px solid rgba(37, 95, 80, .22);
  background: #f4faf7;
  color: var(--green, #285f50);
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 12px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.support-trigger:hover {
  background: #fff;
  border-color: var(--green, #285f50);
  transform: translateY(-1px);
}
.support-trigger:focus-visible,
.support-close:focus-visible,
.support-email:focus-visible,
.support-mail-button:focus-visible {
  outline: 3px solid rgba(40, 95, 80, .25);
  outline-offset: 3px;
}
.support-trigger svg { width: 18px; height: 18px; flex: none; }

.support-modal[hidden] { display: none !important; }
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 21, 16, .62);
  backdrop-filter: blur(5px);
}
.support-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--card, #fffdf7);
  color: var(--ink, #17241f);
  border: 1px solid var(--line, #ded8ca);
  border-radius: 22px 7px;
  box-shadow: 0 30px 90px rgba(7, 18, 14, .28);
  position: relative;
}
.support-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, #ded8ca);
  border-radius: 11px 4px;
  background: #fff;
  color: var(--ink, #17241f);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.support-content {
  padding: 58px 48px 46px;
  text-align: center;
}
.support-kicker {
  color: var(--green, #285f50);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}
.support-icon {
  width: 56px;
  height: 56px;
  margin: 14px auto 10px;
  border-radius: 18px 6px;
  display: grid;
  place-items: center;
  background: #eef7f2;
  color: var(--green, #285f50);
}
.support-icon svg { width: 27px; height: 27px; }
.support-content h2 {
  margin: 8px 0 16px;
  font-family: "Frank Ruhl Libre", serif;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
}
.support-content p {
  max-width: 510px;
  margin: 0 auto;
  color: var(--muted, #666056);
  font-size: 17px;
  line-height: 1.85;
}
.support-email {
  display: inline-block;
  margin-top: 22px;
  color: var(--green, #285f50);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.support-email:hover { text-decoration: underline; }
.support-mail-button {
  width: fit-content;
  margin: 18px auto 0;
  padding: 11px 18px;
  border-radius: 12px 4px;
  background: var(--green, #285f50);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition: transform .18s ease, filter .18s ease;
}
.support-mail-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.support-mail-button svg { width: 18px; height: 18px; }
body.support-open { overflow: hidden; }

@media (max-width: 680px) {
  .support-trigger {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    font-size: 0;
  }
  .support-trigger svg { width: 20px; height: 20px; }
  .support-modal { padding: 14px; }
  .support-dialog { max-height: calc(100vh - 28px); }
  .support-content { padding: 60px 20px 28px; }
  .support-content h2 { font-size: 36px; }
  .support-content p { font-size: 15px; }
  .support-mail-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .support-trigger,
  .support-mail-button { transition: none; }
}

/* In-site support form */
.support-form {
  margin: 24px auto 0;
  max-width: 520px;
  display: grid;
  gap: 14px;
  text-align: right;
}
.support-form label {
  display: grid;
  gap: 7px;
  color: var(--ink, #17241f);
  font-weight: 800;
}
.support-form input,
.support-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line, #ded8ca);
  background: #fff;
  color: var(--ink, #17241f);
  border-radius: 12px 4px;
  padding: 11px 13px;
  font: inherit;
  font-weight: 500;
  line-height: 1.45;
}
.support-form textarea { resize: vertical; min-height: 130px; }
.support-form input:focus,
.support-form textarea:focus {
  outline: 3px solid rgba(40, 95, 80, .16);
  border-color: var(--green, #285f50);
}
.support-status {
  min-height: 24px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.support-status.is-success { color: #236344; }
.support-status.is-error { color: #9b2f28; }
.support-mail-button[disabled] {
  opacity: .65;
  cursor: wait;
  transform: none;
}
.support-form .support-mail-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.support-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
