/* ==========================================================================
   WeatherPin Live - VIP Monetization & Visual Styling
   Author: WeatherPin Team
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Animal Crown Badge (Vương miện Hoàng Gia trên đầu Linh thú)
   -------------------------------------------------------------------------- */
.animal-crown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.animal-crown-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 19px;
  line-height: 1;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.85)) drop-shadow(0 0 2px #fff);
  animation: vipCrownFloat 2.6s ease-in-out infinite alternate;
}

/* Crown trên Marker bản đồ GPS */
.gps-marker-crown {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  line-height: 1;
  z-index: 25;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.9));
  animation: vipCrownFloat 2.4s ease-in-out infinite alternate;
}

/* Crown trên Profile Avatar */
.profile-crown-badge {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  line-height: 1;
  z-index: 25;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.9)) drop-shadow(0 0 4px #ffd700);
  animation: vipCrownFloat 2.8s ease-in-out infinite alternate;
}

@keyframes vipCrownFloat {
  0% {
    transform: translateX(-50%) translateY(0) rotate(-2deg);
  }
  100% {
    transform: translateX(-50%) translateY(-3px) rotate(2deg);
  }
}

/* --------------------------------------------------------------------------
   2. VIP Map Marker Pin (Ghim báo cáo thời tiết có viền vàng kim)
   -------------------------------------------------------------------------- */
.vip-report-pin {
  box-shadow: 0 0 0 2.5px #f59e0b, 0 4px 14px rgba(245, 158, 11, 0.6) !important;
  border-color: #fbbf24 !important;
  position: relative;
}

.vip-report-pin::after {
  content: "👑";
  position: absolute;
  top: -10px;
  right: -8px;
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

.vip-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  border: 1px solid rgba(245, 158, 11, 0.7);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* --------------------------------------------------------------------------
   3. Search Quota Pill inside Search Bar
   -------------------------------------------------------------------------- */
.search-quota-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.search-quota-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.5);
  color: #fff;
}

.search-quota-pill.active-vip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fbbf24;
}

.search-quota-pill.quota-depleted {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(245, 158, 11, 0.3));
  border: 1px solid #f59e0b;
  color: #fde68a;
  animation: pulseQuota 2s infinite;
}

@keyframes pulseQuota {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* --------------------------------------------------------------------------
   4. VIP Modal Component
   -------------------------------------------------------------------------- */
.vip-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.vip-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.vip-modal-dialog {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(245, 158, 11, 0.25);
  position: relative;
  transform: scale(0.92) translateY(15px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  padding: 28px 24px;
}

.vip-modal-backdrop.active .vip-modal-dialog {
  transform: scale(1) translateY(0);
}

.vip-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.vip-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border-color: #ef4444;
}

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

.vip-modal-crown-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.8));
  animation: vipCrownFloat 2.4s ease-in-out infinite alternate;
}

.vip-modal-title {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.vip-modal-subtitle {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

/* Tier Cards Grid */
.vip-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .vip-tiers-grid {
    grid-template-columns: 1fr;
  }
}

.vip-tier-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  position: relative;
  transition: all 0.25s;
}

.vip-tier-card.popular {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 8px 25px -8px rgba(245, 158, 11, 0.35);
}

.vip-tier-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.vip-tier-name {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.vip-tier-price {
  font-size: 20px;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 12px;
}

.vip-tier-price small {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.vip-tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vip-tier-features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vip-tier-features li i {
  color: #10b981;
  font-size: 12px;
}

/* App Download CTA Section */
.vip-app-cta-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 540px) {
  .vip-app-cta-box {
    flex-direction: column;
    text-align: center;
  }
}

.vip-qr-container {
  flex-shrink: 0;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vip-qr-container img {
  width: 96px;
  height: 96px;
  display: block;
}

.vip-qr-container span {
  font-size: 10px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.vip-app-info {
  flex: 1;
}

.vip-app-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px;
}

.vip-app-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 12px;
}

.vip-store-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .vip-store-buttons {
    justify-content: center;
  }
}

.vip-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.vip-store-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #38bdf8;
  transform: translateY(-2px);
  color: #fff;
}

.vip-store-btn i {
  font-size: 16px;
}

.vip-note-sync {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
}

.vip-note-sync b {
  color: #cbd5e1;
}
