/* Støttearket bag »?« (F5 §4.5, FS-H1–H5, A4; _support_sheet.html.erb, support_sheet_controller.js).
   In the layout with the other task styles (so Turbo never shows the page unstyled); every rule is scoped
   to .support-help, .support-mode or .support-back, which only the support sheet renders (R12).
   »?« is the summary of details.support-help, in the head row where it always was. Every support
   (guide, introduction, video, formulas) is its own details beside it with its summary hidden: the
   choices in the sheet open them. Like the formula sheet (FS-K4): below 700 px a sheet from the
   bottom at most 80 % high, 700–1099 px at most 70 %, from 1100 px a panel on the right,
   min(42 %, 480 px), and the task moves left so the answer stays in view. Light panel also in the
   dark themes (FS-M1). Choices at least 56 px high with icon and word (FS-H5, FS-T1). */
.task-guides.support-mode > details:not(.support-help) > summary { display: none; }
.support-help { margin: 0; padding: 0; border: 0; min-width: 0; flex: 0 0 auto; }
.support-help > summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; list-style: none; border-radius: 50%; cursor: pointer; font-size: 0; }
.support-help > summary::-webkit-details-marker { display: none; }
.support-help > summary .guided-intro-badge { margin: 0; width: 40px; height: 40px; font-size: 1.35rem; }
.support-help > summary:focus-visible { outline: 3px solid var(--theme-primary, var(--purple)); outline-offset: 2px; }

.support-help > .support-scrim, .support-help > .support-panel { display: none; }
.support-help[open] > .support-scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgb(10 26 26 / 30%); }
.support-help[open] > .support-panel { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 80dvh; overflow: hidden; background: var(--panel); color: var(--ink); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px rgb(10 42 40 / 22%); padding-bottom: env(safe-area-inset-bottom); text-align: left; font-size: 17px; font-weight: 500;
  animation: support-rise .25s ease; }
html:has(.support-help[open]) { overflow: hidden; }
.support-help.support-still[open] > .support-panel { animation: none; }
@media (prefers-reduced-motion: reduce) { .support-help[open] > .support-panel { animation: none; } }
@keyframes support-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.support-grab { flex: 0 0 auto; width: 46px; height: 5px; border-radius: 3px; background: #8b9a9a; margin: 8px auto 0; }
.support-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 16px; }
.support-head h2 { margin: 0 auto 0 0; font-size: 1.25rem; outline: none; color: var(--ink); }
.support-close { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--theme-strong, var(--ink)); font: inherit; font-weight: 750; cursor: pointer; }
.support-close .luxi-icon { width: 20px; height: 20px; }
.support-choices { list-style: none; margin: 0; padding: 4px 12px 20px; display: grid; gap: 10px; overflow-y: auto; overscroll-behavior: contain; }
.support-choices li { display: flex; align-items: center; gap: 8px; }
.support-choice { flex: 1 1 auto; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 18px;
  background: var(--panel); color: var(--ink); font: inherit; font-size: 18px; font-weight: 800; text-align: left; cursor: pointer; }
.support-choice:hover { border-color: var(--theme-primary, var(--purple)); }
.support-choice-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--theme-primary, var(--purple)); color: #fff; }
.support-choice-icon .luxi-icon { width: 24px; height: 24px; }
.support-choice.is-suggested { border-color: var(--theme-primary, var(--purple)); border-width: 2.5px; }
.support-suggested { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--peach, #ffe7c2); color: #5f3a00; font-size: 14px; font-weight: 800; }
.support-choices[hidden], .support-head > .support-back[hidden], .support-note[hidden] { display: none; }
a.support-choice { text-decoration: none; }
.support-choice-label { display: flex; flex-direction: column; min-width: 0; }
.support-choice-sub { font-size: 15px; font-weight: 600; color: var(--muted, #4d5f5f); }
.support-chevron { margin-left: auto; display: grid; place-items: center; color: var(--theme-strong, var(--ink)); }
.support-chevron .luxi-icon { width: 22px; height: 22px; }
.support-note { flex: 0 0 auto; margin: 0; padding: 0 16px 18px; font-size: 15px; font-weight: 600; color: var(--muted, #4d5f5f); }
.support-panel :focus-visible { outline: 3px solid var(--theme-primary, var(--purple)); outline-offset: 3px; }

/* »Tilbage« in a support opened from the sheet. */
.support-back { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--theme-strong, var(--ink)); font: inherit; font-size: 16px; font-weight: 750; cursor: pointer; }
.support-back .luxi-icon { width: 20px; height: 20px; }
.intro-heading:has(> .support-back) { display: flex; align-items: center; gap: 10px; }
.video-head:has(> .support-back) { gap: 10px; }
.fsh-head:has(> .support-back) { justify-content: flex-start; }
.fsh-head:has(> .support-back) h2 { margin-right: auto; }

@media (min-width: 700px) {
  .support-help[open] > .support-panel { max-height: 70dvh; }
  .support-choices { width: 100%; max-width: 560px; margin: 0 auto; padding: 4px 20px 24px; }
  .support-note { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px 20px; }
}
@media (min-width: 1100px) {
  html:has(.support-help[open]) { overflow: auto; }
  .support-help[open] > .support-scrim { background: transparent; pointer-events: none; }
  .support-help[open] > .support-panel { top: 0; left: auto; width: min(42%, 480px); max-height: none; border-radius: 20px 0 0 20px;
    border-left: 1.5px solid var(--line); box-shadow: -8px 0 28px rgb(10 42 40 / 18%); animation: none; }
  .task-screen:has(.support-help[open]) .app-shell { margin-right: min(42%, 480px); }
  .support-grab { display: none; }
  .support-choices { padding: 4px 14px 24px; }
}
