/* ═══════════════════════════════════════════════════════════════
   ai-onnx-consent.css — Consent modal for the WebGPU/transformers.js
   on-device AI loader (Phase 4 of docs/PLAN_ON_DEVICE_AI.md).
   ───────────────────────────────────────────────────────────────
   LABEL: PROTOTYPE.
   Z-index sits above bottom-nav (60), sticky pill (50), bottom rail
   (55), Settings panel (200), but below toast/alert overlays. The
   download-progress UI lives inside the same card so users can't
   tap-through to the page mid-download.
   ═══════════════════════════════════════════════════════════════ */

.tinky-onnx-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 35, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: tinkyOnnxFadeIn 160ms ease-out;
}

@keyframes tinkyOnnxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.tinky-onnx-card {
  background: #fff;
  color: #0f1723;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  max-width: 460px;
  width: 100%;
  padding: 24px 24px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Card must remain readable on small phones — clamp height + scroll. */
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.tinky-onnx-title {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.tinky-onnx-desc {
  margin: 0 0 10px 0;
  font-size: 15px;
  line-height: 1.45;
  color: #2a3548;
}

.tinky-onnx-sub {
  margin: 0 0 16px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #5a6478;
}

.tinky-onnx-progress-wrap {
  margin: 4px 0 16px 0;
}

.tinky-onnx-progress-label {
  font-size: 13px;
  color: #2a3548;
  margin-bottom: 6px;
  /* Long filenames must not push the card off-screen. */
  overflow-wrap: anywhere;
}

.tinky-onnx-progress-bar {
  width: 100%;
  height: 10px;
  background: #e6eaf2;
  border-radius: 5px;
  overflow: hidden;
}

.tinky-onnx-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2C7BE5, #00B894);
  transition: width 240ms ease-out;
}

.tinky-onnx-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.tinky-onnx-btn {
  /* 44px tap-target floor, 16px font to defeat iOS zoom on focus. */
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.tinky-onnx-btn-skip {
  background: #fff;
  color: #2a3548;
  border-color: #c3cad8;
}
.tinky-onnx-btn-skip:hover { background: #f5f7fb; }

.tinky-onnx-btn-go {
  background: #f59f00;       /* Amber — same action family as Save in Library */
  color: #20180a;
  border-color: #d18a00;
}
.tinky-onnx-btn-go:hover { background: #fbb53b; }

.tinky-onnx-btn-cancel {
  background: #fff;
  color: #a62a2a;
  border-color: #e4b2b2;
}
.tinky-onnx-btn-cancel:hover { background: #fbeaea; }

.tinky-onnx-btn:focus-visible {
  outline: 3px solid #2C7BE5;
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  .tinky-onnx-card { background: #1c2434; color: #f0f3fa; }
  .tinky-onnx-desc { color: #d6dbe7; }
  .tinky-onnx-sub  { color: #98a2b6; }
  .tinky-onnx-progress-bar { background: #303b50; }
  .tinky-onnx-btn-skip { background: #1c2434; color: #f0f3fa; border-color: #4a5468; }
  .tinky-onnx-btn-skip:hover { background: #283147; }
  .tinky-onnx-btn-cancel { background: #1c2434; color: #ff9a9a; border-color: #6a3434; }
  .tinky-onnx-btn-cancel:hover { background: #2e1f1f; }
}

@media (prefers-reduced-motion: reduce) {
  .tinky-onnx-backdrop { animation: none; }
  .tinky-onnx-progress-fill { transition: none; }
}
