/* ==========================================================
   KingPulse - Access Gate & VIP Tiers Styling
   ========================================================== */

/* Header Tier Chip */
.king-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #ffd700;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  font-family: inherit;
}

.king-tier-chip:hover {
  background: rgba(255, 215, 0, 0.18);
  border-color: rgba(255, 215, 0, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.king-tier-chip.guest {
  background: rgba(142, 142, 147, 0.1);
  border-color: rgba(142, 142, 147, 0.3);
  color: #d1d1d6;
}

.king-tier-chip.tier-bronze {
  background: rgba(205, 127, 50, 0.12);
  border-color: rgba(205, 127, 50, 0.4);
  color: #e59866;
}

.king-tier-chip.tier-silver {
  background: rgba(192, 192, 192, 0.12);
  border-color: rgba(192, 192, 192, 0.4);
  color: #f2f2f2;
}

.king-tier-chip.tier-vip {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.25));
  border-color: #ffd700;
  color: #ffe066;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
  animation: pulse-vip 3s infinite alternate;
}

@keyframes pulse-vip {
  0% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.2); }
  100% { box-shadow: 0 0 16px rgba(255, 215, 0, 0.45); }
}

/* Nav Lock Badges */
.nav-lock-badge {
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  opacity: 0.8;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
}

.mode-nav-btn.nav-locked {
  opacity: 0.85;
}

.mode-nav-btn.nav-locked:hover {
  opacity: 1;
}

/* VIP Modal Backdrop & Dialog */
.king-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
}

.king-modal-backdrop.visible {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.king-modal-card {
  position: relative;
  background: #111318;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.1);
  color: #fff;
  text-align: right;
  direction: rtl;
}

.king-modal-close {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #aaa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.king-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.king-modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.king-badge-glow {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 12px;
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.2);
}

.king-modal-kicker {
  color: #ffd700;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.king-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: #fff;
}

.king-modal-desc {
  font-size: 14px;
  color: #a0a5b5;
  line-height: 1.6;
  margin: 0;
}

/* Balance Box */
.king-balance-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.king-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: #d1d5db;
}

.king-balance-row strong.highlight {
  color: #fff;
  font-size: 15px;
}

.king-balance-row.missing-alert {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 75, 75, 0.3);
  color: #ff6b6b;
  font-weight: 700;
}

.missing-val {
  background: rgba(255, 75, 75, 0.15);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 75, 75, 0.3);
}

.king-balance-row.access-granted {
  color: #10b981;
  font-weight: 700;
  text-align: center;
  display: block;
}

/* Tiers Grid */
.king-modal-tiers-overview h4 {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.tier-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  transition: all 0.2s ease;
}

.tier-box.active-tier {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.05);
}

.tier-box .t-badge {
  font-size: 11px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 4px;
}

.tier-box .t-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.tier-box .t-perk {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

/* Actions */
.king-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-glow {
  background: linear-gradient(135deg, #ffd700, #ff9900);
  color: #000;
  font-weight: 800;
  font-size: 15px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(255, 153, 0, 0.4);
  font-family: inherit;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 153, 0, 0.6);
}

.btn-secondary-link {
  background: transparent;
  color: #9ca3af;
  border: none;
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

.btn-secondary-link:hover {
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================
   Swap Page VIP Incentive Banner
   ========================================================== */
.king-vip-incentive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 153, 0, 0.04));
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  direction: rtl;
  text-align: right;
  transition: all 0.3s ease;
}

.king-vip-incentive-banner:hover {
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
}

.vip-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.vip-banner-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  flex-shrink: 0;
}

.vip-banner-text {
  flex: 1;
}

.vip-banner-text b {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.vip-banner-text p {
  font-size: 12px;
  color: #a0a5b5;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.vip-progress-track {
  width: 100%;
  max-width: 280px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.vip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff9900);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.btn-vip-banner-action {
  background: linear-gradient(135deg, #ffd700, #ff9900);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
  flex-shrink: 0;
}

.btn-vip-banner-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
}

.king-vip-incentive-banner.banner-vip {
  border-color: rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 180, 0, 0.08));
}

@media (max-width: 640px) {
  .king-vip-incentive-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .vip-banner-content {
    flex-direction: column;
  }
  .vip-progress-track {
    max-width: 100%;
    margin: 6px auto 0;
  }
}
