/*
 * attempt-log.css — the Attempt Log's one-time ask (every scored Task
 * page), the Settings switch and the privacy page (ADR-0159).
 * Tokens only (docs/STYLE_GUIDE.md); spacing in 4px steps.
 */

/* ===== The one-time ask ===== */
.attempt-log-ask {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
  font-family: var(--font-ui);
}

.attempt-log-ask-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.attempt-log-ask-body,
.attempt-log-ask-done {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.attempt-log-ask-link {
  color: var(--brand-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.attempt-log-ask-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.attempt-log-ask-yes,
.attempt-log-ask-no {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--pill);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.attempt-log-ask-yes {
  background: var(--brand-purple);
  color: var(--surface);
  border: 1px solid var(--brand-purple);
}

.attempt-log-ask-yes:hover {
  background: var(--brand-purple-dark);
}

.attempt-log-ask-no {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--control-border);
}

.attempt-log-ask-no:hover {
  background: var(--control-hover);
}

.attempt-log-ask-yes:focus-visible,
.attempt-log-ask-no:focus-visible,
.attempt-log-ask-link:focus-visible {
  outline: 2px solid var(--brand-purple);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .attempt-log-ask {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
  }

  .attempt-log-ask-actions > button {
    flex: 1;
  }
}

/* ===== Settings and privacy pages ===== */
.info-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  font-family: var(--font-ui);
  color: var(--ink);
  line-height: 1.6;
}

.info-page-back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--brand-purple);
  font-size: 14px;
}

.info-page h1 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.2;
}

.info-page h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.info-page p,
.info-page li {
  font-size: 16px;
}

.info-page a {
  color: var(--brand-purple);
}

.info-page-updated {
  color: var(--ink-muted);
  font-size: 14px;
}

.settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.settings-row-text h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.settings-row-text p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
}

.settings-status {
  min-height: 24px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-muted);
}

/* A checkbox drawn as a switch; the input stays the control. */
.settings-switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  margin: 6px 0 0;
  appearance: none;
  background: var(--chrome-line-strong);
  border-radius: var(--pill);
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.settings-switch:checked {
  background: var(--brand-purple);
}

.settings-switch:checked::after {
  transform: translateX(20px);
}

.settings-switch:focus-visible {
  outline: 2px solid var(--brand-purple);
  outline-offset: 2px;
}
