/* ─── reader-tier.css — مكتبة ليبيا الطيبة ─────────────────────────
 * Tier badge styles for: novice, bronze, silver, gold, نجمة ليبيا
 * Sizes (sm/md/lg) · legendary shimmer · upgrade celebration toast
 * Profile-page large tier card with progress bar
 * ─────────────────────────────────────────────────────────────────── */

.reader-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 16px;
  font-family: 'Aref Ruqaa', 'Amiri', serif;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  vertical-align: middle;
  transition: transform .2s, box-shadow .2s;
}

.reader-tier-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tier-icon { font-size: 1.1em; }
.tier-name { font-weight: 700; }
.tier-count {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.05em 0.5em;
  border-radius: 10px;
  font-size: 0.85em;
  min-width: 1.8em;
  text-align: center;
}

/* ─── Sizes ──────────────────────────────────────────────────────── */
.tier-sm { font-size: 0.78rem; padding: 0.2rem 0.55rem; }
.tier-md { font-size: 0.95rem; padding: 0.35rem 0.8rem; }
.tier-lg {
  font-size: 1.15rem;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
}

/* ─── Legendary tier — animated shimmer ──────────────────────────── */
.tier-legendary {
  background-size: 200% 200% !important;
  animation: tierShimmer 3s ease infinite;
  border: 1.5px solid rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.2);
}
.tier-legendary .tier-icon { animation: starPulse 1.6s ease infinite; }

@keyframes tierShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes starPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .tier-legendary,
  .tier-legendary .tier-icon { animation: none; }
}

/* ─── Upgrade celebration toast ──────────────────────────────────── */
.tier-upgrade-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(15, 20, 35, 0.95);
  backdrop-filter: blur(12px);
  border: 2px solid #FFD700;
  border-radius: 20px;
  padding: 2rem 2.5rem;
  text-align: center;
  font-family: 'Aref Ruqaa', serif;
  color: #FAF6EE;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation:
    tierToastIn 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    tierToastOut 0.4s ease 3.6s forwards;
  max-width: 90vw;
}
.tier-upgrade-toast h3 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: #FFD700;
}
.tier-upgrade-toast .tier-upgrade-icon {
  font-size: 4rem;
  display: block;
  margin: 0 auto 0.5rem;
  animation: starPulse 1s ease infinite;
}
.tier-upgrade-toast p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: rgba(250, 246, 238, 0.85);
}
.tier-upgrade-toast .tier-upgrade-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #FFD700;
}
@keyframes tierToastIn {
  from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}
@keyframes tierToastOut {
  to   { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

/* ─── Profile page — large tier display ──────────────────────────── */
.tier-profile-card {
  background: var(--bg-elevated, #FFFEFA);
  border: 1px solid var(--border, rgba(184, 153, 104, 0.25));
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
}
.tier-profile-card .tier-big-badge {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.tier-profile-card .tier-progress {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted, #5a6a7a);
}
.tier-profile-card .tier-progress-bar {
  background: rgba(184, 153, 104, 0.15);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.tier-profile-card .tier-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #B89968, #FFD700);
  transition: width 0.6s ease;
}
