/* ==========================================================================
   Rotation gaps on My Shoes (owner 2026-10-18), js/shoe-rotation-gaps.js:
   three tiles (Daily, Tempo, Race). Every tile is the app's cyan .ri-tile--glow
   (owner 2026-10-18: "keep this coloring", the loading tiles); only the middle
   carries colour (bars, dots); titles stay white (owner 2026-10-18). The inner
   glow follows the verdict (owner 2026-10-19): amber not good, green fine,
   cyan while not decided (and while loading); the border stays cyan.
   ========================================================================== */
.shoes-gaps .shoes-row-subtitle { margin-bottom: var(--ri-space-5, 20px); }
.gaps-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ri-space-4, 16px); }
.gaps-tile {
  --gaps-rgb: 255, 255, 255;
  --tile-color: var(--ri-cyan, #2ED1F4);
  position: relative;
  display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 280px;
  padding: 20px 22px 18px; border-radius: var(--ri-radius-md, 12px);
}
.gaps-tile--warn { --gaps-rgb: var(--ri-amber-rgb, 251, 191, 36); }
.gaps-tile--good { --gaps-rgb: var(--ri-green-rgb, 52, 211, 153); }
/* Only the light inside takes the verdict colour; the edge stays cyan (owner 2026-10-19). */
:is(.gaps-tile--warn, .gaps-tile--good) {
  --_glow: rgb(var(--gaps-rgb));
  --_tile-bg:
    radial-gradient(130% calc(22% + 53% * var(--tile-lift)) at 50% 104%, color-mix(in srgb, var(--_glow) calc(50% * var(--tile-lift)), transparent), color-mix(in srgb, var(--_glow) calc(17% * var(--tile-lift)), transparent) 50%, transparent 78%),
    linear-gradient(0deg, color-mix(in srgb, var(--_glow) calc(10% * var(--tile-lift)), transparent), transparent 70%),
    radial-gradient(120% 55% at 50% 108%, color-mix(in srgb, var(--_glow) 20%, transparent), color-mix(in srgb, var(--_glow) 5%, transparent) 55%, transparent 80%),
    var(--ri-surface-tile, rgba(255, 255, 255, 0.04));
  --_tile-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile-color) var(--_tile-edge), transparent), inset 0 0 16px color-mix(in srgb, var(--_glow) calc(6% + 6% * var(--tile-lift)), transparent);
}
/* Option A (owner 2026-10-18): label top left, the picture centered below it, links bottom
   right. */
.gaps-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gaps-label { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 18px; margin: 0; color: var(--ri-text-faint); font-size: var(--ri-text-caption, 13px); line-height: 18px; }
.gaps-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gaps-body { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; text-align: center; }
/* Everything in the middle of the card (owner 2026-10-18: "center EVERYTHING"); a tile without
   links pads the bottom like the label row above, so its words centre on the whole tile. */
.gaps-tile:not(:has(.gaps-actions)) .gaps-body { padding-bottom: 44px; }
/* Verdict chip top right = the Other shoes cards' round icon buttons (32 px, 16 px icon); a
   readout, so it never reacts to the pointer. */
.gaps-status.ri-btn { --_btn-icon: 16px; flex: none; margin-left: auto; pointer-events: none; }
.gaps-status.ri-btn svg { width: 16px; height: 16px; }
/* Coloured by the verdict (owner 2026-10-18: "COLOR the icon, like green or yellow"): the select
   chip's own ring and inner light (its selected look) and both tones of the icon in green (fine) or amber (not good); the
   hourglass (not decided) stays grey. */
