/* CASUAL - the RCS emulator's face (design/starters/casual/rcs.css). Contract version 1.

   Friendly and warm: hand-drawn edges, a doodled background, bubbly chips, a launcher that waves.

   A STARTER DESIGN (designer-css-plan section 2.6): ours, read-only, loaded and changed and saved as a workspace's own
   design. Written ONLY against the --cv-* tokens and the data-cv-* parts, moments, turns, states and screens of
   design/contract.json - never a class name, never an !important. A design's CSS lands in the cascade layer cv.design (the
   server wraps it; on the go site's stage, Tests/Design/ShotCases.Starters.cs does), so it beats our default bundle
   without a specificity war. url() reaches only this package's own files.

   1. THE TOKENS - on :root (the page around the phone - the bezel, the toast), the phone's screen and the bottom
      sheet: the screen and the sheet declare their own tokens, so a token set on :root alone never reaches the
      phone. They equal manifest.json's tokens, value for value (Tests/Design/StarterLibraryTests).
   2. THE LOOK - every shape, glow, picture and motion is scoped to the conversation's own screen
      ([data-cv-screen="thread"]). A protected screen (confirm, consent, payment, sign-in) and a protected part (the
      verified note, Powered by, a signature, an action's confirm) take COLOURS ONLY, inside the contrast floor - so when
      the locked layer lands (P1) nothing here has to move. Motion runs only when the reader has not asked for less. */

