/* ============================================================
   LSANY · confirm dialog styles. Pairs with shared/confirm.js.

   Every token is written as var(--x, fallback). This has to render correctly
   on Lsany Kids, which does not load styles.css and whose palette is its own
   --k-* world, and it has to render correctly on a page that loads only
   styles.css. A dialog that inherits nothing is still a legible dialog.

   Moved here out of courses/courses.css, where it lived while only four course
   pages could open it.
   ============================================================ */

.lsany-confirm-scrim {
  position: fixed;
  inset: 0;
  /* Some pages cap every top-level block (body > *) to a column; the scrim
     must still cover the whole screen (family page, 2026-11-14). */
  max-width: none;
  margin: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 16, 14, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s var(--ease-smooth, cubic-bezier(.4, 0, .2, 1));
}
.lsany-confirm-scrim.show { opacity: 1; }

/* The page under a dialog does not scroll. Without this, a phone keyboard or a
   stray swipe moves the page behind the scrim while the dialog stays pinned,
   which reads as the app having lost its place. */
body.lsany-confirm-open { overflow: hidden; }

.lsany-confirm {
  width: 100%;
  max-width: 360px;
  background: var(--surface, #16302A);
  border: 1px solid var(--stroke-strong, rgba(243, 239, 227, 0.18));
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .6);
  transform: translateY(10px) scale(.98);
  transition: transform .2s var(--ease-smooth, cubic-bezier(.4, 0, .2, 1));
}
.lsany-confirm-scrim.show .lsany-confirm { transform: none; }

.lc-title {
  font-family: var(--f-display, 'Unbounded', system-ui, sans-serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  color: var(--cream, #F3EFE3);
  margin: 0 0 8px;
}
.lc-body {
  font-family: var(--f-body, 'Instrument Sans', system-ui, sans-serif);
  font-size: 14px;
  color: var(--secondary, #93A79F);
  margin: 0 0 18px;
  line-height: 1.45;
}

.lc-actions { display: flex; gap: 10px; }
.lc-btn {
  flex: 1;
  font-family: var(--f-body, 'Instrument Sans', system-ui, sans-serif);
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  /* 44px so the two buttons are a real touch target on a phone. They sit side
     by side and one of them deletes something. */
  min-height: 44px;
  padding: 11px 14px;
  cursor: pointer;
  border: 1px solid var(--stroke, rgba(243, 239, 227, 0.12));
  transition: background .16s, border-color .16s, color .16s;
}
.lc-btn:focus-visible { outline: 2px solid var(--gold, #F0B429); outline-offset: 2px; }

/* Cancel is the filled one, deliberately. The emphasised button is the one
   that changes nothing. */
.lc-cancel {
  background: var(--gold-deep, #B07C10);
  border-color: var(--gold-deep, #B07C10);
  color: #FAF5E8;
}
.lc-cancel:hover {
  background: var(--gold, #F0B429);
  border-color: var(--gold, #F0B429);
}
.lc-confirm { background: transparent; color: var(--cream, #F3EFE3); }
.lc-confirm:hover {
  background: var(--chip-bg, rgba(243, 239, 227, 0.06));
  border-color: var(--stroke-strong, rgba(243, 239, 227, 0.18));
}

/* The destructive confirm. #EF3340 is the same literal account.css already
   uses for Delete account, for the same reason recorded there: --uae-red is a
   real token but only inside the six book palettes, and the site palette has
   no danger colour. It measures 4.71 on --bg and 4.52 on --surface, so it
   clears 4.5 as 14px/600 label text on the surface this dialog sits on. */
.lc-btn.lc-danger {
  color: #EF3340;
  background: transparent;
  border-color: rgba(239, 51, 64, 0.45);
}
.lc-btn.lc-danger:hover {
  background: rgba(239, 51, 64, 0.12);
  border-color: #EF3340;
}
.lc-btn.lc-danger:focus-visible { outline-color: #EF3340; }

/* A notice has one button and nothing to weigh up, so it is full width. */
.lsany-confirm--notice .lc-actions { justify-content: stretch; }

/* ---- Lsany Kids ----------------------------------------------------------
   Kids does not load styles.css and its whole language is thick strokes, hard
   offsets and flat colour. Inheriting the adult chrome here would make the one
   moment a parent is about to delete their child's work look like a different
   product. Every var below is --k-*, so these rules are inert anywhere else. */
.lsany-confirm--kids {
  background: var(--k-panel, #16302A);
  border: var(--k-stroke, 3px) solid var(--k-ink, #F3EFE3);
  border-radius: var(--k-r, 20px);
  box-shadow: var(--k-offset, 5px) var(--k-offset, 5px) 0 var(--k-shade, #04100E);
}
.lsany-confirm--kids .lc-title {
  font-family: var(--k-f-display, 'Unbounded', system-ui, sans-serif);
  font-size: var(--k-t-mid, 20px);
  color: var(--k-ink, #F3EFE3);
}
.lsany-confirm--kids .lc-body {
  font-family: var(--k-f-body, 'Instrument Sans', system-ui, sans-serif);
  font-size: var(--k-t-small, 15px);
  color: var(--k-dim, #93A79F);
}
.lsany-confirm--kids .lc-btn {
  font-family: var(--k-f-body, 'Instrument Sans', system-ui, sans-serif);
  border-radius: var(--k-r-sm, 12px);
  border-width: var(--k-stroke-hair, 2px);
}
.lsany-confirm--kids .lc-cancel {
  background: var(--k-gold, #F0B429);
  border-color: var(--k-ink, #F3EFE3);
  color: var(--k-on-gold, #0B1917);
}
.lsany-confirm--kids .lc-confirm { color: var(--k-ink, #F3EFE3); border-color: var(--k-ink, #F3EFE3); }
.lsany-confirm--kids .lc-btn.lc-danger {
  color: var(--k-coral, #FF8A6B);
  border-color: var(--k-coral, #FF8A6B);
}
.lsany-confirm--kids .lc-btn.lc-danger:hover { background: rgba(255, 138, 107, 0.14); }

@media (prefers-reduced-motion: reduce) {
  .lsany-confirm-scrim,
  .lsany-confirm { transition: none; }
}