:is(.gaps-tile--warn, .gaps-tile--good) .gaps-status.ri-btn {
  --_sel-1: var(--gaps-rgb);
  --_sel-2: var(--gaps-rgb);
  --_sel-3: var(--gaps-rgb);
  --_btn-ring-opacity: .9;
  --_btn-shadow: inset 0 -6px 17px rgba(var(--gaps-rgb), .3), inset 0 6px 17px rgba(var(--gaps-rgb), .2), 0 0 10px rgba(var(--gaps-rgb), .25);
}
:is(.gaps-tile--warn, .gaps-tile--good) .gaps-status svg {
  --icon-muted: rgba(var(--gaps-rgb), .6);
  --icon-accent: rgb(var(--gaps-rgb));
}
.gaps-top { min-height: 32px; }
.gaps-icon { flex: none; width: 18px; height: 18px; opacity: .9; }
.gaps-head { margin: 0; color: #fff; font-size: 20px; font-weight: var(--ri-weight-light, 300); line-height: 1.3; }
.gaps-head--num { color: var(--ri-text-muted); font-size: var(--ri-text-caption, 13px); }
.gaps-head--num b { color: #fff; font-size: 34px; font-weight: var(--ri-weight-light, 300); line-height: 1.1; font-variant-numeric: tabular-nums; }
.gaps-star { margin-left: 2px; color: var(--ri-text-faint); font-size: 18px; vertical-align: top; }
.gaps-line { margin: 0; color: var(--ri-text-muted); font-size: var(--ri-text-caption, 13px); line-height: 1.45; }
.gaps-legend { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; color: var(--ri-text-faint); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
/* Two shoes as level-line bars (.ri-level-track / .ri-level-fill): green = the better one. */
.gaps-bars { display: grid; gap: 16px; width: 100%; margin: 6px 0 2px; }
.gaps-bar { display: grid; grid-template-columns: minmax(0, 92px) minmax(0, 1fr) auto; align-items: center; gap: 10px; color: var(--ri-text-muted); font-size: 13px; line-height: 18px; text-align: left; }
.gaps-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gaps-bar-track { height: 6px; border-radius: 3px; }
.gaps-bar-fill { --bar-rgb: 148, 163, 184; display: block; height: 100%; border-radius: 3px; }
.gaps-bar.is-win { color: #fff; }
.gaps-bar.is-win .gaps-bar-fill { --bar-rgb: var(--ri-green-rgb, 52, 211, 153); }
.gaps-bar.is-lose .gaps-bar-fill { --bar-rgb: var(--ri-amber-rgb, 251, 191, 36); }
.gaps-bar b { font-weight: var(--ri-weight-regular, 400); font-variant-numeric: tabular-nums; }
/* A missing shoe: one dot per run of that kind, in the run colour. */
.gaps-dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px; margin: 6px 0 0; }
.gaps-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(var(--gaps-dot-rgb, 59, 130, 246), .85); }
.gaps-dots span { margin-left: 4px; color: var(--ri-text-faint); font-size: 12px; }
.gaps-tile[data-gap="tempo"] { --gaps-dot-rgb: 249, 115, 22; }
.gaps-tile[data-gap="race"] { --gaps-dot-rgb: 239, 68, 68; }
/* Room between the picture and the links (owner 2026-10-18: "fix the spacing above the CTA"). */
.gaps-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 20px; padding-top: 14px; }
.gaps-skel { display: inline-block; border-radius: var(--ri-radius-sm, 8px); }
.gaps-skel--head { width: 70%; }
.gaps-skel--line { width: 86%; }

@media (max-width: 860px) {
  .gaps-tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gaps-tile { min-height: 220px; }
}

/* Nothing to analyse yet (owner 2026-10-19: "proper placeholders"): the tiles stay in their shape
   as faint, still ghosts with a dashed edge and no verdict icon (no hourglass, nothing is
   loading), and one line under them says what fills them. */
.gaps-empty { display: flex; flex-direction: column; gap: var(--ri-space-4, 16px); }
.gaps-tile.gaps-tile--ghost {
  --_tile-bg: var(--ri-surface-tile, rgba(255, 255, 255, 0.04));
  --_tile-shadow: none;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  box-shadow: none;
  pointer-events: none;
}
.gaps-tile--ghost .gaps-label { opacity: 0.7; }
.gaps-tile--ghost .gaps-body { opacity: 0.55; }
.gaps-ghost { display: block; height: 10px; width: 55%; border-radius: 6px; background: rgba(255, 255, 255, 0.07); }
.gaps-ghost--head { height: 18px; width: 62%; }
.gaps-ghost--line { width: 78%; }
.gaps-ghost--bar { height: 8px; width: 86%; background: rgba(46, 209, 244, 0.16); }
.gaps-ghost--bar.is-short { width: 58%; }
.gaps-empty-note { text-wrap: balance; margin: 0; color: var(--ri-text-muted, rgba(255, 255, 255, 0.74)); font-size: var(--ri-text-secondary, 14px); line-height: var(--ri-leading-secondary, 1.4); text-align: center; }
.gaps-empty-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .gaps-tile.gaps-tile--ghost { min-height: 0; gap: 16px; padding: 16px 18px 20px; }
  .gaps-tile.gaps-tile--ghost .gaps-body { gap: 10px; padding-bottom: 0; }
}
