/* app-consent.css: the AI-features disclosure sheet and the one profile row
   that carries the setting. The sheet is mounted on <body>, above the app
   shell, so it can be raised over whatever screen the student was on when an
   AI route hit the gate. Sugar Paper throughout — see STYLE.md. */

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  /* A definite row, so the sheet's own max-height:100% has something to clamp
     against: an auto row would take its height from the sheet and the sheet
     would grow straight past the bottom of the screen with its buttons on it. */
  grid-template-rows: minmax(0, 1fr);
  align-items: end;
  justify-items: center;
  padding: calc(var(--safe-top) + 14px) 12px calc(var(--safe-bottom) + 12px);
}

/* The toast root sits above the sheet; a save failure has to stay readable
   while the sheet is still up. */
body.consent-sheet-open .toast-stack {
  z-index: 60;
}

.consent-scrim {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(61, 56, 53, 0.24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.consent-sheet {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  width: min(100%, 430px);
  max-height: 100%;
  padding: 16px 6px 16px;
  box-shadow: var(--shadow-sticker);
  animation: consentSheetIn 240ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes consentSheetIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-sheet {
    animation: none;
  }
}

.consent-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
}

.consent-title {
  font-size: 25px;
}

.consent-close svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.consent-body {
  display: grid;
  gap: 13px;
  align-content: start;
  padding: 2px 14px 6px;
}

/* Only the read-only "?" view restates the state — everywhere else the row's
   switch (or the ask itself) already says it. */
.consent-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-self: start;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-feather);
}

.consent-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-soft);
}

.consent-dot.is-on {
  background: var(--success);
}

.consent-dot.is-off {
  background: var(--danger);
}

/* Parent mode and an unconfirmed account are not a red "off": the switch
   simply is not this screen's to throw. */
.consent-dot.is-idle {
  background: rgba(61, 56, 53, 0.32);
}

.consent-status-text {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.consent-status-since {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.consent-paragraph {
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  opacity: 0.86;
}

.consent-bullets {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.consent-bullet {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.consent-bullet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(61, 56, 53, 0.6);
}

.consent-bullet-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consent-bullet-text {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.4;
  opacity: 0.86;
}

.consent-fine {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.consent-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.consent-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-link-dot {
  color: rgba(61, 56, 53, 0.4);
}

.consent-actions {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0 14px;
}

/* The disclosure runs on past the fold — fade its last line into the actions
   so the cut never reads as the end of the text. */
.consent-actions::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 26px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface));
}

.consent-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.consent-enable {
  gap: 8px;
}

.consent-btn-icon {
  display: inline-flex;
}

.consent-btn-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* "Not now" is a way out, not a warning — the ghost button's danger tint is
   wrong for it. */
.btn.consent-not-now {
  min-height: 44px;
  color: var(--ink-soft);
}

/* --- the profile row --- */

.consent-row {
  gap: 8px;
  padding-right: 14px;
}

.consent-row-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

/* The dim "?" (STYLE.md's .hw-why pattern), reduced to just its disc. Both
   rules out-specify app-homework.css's .hw-why, which loads after this file. */
.consent-row .consent-why {
  margin-left: auto;
  padding: 0;
  background: transparent;
}

.consent-row .consent-why > span:first-child {
  width: 22px;
  height: 22px;
  font-size: 12px;
  color: rgba(61, 56, 53, 0.45);
  background: var(--wash);
}

.consent-row .consent-why:active > span:first-child {
  color: var(--ink);
}

.consent-row-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
