/* ============================================================
   VICTORY SOLMERA - components.css
   Buttons, cards, chips, bars, avatars, stats, modals, toasts.
   ============================================================ */

/* ---------- Buttons ---------- */

.btn {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--teal), var(--aqua));
  color: #04262A;
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(15, 181, 166, .30);
  transition: transform .1s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px) scale(.995); box-shadow: 0 3px 10px rgba(15,181,166,.26); }
.btn svg { width: 20px; height: 20px; }

.btn--big { min-height: 56px; font-size: 16.5px; }

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn--ghost:active { background: var(--surface-2); }

.btn--ghost2 {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.28);
  box-shadow: none;
}

.btn--coral {
  background: linear-gradient(135deg, #FF7C6C, var(--coral));
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 90, .30);
}

.btn--navy {
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  color: #fff;
  box-shadow: 0 6px 16px rgba(10, 30, 56, .26);
}

.btn--gem { background: linear-gradient(135deg, #8E7BFF, var(--violet)); color: #fff; }

.btn--mini {
  width: auto;
  min-height: 34px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 11px;
  gap: 5px;
  flex: 0 0 auto;
}
.btn--mini svg { width: 15px; height: 15px; }

.btn--hero { width: auto; flex: 1; min-height: 46px; font-size: 14.5px; }

.btn[disabled], .btn.is-off { opacity: .48; pointer-events: none; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--teal-d);
  font-weight: 700;
  font-size: 13px;
}
.link svg { width: 15px; height: 15px; }

/* ---------- Cards and sections ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--sh-1);
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 2px 9px;
}
.section-title h2 {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--ink-3);
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--navy-l);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.8px;
  line-height: 1.5;
  margin: 10px 0;
}
.note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--navy-3); margin-top: 1px; }
.note--ok { background: var(--teal-l); border-color: #BFF0E9; }
.note--ok svg { color: var(--teal-d); }
.note--warn { background: var(--coral-l); border-color: #FFD2CB; }
.note--warn svg { color: var(--coral); }

.foot {
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  padding: 20px 0 6px;
}

/* ---------- Chips, bars, stars ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip--sm { font-size: 11px; padding: 2px 8px; }
.chip--aqua { background: var(--teal-l); color: var(--teal-d); }
.chip--amber { background: var(--amber-l); color: #A96A00; }
.chip--coral { background: var(--coral-l); color: #C63A29; }

.bar {
  height: 8px;
  border-radius: 8px;
  background: var(--surface-3);
  overflow: hidden;
  margin: 7px 0 0;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  transition: width .3s ease;
}
.bar--slim { height: 5px; margin-top: 5px; }

.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; color: var(--line-2); }
.stars svg.on { color: var(--amber); }
.stars--mini svg { width: 12px; height: 12px; }
.stars--big { margin-top: 10px; }
.stars--big svg { width: 30px; height: 30px; }
.stars--big svg.on { filter: drop-shadow(0 3px 8px rgba(245,165,36,.45)); }

/* ---------- Avatar ---------- */

.avatar {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
}
.avatar__num { position: relative; z-index: 1; }
.avatar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: rgba(255,255,255,.14);
}
.avatar--g0 { background: linear-gradient(135deg, #0FB5A6, #16D9C6); }
.avatar--g1 { background: linear-gradient(135deg, #123252, #1D4A75); }
.avatar--g2 { background: linear-gradient(135deg, #F5A524, #FFC85C); }
.avatar--g3 { background: linear-gradient(135deg, #FF6B5A, #FF9B7C); }
.avatar--g4 { background: linear-gradient(135deg, #22C77A, #63E0A6); }
.avatar--g5 { background: linear-gradient(135deg, #7C6CFF, #A79BFF); }
.avatar--g6 { background: linear-gradient(135deg, #0A8A80, #16D9C6); }
.avatar--g7 { background: linear-gradient(135deg, #0A1E38, #3B6FA3); }

/* ---------- Stats ---------- */

.grid3, .grid4 {
  display: grid;
  gap: 8px;
  margin: 10px 0 2px;
}
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--sh-1);
}
.stat__v { font-weight: 800; font-size: 16px; color: var(--ink); line-height: 1.2; }
.stat__l {
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}

/* ---------- Wallet ---------- */

.wallet { display: flex; gap: 6px; flex: 0 0 auto; }
.wallet__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.16);
}
.wallet__pill svg { width: 15px; height: 15px; }
.wallet__pill--coin svg { color: var(--amber); }
.wallet__pill--gem svg { color: #A79BFF; }
.wallet__pill:active { background: rgba(255,255,255,.22); }

/* On light headers (home) the wallet flips to a light chip. */
.homebar .wallet__pill {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--sh-1);
}

/* ---------- Row links ---------- */

.rowlinks {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.rlink {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.rlink:last-child { border-bottom: 0; }
.rlink:active { background: var(--surface-2); }
.rlink__ic {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-l);
  color: var(--teal-d);
  flex: 0 0 auto;
}
.rlink__ic svg { width: 20px; height: 20px; }
.rlink__t { flex: 1; min-width: 0; display: block; }
.rlink__t b { display: block; font-size: 14.5px; font-weight: 700; }
.rlink__t i {
  display: block;
  font-style: normal;
  font-size: 12.2px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rlink__c { width: 18px; height: 18px; color: var(--ink-4); flex: 0 0 auto; }
.rlink--danger .rlink__ic { background: var(--coral-l); color: var(--coral); }
.rlink--danger .rlink__t b { color: var(--coral); }

/* ---------- Toggles and sliders ---------- */

.srow {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.srow:last-child { border-bottom: 0; }
.srow__ic {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-3);
  color: var(--ink-2);
  flex: 0 0 auto;
}
.srow__ic svg { width: 20px; height: 20px; }
.srow__t { flex: 1; min-width: 0; }
.srow__t b { display: block; font-size: 14.5px; font-weight: 700; }
.srow__t i { display: block; font-style: normal; font-size: 12.2px; color: var(--ink-3); }

.tog {
  width: 46px; height: 27px;
  border-radius: 999px;
  background: var(--line-2);
  position: relative;
  flex: 0 0 auto;
  transition: background .2s ease;
}
.tog i {
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.tog.on { background: var(--teal); }
.tog.on i { transform: translateX(19px); }

.slider { padding: 6px 0 10px; }
.slider__l {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.slider__v { color: var(--teal-d); }
.slider input[type=range] {
  width: 100%;
  height: 26px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.slider input[type=range]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: var(--surface-3);
}
.slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 6px rgba(15,181,166,.4);
}
.slider input[type=range]::-moz-range-track {
  height: 6px; border-radius: 6px; background: var(--surface-3);
}
.slider input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--teal);
}

.soundtest {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sndbtn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 4px;
  display: grid;
  place-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: var(--sh-1);
}
.sndbtn svg { width: 18px; height: 18px; color: var(--teal-d); }
.sndbtn:active { background: var(--teal-l); }

/* ---------- Empty state ---------- */

.empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--ink-3);
}
.empty svg { width: 44px; height: 44px; color: var(--ink-4); }
.empty h3 { font-size: 15px; color: var(--ink-2); margin: 10px 0 4px; }
.empty p { font-size: 13px; margin: 0; }

/* ---------- Toast ---------- */

.toast {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 88%;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 13.2px;
  font-weight: 600;
  box-shadow: var(--sh-3);
  animation: toastIn .22s ease both;
}
.toast svg { width: 16px; height: 16px; color: var(--aqua); }
.toast.out { animation: toastOut .24s ease both; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(-8px); } }

/* ---------- Fly ---------- */

.fly {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  font-size: 20px;
  color: var(--amber);
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
  animation: flyUp 1.05s ease-out both;
}
@keyframes flyUp {
  0%   { opacity: 0; transform: translate(-50%, 10px) scale(.8); }
  20%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50px) scale(1); }
}

/* ---------- Modal ---------- */

.modal-back {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 56, .58);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  animation: fadeIn .18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: var(--sh-3);
  animation: sheetIn .26s cubic-bezier(.2,.9,.3,1.2) both;
  max-height: 88%;
  overflow-y: auto;
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(18px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
.sheet__mark {
  width: 62px; height: 62px;
  margin: 0 auto 12px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: var(--teal-l);
  color: var(--teal-d);
}
.sheet__mark svg { width: 30px; height: 30px; }
.sheet__mark--win { background: linear-gradient(135deg, var(--teal), var(--aqua)); color: #04262A; }
.sheet__mark--warn { background: var(--coral-l); color: var(--coral); }
.sheet__mark--info { background: var(--navy-l); color: var(--navy-3); }
.sheet__title { font-size: 18px; font-weight: 800; }
.sheet__sub { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }

.reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.reward-row:last-child { border-bottom: 0; }
.reward-row__l { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.reward-row__l svg { width: 18px; height: 18px; color: var(--teal-d); }
.reward-row b { color: var(--ink); font-weight: 800; }

/* ---------- Badges ---------- */

.dot-badge {
  position: absolute;
  top: 5px; right: 8px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(255,107,90,.4);
}

/* ---------- Thumbnails ---------- */

.thumb { display: block; }
.thumb rect { fill: var(--navy); }
.thumb--hero rect { fill: var(--aqua); }
.thumb--reveal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--sh-1);
}
.thumb--locked {
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--ink-4);
}
.thumb--locked svg { width: 40%; height: 40%; }
