/* ================================================================
   CERTMASTER — Monetization Extra Styles
   Daily Limit · Post-Quiz Upsell · Leaderboard · Streak Freeze
   Team Plan · Guarantee Badge
   ================================================================ */

/* ── Daily Limit Pill (quiz header) ─────────────────────────── */
.quiz-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.quiz-header-top h3 { margin: 0; }

.daily-limit-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text3);
  box-shadow: var(--shadow-xs);
}
.dlp-bar-track {
  width: 36px;
  height: 4px;
  background: var(--bg2);
  border-radius: 2px;
  overflow: hidden;
  margin-left: 4px;
}
.dlp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Post-Quiz Upsell Card ───────────────────────────────────── */
.post-quiz-upsell {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--accent-glow);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 12px;
  animation: fadeInUp 0.3s ease;
}
.pqu-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.pqu-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.pqu-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.pqu-sub {
  font-size: 12px;
  color: var(--text3);
}
.pqu-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.pqu-btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ── Streak Risk Banner — Freeze Button ─────────────────────── */
.srb-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.srb-freeze-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #0EA5E9;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition-md);
  box-shadow: 0 2px 8px rgba(14,165,233,0.30);
}
.srb-freeze-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.srb-freeze-locked {
  background: var(--text3) !important;
  box-shadow: none !important;
  opacity: 0.6;
}
.srb-freeze-count {
  background: rgba(255,255,255,0.22);
  border-radius: 9px;
  padding: 1px 6px;
  font-size: 11px;
}

/* ── Leaderboard Widget ──────────────────────────────────────── */
.leaderboard-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.lb-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.lb-your-rank-chip {
  background: var(--accent-glow);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--accent);
}
.lb-your-rank-chip strong { font-weight: 700; }

.lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lb-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--card2);
  transition: var(--transition);
}
.lb-row:hover { background: var(--bg2); }
.lb-you-row {
  background: var(--accent-glow);
  border: 1px solid var(--border2);
}

.lb-medal {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.lb-info { flex: 1; min-width: 0; }
.lb-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-cert-tag {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}
.lb-score { text-align: right; flex-shrink: 0; }
.lb-streak-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.lb-topics-num {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.lb-upgrade-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--accent-glow);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--accent);
  flex-wrap: wrap;
}
.lb-upgrade-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}
.lb-upgrade-btn:hover { filter: brightness(1.1); }
.lb-premium-badge {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* ── Team Plan Card ──────────────────────────────────────────── */
.pm-team {
  background: var(--card2);
  border: 1px solid rgba(14,165,233,0.3) !important;
  position: relative;
}
.pm-team-btn {
  background: #0EA5E9 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(14,165,233,0.30) !important;
}
.pm-team-btn:hover { filter: brightness(1.1) !important; transform: translateY(-1px) !important; }
.pm-team-use-case {
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text3);
  margin: 10px 0;
  line-height: 1.5;
}

/* ── Guarantee Banner ────────────────────────────────────────── */
.pm-guarantee-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--success-glow);
  border: 1px solid rgba(5,150,105,0.22);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0 0;
}
.pm-guarantee-icon {
  font-size: 34px;
  flex-shrink: 0;
}
.pm-guarantee-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 3px;
}
.pm-guarantee-sub {
  font-size: 13px;
  color: var(--text3);
}

/* ── Responsive Fixes ────────────────────────────────────────── */
@media (max-width: 600px) {
  .post-quiz-upsell {
    flex-direction: column;
    align-items: flex-start;
  }
  .pqu-btn { width: 100%; text-align: center; }

  .lb-upgrade-hint {
    flex-direction: column;
    align-items: flex-start;
  }
  .lb-upgrade-btn { align-self: stretch; text-align: center; }

  .srb-actions { flex-wrap: wrap; }

  .pm-guarantee-banner {
    flex-direction: column;
    text-align: center;
  }

  .quiz-header-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Dark mode overrides ─────────────────────────────────────── */
:root.dark-mode .pm-team {
  background: var(--card2) !important;
  border-color: rgba(14,165,233,0.25) !important;
}
:root.dark-mode .pm-team-btn {
  background: #0369A1 !important;
}
:root.dark-mode .pm-team-use-case {
  background: rgba(14,165,233,0.08);
  color: var(--text3);
}
