/* Dex, Hold'em's dealer (assets/js/dex.js draws him). Every colour is a variable here, so an outfit
   from the shop is one attribute on the svg, data-outfit: black (the default and free), navy,
   burgundy, gold and white (these two add a dinner jacket). The page sets his height: --dex-h (the
   table makes him a bit taller than a player's seat). A mood (data-mood) swaps a few of his parts. */
.dex {
  --skin: #f0cfb3; --skin-shade: #d8b093; --skin-dark: #bc9172;
  --shirt: #fbfaf6; --shirt-shade: #dcd8cd; --cuff: #ffffff;
  --vest: #17181b; --vest-shade: #0b0b0d; --vest-edge: #3a3b42;
  --tie: #111113; --tie-edge: #3a3b42;
  --hair: #141416; --moustache: #141416; --trim: #d9b45a;
  display: block;
  height: var(--dex-h, 150px);
  width: calc(var(--dex-h, 150px) * 172 / 214);
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45));
}
/* A small round swatch of an outfit (the shop, the table's outfit picker). */
.dex-swatch { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.45); background: #17181b; }
.dex-swatch[data-outfit="navy"] { background: #1d2c4f; }
.dex-swatch[data-outfit="burgundy"] { background: #5c1824; }
.dex-swatch[data-outfit="gold"] { background: linear-gradient(135deg, #b98a2e 56%, #121214 56%); }
.dex-swatch[data-outfit="white"] { background: linear-gradient(135deg, #f4f3ef 56%, #aeb3bb 56%); }
.dex[data-outfit="navy"] { --vest: #1d2c4f; --vest-shade: #121c35; --vest-edge: #4a5d8c; --tie: #142040; --tie-edge: #4a5d8c; }
.dex[data-outfit="burgundy"] { --vest: #5c1824; --vest-shade: #3d0f18; --vest-edge: #8e3a49; --tie: #3d0f18; --tie-edge: #8e3a49; }
/* The premium outfits wear a dinner jacket: its sleeves on the arms, the badge on the other breast
   (clear of the pocket square and the card hand). */
.dex:is([data-outfit="gold"], [data-outfit="white"]) { --sleeve: var(--jk-shade); }
.dex:is([data-outfit="gold"], [data-outfit="white"]) .dx-jacket { display: inline; }
.dex:is([data-outfit="gold"], [data-outfit="white"]) .dx-tag { transform: translate(-72px, 18px); }
/* Gold: an antique-gold brocade jacket, black velvet notch lapels piped in gold, a black waistcoat
   with gold buttons, a black bow tie, gold cufflinks and a gold spade pin. */
.dex[data-outfit="gold"] { --jk: #a47a28; --jk-shade: #7a5a1a; --jk-edge: #5e440f; --sheen: 0.1; --brocade: #f3d77f;
  --lapel: #121214; --lapel-sheen: 0.08; --piping: #e4c26a; --piping-w: 1.6; --plate: #121214; --badge-ink: #e4c26a; --link: #e4c26a; }
.dex[data-outfit="gold"] :is(.dx-lapel-notch, .dx-brocade, .dx-pin) { display: inline; }
/* White: an all-white suit with white peak lapels, a silver waistcoat, a long silver tie and a
   silver pocket square. */
.dex[data-outfit="white"] { --shirt: #ffffff; --jk: #f4f3ef; --jk-shade: #d9d7d0; --jk-edge: #b4b1a8; --sheen: 0.5;
  --vest: #aeb3bb; --vest-shade: #868b94; --vest-edge: #dfe2e6; --trim: #f4f3ef;
  --lapel: #fbfaf7; --lapel-edge: #b4b1a8; --lapel-sheen: 0; --square: #c9ccd2; --square-edge: #868b94;
  --ltie: #d3d6db; --ltie-edge: #9aa0a8; --plate: #aeb3bb; --badge-ink: #1d1d20; --link: #c0c4ca; }
.dex[data-outfit="white"] .dx-bowtie { display: none; }
.dex[data-outfit="white"] :is(.dx-longtie, .dx-lapel-peak, .dx-square) { display: inline; }

/* Vera (data-dealer="vera"): brunette, a fitted double-breasted waistcoat and a slim bow tie. Her
   outfits use the colours above; her premium looks have a fitted jacket of her own. Her badge stays
   on her right breast (her hair falls over the other), and her spade pin is on her left lapel. */
.dex[data-dealer="vera"] { --skin: #e2ad86; --skin-shade: #c99069; --skin-dark: #ae7752; --hair: #4a2b19; --hair-hi: #74492e; }
.dex[data-dealer="vera"] .dx-brow { stroke-width: 2.6; }
.dex[data-dealer="vera"] .dx-lip { stroke: #a3474b; stroke-width: 2.3; }
.dex[data-dealer="vera"] .dx-tag { transform: none; }
.dx-hair-hi { fill: none; stroke: var(--hair-hi); stroke-width: 1.8; stroke-linecap: round; opacity: 0.8; }
.dx-lip-fill { fill: #b9605f; opacity: 0.55; }
.dx-earring { fill: #e4c26a; }
.dx-seam { fill: none; stroke: var(--vest-edge); stroke-width: 1.2; stroke-linecap: round; }
/* Gold: the brocade jacket, nipped at the waist, with black velvet shawl lapels piped in gold. */
.dex[data-dealer="vera"][data-outfit="gold"] .dx-lapel-shawl { display: inline; }
/* White: the white jacket with peak lapels over the silver waistcoat, and a silver bow tie. */
.dex[data-dealer="vera"][data-outfit="white"] { --tie: #c9ccd2; --tie-edge: #9aa0a8; }
.dex[data-dealer="vera"][data-outfit="white"] .dx-bowtie { display: inline; }
.dx-skin { fill: var(--skin); } .dx-skin-shade { fill: var(--skin-shade); } .dx-skin-dark { fill: var(--skin-dark); }
.dx-nose { stroke: var(--skin-shade); stroke-width: 1.5; stroke-linejoin: round; }
.dx-shirt-fill { fill: var(--shirt); } .dx-shirt-shade { fill: var(--shirt-shade); }
.dx-collar { fill: var(--shirt); stroke: var(--shirt-shade); stroke-width: 1; stroke-linejoin: round; }
.dx-cuff { fill: var(--cuff); stroke: var(--shirt-shade); stroke-width: 1; }
.dx-vest-fill { fill: var(--vest); } .dx-vest-shade { fill: var(--vest-shade); }
.dx-vest-edge { fill: none; stroke: var(--vest-edge); stroke-width: 2; stroke-linejoin: round; }
.dx-tie { fill: var(--tie); } .dx-tie-edge { fill: none; stroke: var(--tie-edge); stroke-width: 1.2; stroke-linecap: round; }
.dx-knot { stroke: var(--tie-edge); stroke-width: 1; }
.dx-hair-fill { fill: var(--hair); } .dx-hair-line { fill: none; stroke: #3a3b42; stroke-linecap: round; }
.dx-brow { fill: none; stroke: var(--hair); stroke-width: 3.4; stroke-linecap: round; }
.dx-moustache { fill: var(--moustache); }
.dx-trim { fill: var(--trim); }
.dx-badge { fill: var(--badge-ink, var(--vest)); font: 800 6.5px var(--font-ui); letter-spacing: 0.5px; }
.dx-sleeve { fill: var(--sleeve, var(--shirt-shade)); }
.dx-link { fill: var(--link, var(--trim)); }
.dx-plate { fill: var(--plate, var(--trim)); }
/* The premium outfits' parts (assets/js/dex.js), hidden unless an outfit below shows them. */
.dx-jacket, .dx-longtie, .dx-studs, .dx-lapel, .dx-square, .dx-rose, .dx-pin, .dx-brocade { display: none; }
.dx-studs circle { fill: var(--stud, #1d1d20); }
.dx-jk-fill { fill: var(--jk); } .dx-jk-shade { fill: var(--jk-shade); }
.dx-jk-sheen { fill: #fff; opacity: var(--sheen, 0.1); }
.dx-jk-edge { fill: none; stroke: var(--jk-edge, var(--jk-shade)); stroke-width: 1.4; stroke-linejoin: round; }
.dx-brocade { fill: var(--brocade); opacity: 0.4; }
.dx-lp-fill { fill: var(--lapel); }
.dx-lp-edge { fill: none; stroke: var(--piping, var(--lapel-edge, transparent)); stroke-width: var(--piping-w, 1.2); stroke-linejoin: round; stroke-linecap: round; }
.dx-lp-sheen { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: var(--lapel-sheen, 0.18); }
.dx-sq-fill { fill: var(--square); stroke: var(--square-edge, transparent); stroke-width: 0.8; stroke-linejoin: round; }
.dx-sq-welt { stroke: var(--jk-shade); stroke-width: 1.6; stroke-linecap: round; }
.dx-rose-fill { fill: #b3122a; } .dx-rose-curl { fill: none; stroke: #6f0a1a; stroke-width: 1.1; stroke-linecap: round; } .dx-rose-leaf { fill: #2f6b34; }
.dx-pin { fill: #f0d27c; stroke: #6b4f12; stroke-width: 0.6; }
.dx-jk-button { fill: var(--jk-button, var(--lapel)); }
.dx-ltie { fill: var(--ltie); } .dx-ltie-edge { fill: none; stroke: var(--ltie-edge); stroke-width: 1.6; stroke-linecap: round; }
.dx-ltie-knot { stroke: var(--ltie-edge); stroke-width: 0.8; }
.dx-ink { fill: #1a1412; } .dx-glint { fill: #fff; }
.dx-line { fill: none; stroke: #1a1412; stroke-linecap: round; }
.dx-under { fill: none; stroke: var(--skin-dark); stroke-width: 1.1; stroke-linecap: round; }
/* The fold above a relaxed lid (both dealers are calm and indifferent: they've seen a thousand hands). */
.dx-crease { fill: none; stroke: var(--skin-dark); stroke-width: 1; stroke-linecap: round; opacity: 0.6; }
.dx-knuckle { fill: none; stroke: var(--skin-shade); stroke-width: 1.5; stroke-linecap: round; }
.dx-lip { fill: none; stroke: #6e3a2c; stroke-width: 2.2; stroke-linecap: round; }
.dx-card { fill: #fcfbf7; stroke: #d6d0c0; }
/* The card in his hand is face down: the site's card back. */
.dx-card-back { fill: #9e1f2a; } .dx-card-line { fill: none; stroke: #f4dc95; stroke-opacity: 0.6; stroke-width: 0.8; }
.dx-card-pip { fill: #f4dc95; opacity: 0.75; }

/* Moods (holdem.js: dexMood): each swaps a few parts, and the head barely moves. Only opacity and
   transform change. deal is the default: calm, polite, indifferent. The others are small and short:
   a big win is a slight lift of one side (Dex has no mouth: his moustache lifts at one side and that
   eye narrows a touch; Vera's mouth twitches at one corner), an all-in a slight lift of the brows.
   The tip is the one warm moment: a wink, a small side nod (and Dex's moustache lifting a touch, or
   Vera's small smile), then straight back to calm. */
.dex .dx-v { transition: opacity 0.12s ease-out; }
.dex .dx-eyes-lowered, .dex .dx-eyes-wink, .dex .dx-eyes-win, .dex .dx-brows-up, .dex .dx-brows-wink,
.dex .dx-stache-lift, .dex .dx-stache-warm,
.dex .dx-mouth-faint, .dex .dx-mouth-smile, .dex .dx-pose-rest, .dex .dx-pose-push, .dex .dx-pose-chip { opacity: 0; }
.dex[data-mood="nod"] .dx-eyes-lowered, .dex[data-mood="nod"] .dx-pose-rest,
.dex[data-mood="win"] .dx-eyes-win, .dex[data-mood="win"] .dx-stache-lift, .dex[data-mood="win"] .dx-mouth-faint, .dex[data-mood="win"] .dx-pose-push,
.dex[data-mood="allin"] .dx-brows-up,
.dex[data-mood="tip"] .dx-eyes-wink, .dex[data-mood="tip"] .dx-brows-wink, .dex[data-mood="tip"] .dx-stache-warm, .dex[data-mood="tip"] .dx-mouth-smile, .dex[data-mood="tip"] .dx-pose-chip { opacity: 1; }
.dex[data-mood="nod"] .dx-eyes-open, .dex[data-mood="tip"] .dx-eyes-open, .dex[data-dealer="dex"][data-mood="win"] .dx-eyes-open,
.dex[data-mood="allin"] .dx-brows-calm, .dex[data-mood="tip"] .dx-brows-calm,
.dex[data-mood="win"] :is(.dx-stache-calm, .dx-mouth-neutral), .dex[data-mood="tip"] :is(.dx-stache-calm, .dx-mouth-neutral),
.dex[data-mood="nod"] .dx-pose-card, .dex[data-mood="win"] .dx-pose-card, .dex[data-mood="tip"] .dx-pose-card { opacity: 0; }
/* (The wink itself is instant, like a real one.) */
.dex .dx-eyes-open, .dex .dx-eyes-wink { transition-duration: 0.05s; }
/* (Vera's hair behind and over her shoulders moves with her head.) */
.dex :is(.dx-head, .dx-hair-back, .dx-hair-front) { transform-box: view-box; transform-origin: 100px 118px; transition: transform 0.28s cubic-bezier(.3, .7, .3, 1); }
.dex[data-mood="nod"] :is(.dx-head, .dx-hair-back, .dx-hair-front) { transform: translateY(1.5px); }
.dex[data-mood="win"] :is(.dx-head, .dx-hair-back, .dx-hair-front) { transform: translateY(0.8px); }
.dex[data-mood="tip"] :is(.dx-head, .dx-hair-back, .dx-hair-front) { transform: translate(0, 1px) rotate(4deg); }
.dex .dx-hand { transform-box: fill-box; transform-origin: 40% 90%; }
/* Calm mode: the faces switch, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  .dex .dx-v { transition: none !important; }
  .dex :is(.dx-head, .dx-hair-back, .dx-hair-front) { transition: none !important; transform: none !important; }
}
