/* v5.23 — UX clarity pass */

/* Generic popover used by tactic buttons + ?-icons */
.vfl-clarity-pop {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(10, 18, 32, 0.97);
  color: #e6ecf5;
  border: 1px solid rgba(255, 216, 77, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  width: 220px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9500;
  white-space: normal;
  text-align: left;
}
.vfl-clarity-pop b {
  color: #ffd84d;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.vfl-clarity-pop::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(10, 18, 32, 0.97);
}
.vfl-clarity-pop.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Inline variant for the stats bar (xG, MATCH RATING) */
.vfl-clarity-pop-inline {
  width: 240px;
  bottom: auto;
  top: calc(100% + 8px);
  left: 0;
  transform: translateX(-30%) translateY(-4px);
}
.vfl-clarity-pop-inline::after {
  top: -6px;
  bottom: auto;
  left: 35%;
  border-top-color: transparent;
  border-bottom-color: rgba(10, 18, 32, 0.97);
}
.vfl-clarity-pop-inline.show {
  transform: translateX(-30%) translateY(0);
}

/* The ?-icon */
.vfl-clarity-help {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffd84d;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  margin-left: 4px;
  cursor: help;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
  user-select: none;
  outline: none;
  transition: background 0.15s ease;
}
.vfl-clarity-help:hover,
.vfl-clarity-help:focus {
  background: rgba(255, 216, 77, 0.3);
}

/* Speed-button cycle hint — small dotted underline so users notice it cycles */
.vfl-clarity-cycle-btn .dock-lbl {
  border-bottom: 1px dotted rgba(255, 216, 77, 0.5);
}

/* First-time popover */
.vfl-clarity-firsttime {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
  pointer-events: none;
}
.vfl-clarity-firsttime.show {
  opacity: 1;
  pointer-events: auto;
}
.vfl-cft-card {
  position: relative;
  background: linear-gradient(180deg, #14213d 0%, #0a1428 100%);
  border: 1px solid rgba(255, 216, 77, 0.4);
  border-radius: 14px;
  padding: 24px 26px 22px;
  max-width: 380px;
  width: 100%;
  color: #e6ecf5;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}
.vfl-cft-x {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #ffd84d;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.vfl-cft-head {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: #ffd84d;
  margin-bottom: 14px;
}
.vfl-cft-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}
.vfl-cft-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.vfl-cft-list li:last-child {
  border-bottom: none;
}
.vfl-cft-list b {
  color: #ffd84d;
  letter-spacing: 0.04em;
}
.vfl-cft-ok {
  width: 100%;
  background: #ffd84d;
  color: #0a1428;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  font-weight: 700;
  cursor: pointer;
}
.vfl-cft-ok:hover {
  filter: brightness(1.08);
}

/* Ghost-tab disabled state */
.vfl-clarity-ghost {
  opacity: 0.45;
  cursor: not-allowed !important;
  position: relative;
}
.vfl-clarity-ghost:hover {
  opacity: 0.55;
}

/* Make dock buttons not truncate "EXIT MATCH" / "MATCH INFO" */
.dock-btn .dock-lbl {
  white-space: nowrap;
}

/* Friends button — never truncate */
.vfl-friends-btn {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .vfl-clarity-pop {
    width: 180px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .vfl-clarity-pop-inline {
    width: 200px;
  }
  .vfl-cft-card {
    padding: 20px 18px 18px;
  }
}

/* Sheet CTA buttons hover polish */
.sheet-cta-btn {
  transition: transform 0.12s ease, filter 0.12s ease;
}
.sheet-cta-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* -------- v5.23.1 Exit Match confirmation modal -------- */
.vfl-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8,12,18,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 16px;
}
.vfl-exit-modal.show { display: flex; }
.vfl-exit-card {
  background: linear-gradient(180deg, #181f2c 0%, #0f141d 100%);
  color: #f4f6fb;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 22px 22px 18px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  font-family: inherit;
  animation: vflExitPop 160ms ease-out;
}
@keyframes vflExitPop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.vfl-exit-hd {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  color: #fff;
}
.vfl-exit-body {
  font-size: 14px;
  line-height: 1.45;
  color: #b6becd;
  margin-bottom: 18px;
}
.vfl-exit-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.vfl-exit-btn {
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter .12s ease, transform .12s ease;
}
.vfl-exit-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.vfl-exit-btn:focus-visible { outline: 2px solid #4ec3ff; outline-offset: 2px; }
.vfl-exit-cancel {
  background: rgba(255,255,255,0.06);
  color: #e7ecf5;
  border-color: rgba(255,255,255,0.12);
}
.vfl-exit-confirm {
  background: linear-gradient(180deg, #ff5b6e 0%, #d8344a 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.06);
}
