/* Copyright 2026 HMZ-MTR / CyberTools. All rights reserved. */
/* ══════════════════════════════════════════════════════════════════
   ATTEMPTS COUNTER: flame counter + refill button in the navbar,
   and a popup when attempts run out.
   ══════════════════════════════════════════════════════════════════ */

.streak {
  order: 2;
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 32px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
}

.streak-count {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #ffb74d;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: default;
}

.streak-flame { width: 21px; height: 21px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(255, 120, 0, .55)); }

.streak-refill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  height: 24px;
  padding: 0 .55rem;
  font-family: inherit;
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #ffb74d;
  background: transparent;
  border: 1px solid rgba(255, 145, 0, .65);
  text-shadow: 0 0 8px rgba(255, 160, 0, .6);
  box-shadow: 0 0 12px rgba(255, 145, 0, .25), inset 0 0 10px rgba(255, 145, 0, .08);
  cursor: pointer;
  transition: background .2s, color .2s;
  animation: refill-glow 2.8s ease-in-out infinite;
}

@keyframes refill-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 145, 0, .2), inset 0 0 8px rgba(255, 145, 0, .06); }
  50% { box-shadow: 0 0 22px rgba(255, 145, 0, .45), inset 0 0 14px rgba(255, 145, 0, .14); }
}

.streak-refill:hover {
  background: rgba(255, 145, 0, .12);
  box-shadow: 0 0 26px rgba(255, 145, 0, .5), inset 0 0 14px rgba(255, 145, 0, .15);
  animation: none;
}

/* Empty state */
.streak.empty .streak-count { color: var(--text-muted, #4e824e); }

.streak.empty .streak-flame { filter: grayscale(1) brightness(.6); }

/* At 0 the refill button is highlighted */

.streak.empty .streak-refill {
  color: #111;
  background: #ffa000;
  border-color: #ffa000;
  text-shadow: none;
}

.streak.empty .streak-refill:hover { background: #ffb300; }

@media (max-width: 480px) {
  .streak-refill .lbl { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .streak-refill { animation: none; }
}

/* ── Out-of-attempts popup ── */
.streak-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .75);
  font-family: var(--mono, 'JetBrains Mono', monospace);
}

.streak-modal.show { display: flex; }

.streak-modal-box {
  position: relative;
  width: min(400px, 100%);
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--surface, #0e0e0e);
  border: 1px solid var(--border2, #243a24);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.streak-modal-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffa000, transparent);
}

.streak-modal-mod {
  font-size: .58rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text-muted, #4e824e);
}

.streak-modal-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #ffb74d;
}

.streak-modal-text {
  font-size: .74rem;
  line-height: 1.8;
  color: var(--text-dim, #7ac77a);
}

.streak-modal-actions { display: flex; gap: .6rem; margin-top: .25rem; }

.streak-modal-actions button {
  flex: 1;
  height: 40px;
  font-family: inherit;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid;
  transition: background .2s;
}

.streak-modal-refill { color: #111; background: #ffa000; border-color: #ffa000; }
.streak-modal-refill:hover { background: #ffb300; }

.streak-modal-cancel {
  color: var(--text-dim, #7ac77a);
  background: transparent;
  border-color: var(--border2, #243a24);
}

.streak-modal-cancel:hover { color: var(--text, #e8ffe8); }