:root,
[data-cv-part="screen"],
[data-cv-part="sheet"] {
  /* reference */
  --cv-color-brand: #c2412b;
  --cv-color-ink: #3d2f2a;
  --cv-color-paper: #fff9ef;
  --cv-font-body: "Casual Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-font-display: "Casual Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-radius-s: 10px;
  --cv-radius-m: 16px;
  --cv-radius-l: 22px;
  --cv-shadow-1: 2px 3px 0 rgba(61, 47, 42, .18);
  --cv-shadow-2: 4px 5px 0 rgba(61, 47, 42, .2);
  --cv-shadow-3: 0 20px 50px rgba(61, 47, 42, .2);
  --cv-motion-fast: 120ms;
  --cv-motion-slow: 240ms;
  /* semantic */
  --cv-surface: #fffdf7;
  --cv-on-surface: var(--cv-color-ink);
  --cv-accent: #c2412b;
  --cv-on-accent: #ffffff;
  --cv-muted: #6e5d55;
  --cv-danger: #b3261e;
  --cv-focus: var(--cv-accent);
  --cv-bubble-me-bg: #ffe1d6;
  --cv-bubble-me-ink: #3d2f2a;
  --cv-bubble-them-bg: #ffffff;
  --cv-bubble-them-ink: #3d2f2a;
  --cv-field-font-size: 16px;
  /* component */
  --cv-header-bg: var(--cv-surface);
  --cv-header-ink: var(--cv-on-surface);
  --cv-header-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-header-shadow: var(--cv-shadow-1);
  --cv-avatar-bg: var(--cv-accent);
  --cv-bubble-radius: var(--cv-radius-l);
  --cv-bubble-tail-radius: var(--cv-radius-s);
  --cv-bubble-font-size: 15px;
  --cv-bubble-them-shadow: 2px 3px 0 rgba(61, 47, 42, .16);
  --cv-typing-dot: var(--cv-muted);
  --cv-card-radius: var(--cv-radius-l);
  --cv-chip-bg: #fffdf7;
  --cv-chip-ink: var(--cv-accent);
  --cv-chip-border: #c2412b;
  --cv-chip-radius: 999px;
  --cv-chip-hover-bg: color-mix(in srgb, var(--cv-accent) 10%, var(--cv-surface));
  --cv-composer-bg: var(--cv-surface);
  --cv-composer-ink: var(--cv-on-surface);
  --cv-composer-placeholder-ink: var(--cv-muted);
  --cv-composer-line: color-mix(in srgb, var(--cv-on-surface) 16%, transparent);
  --cv-send-bg: var(--cv-accent);
  --cv-send-ink: var(--cv-on-accent);
  --cv-sheet-bg: var(--cv-surface);
  --cv-sheet-backdrop: rgba(0, 0, 0, .45);
  --cv-verified-bg: color-mix(in srgb, var(--cv-accent) 9%, transparent);
  --cv-verified-ink: var(--cv-muted);
  --cv-verified-icon: var(--cv-accent);
  --cv-verified-shield: var(--cv-accent);
  --cv-daymark-bg: color-mix(in srgb, var(--cv-on-surface) 7%, transparent);
  --cv-daymark-ink: var(--cv-muted);
  --cv-receipt-ink: var(--cv-muted);
  --cv-thread-bg: #fff6e8;
  --cv-card-bg: var(--cv-bubble-them-bg);
  --cv-card-title-ink: var(--cv-bubble-them-ink);
  --cv-card-text-ink: var(--cv-muted);
  --cv-card-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-card-shadow: 4px 5px 0 rgba(61, 47, 42, .22);
  --cv-card-button-hover-bg: color-mix(in srgb, var(--cv-accent) 8%, transparent);
  --cv-tile-ink: var(--cv-muted);
  --cv-chip-hover-shadow: var(--cv-shadow-1);
  /* the answers as a list: a hand-drawn box, the rows divided by the pen's dashes */
  --cv-reply-list-radius: 18px 24px 16px 26px / 22px 16px 24px 18px;
  --cv-reply-list-border: #3d2f2a;
  --cv-reply-list-border-width: 2px;
  --cv-reply-list-line: rgba(194, 65, 43, .5);
  --cv-reply-list-line-width: 2px;
  --cv-reply-list-line-style: dashed;
  --cv-reply-list-font-weight: 700;
  --cv-reply-list-selected-bg: color-mix(in srgb, var(--cv-accent) 18%, var(--cv-surface));
  --cv-reply-list-selected-ink: #3d2f2a;
  --cv-composer-icon-ink: var(--cv-muted);
  --cv-composer-icon-hover-bg: color-mix(in srgb, var(--cv-on-surface) 6%, transparent);
  --cv-composer-shadow: var(--cv-shadow-1);
  --cv-home-bar: color-mix(in srgb, var(--cv-on-surface) 30%, transparent);
  --cv-sheet-ink: var(--cv-on-surface);
  --cv-sheet-muted: var(--cv-muted);
  --cv-sheet-line: color-mix(in srgb, var(--cv-on-surface) 12%, transparent);
  --cv-sheet-row-line: color-mix(in srgb, var(--cv-on-surface) 7%, transparent);
  --cv-sheet-row-hover: color-mix(in srgb, var(--cv-accent) 7%, var(--cv-surface));
  --cv-sheet-field: color-mix(in srgb, var(--cv-on-surface) 22%, transparent);
  --cv-toast-bg: var(--cv-on-surface);
  --cv-toast-ink: var(--cv-surface);
  --cv-toast-line: transparent;
  --cv-toast-shadow: var(--cv-shadow-3);
  --cv-device-bezel: linear-gradient(150deg, #ffd3b6 0%, #ff9f80 45%, #e8735a 60%, #ffc2a8 100%);
  --cv-device-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 36px 70px -24px rgba(61, 47, 42, .5);
}

/* ── Casual ─────────────────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Casual Figtree";
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

[data-cv-part="brand-name"] { font-family: var(--cv-font-display); font-weight: 800; }
[data-cv-part="thread"] { background-image: url("assets/doodles.svg"); background-size: 220px 220px; }

/* Hand-drawn bubbles: no two corners alike, a solid offset shadow like ink. */
[data-cv-screen="thread"] [data-cv-part="bubble-them"] { border-radius: 18px 24px 16px 26px / 22px 16px 24px 18px; border: 2px solid #3d2f2a; }
[data-cv-screen="thread"] [data-cv-part="bubble-me"] { border-radius: 24px 18px 26px 16px / 16px 22px 18px 24px; border: 2px solid #3d2f2a; box-shadow: 2px 3px 0 rgba(61, 47, 42, .2); }
[data-cv-screen="thread"] [data-cv-part="card"] { border-radius: 18px 24px 16px 26px / 22px 16px 24px 18px; border: 2px solid #3d2f2a; }

/* Bubbly chips: a dashed pen line, a little tilt, a bounce on hover. */
[data-cv-screen="thread"] [data-cv-part="chip"] { border-radius: 18px 24px 16px 26px / 22px 16px 24px 18px; border: 2px dashed #c2412b; font-weight: 700; }
[data-cv-screen="thread"] [data-cv-part="chip"]:nth-child(odd) { transform: rotate(-2deg); }
[data-cv-screen="thread"] [data-cv-part="chip"]:nth-child(even) { transform: rotate(1.5deg); }
[data-cv-screen="thread"] [data-cv-part="composer"] { border-radius: 18px 24px 16px 26px / 22px 16px 24px 18px; border: 2px solid #3d2f2a; }

/* The list leans a little, like the chips. */
[data-cv-screen="thread"] [data-cv-part="reply-list"] { rotate: -.6deg; }
