/* ==========================================================================
   MOGO X+ UNIVERSAL OBSIDIAN SKELETON UI STYLESHEET (V2 PRO)
   100% Responsive: Mobile (Snap Carousel), Tablet & Desktop (4-Column)
   Page-Aware Layout Synchronization • Zero CLS Layout Shift
   ========================================================================== */

/* Shimmer Wave Animation */
@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes skeletonPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.995);
  }
}

/* ==========================================================================
   BASE SKELETON ATOMIC ATOMS
   ========================================================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.035) 15%,
    rgba(124, 101, 232, 0.16) 42%,
    rgba(245, 184, 168, 0.10) 54%,
    rgba(255, 255, 255, 0.035) 75%
  ) !important;
  background-size: 250% 100% !important;
  animation: skeletonShimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  border-radius: 8px;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}

.skeleton-text {
  height: 13px;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 6px;
}

.skeleton-text.sm {
  height: 10px;
}

.skeleton-text.lg {
  height: 18px;
}

.skeleton-title {
  height: 24px;
  width: 65%;
  margin-bottom: 12px;
  border-radius: 8px;
}

.skeleton-pill {
  height: 28px;
  width: 90px;
  border-radius: 9999px;
  display: inline-block;
}

.skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-btn {
  height: 44px;
  width: 100%;
  border-radius: 9999px;
}

/* Base Skeleton Card */
.skeleton-card {
  background: rgba(18, 20, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.skeleton-card.featured {
  border-color: rgba(124, 101, 232, 0.4);
  box-shadow: 0 0 35px rgba(124, 101, 232, 0.15);
}

.skeleton-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124, 101, 232, 0.5), transparent);
  animation: skeletonPulse 2s ease-in-out infinite;
}

/* ==========================================================================
   UNIVERSAL FULL-PAGE SKELETON PRELOADER OVERLAY
   ========================================================================== */
#mogo-page-skeleton-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #08090E;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), transform 0.38s ease, visibility 0.38s ease;
  pointer-events: none;
}

#mogo-page-skeleton-overlay.skeleton-fade-out {
  opacity: 0 !important;
  transform: scale(1.008);
  visibility: hidden !important;
}

/* ==========================================================================
   SKELETON NAVBAR (MATCHES REAL FLOATING PILL ACROSS BREAKPOINTS)
   ========================================================================== */
.skeleton-nav-pill {
  width: min(920px, 94vw);
  height: 52px;
  border-radius: 9999px;
  background: rgba(18, 19, 26, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 36px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.skeleton-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skeleton-nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.skeleton-nav-title {
  width: 90px;
  height: 18px;
  border-radius: 5px;
}

.skeleton-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.skeleton-nav-link {
  width: 58px;
  height: 12px;
  border-radius: 4px;
}

.skeleton-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skeleton-nav-cta {
  width: 106px;
  height: 36px;
  border-radius: 9999px;
}

.skeleton-nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
}

/* ==========================================================================
   PAGE LAYOUT 1: HOMEPAGE SKELETON
   ========================================================================== */
.skeleton-home-layout {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skeleton-safety-pill {
  width: min(340px, 86vw);
  height: 26px;
  border-radius: 9999px;
  margin-bottom: 22px;
}

.skeleton-hero-headline {
  width: min(780px, 92vw);
  height: 110px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.skeleton-hero-subtitle-1 {
  width: min(600px, 88vw);
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-hero-subtitle-2 {
  width: min(420px, 76vw);
  height: 16px;
  margin-bottom: 28px;
}

.skeleton-hero-input-capsule {
  width: min(540px, 92vw);
  height: 56px;
  border-radius: 9999px;
  background: rgba(18, 20, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 18px;
  margin-bottom: 24px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.skeleton-hero-input-text {
  width: 50%;
  height: 16px;
  border-radius: 4px;
}

.skeleton-hero-input-btn {
  width: 150px;
  height: 44px;
  border-radius: 9999px;
}

.skeleton-hero-ticker-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(640px, 94vw);
  margin-bottom: 36px;
}

.skeleton-mini-tag {
  width: 95px;
  height: 24px;
  border-radius: 9999px;
}

.skeleton-marquee-bar {
  width: min(1140px, 96vw);
  height: 48px;
  border-radius: 14px;
  margin-top: 10px;
}

/* ==========================================================================
   PAGE LAYOUT 2: PRICING SKELETON (4 TIERS + MOBILE CAROUSEL SYNC)
   ========================================================================== */
.skeleton-pricing-layout {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skeleton-page-tag {
  width: 140px;
  height: 24px;
  border-radius: 9999px;
  margin-bottom: 14px;
}

.skeleton-page-title {
  width: min(520px, 90vw);
  height: 42px;
  margin-bottom: 12px;
}

.skeleton-page-subtitle {
  width: min(580px, 86vw);
  height: 15px;
  margin-bottom: 26px;
}

.skeleton-pricing-toggle {
  width: 250px;
  height: 46px;
  border-radius: 9999px;
  margin-bottom: 40px;
}

.skeleton-pricing-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.skeleton-pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
}

.skeleton-card-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0;
}

.skeleton-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skeleton-feature-check {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.skeleton-feature-text {
  height: 12px;
  border-radius: 4px;
}

.skeleton-pricing-dots {
  display: none;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 24px;
}

.skeleton-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
}

.skeleton-dot.active {
  width: 22px;
  background: rgba(124, 101, 232, 0.7);
}

/* Existing Customer Banner Skeleton */
.skeleton-customer-banner {
  width: min(840px, 92vw);
  height: 72px;
  border-radius: 20px;
  margin-top: 24px;
}

/* ==========================================================================
   PAGE LAYOUT 3: CHECKOUT SKELETON (2-COLUMN SPLIT)
   ========================================================================== */
.skeleton-checkout-layout {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skeleton-checkout-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 24px;
  margin-top: 10px;
}

.skeleton-payment-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.skeleton-pay-tab {
  flex: 1;
  height: 40px;
  border-radius: 12px;
}

.skeleton-qr-box {
  width: 130px;
  height: 130px;
  border-radius: 16px;
  margin: 16px 0;
}

/* ==========================================================================
   PAGE LAYOUT 4: CUSTOMER VAULT SKELETON (OBSIDIAN LOGIN / DASHBOARD)
   ========================================================================== */
.skeleton-vault-layout {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.skeleton-vault-card {
  width: 100%;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ==========================================================================
   PAGE LAYOUT 5: DASHBOARD & TABLE SKELETON (ADMIN / SUPPORT)
   ========================================================================== */
.skeleton-dashboard-layout {
  width: 100%;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
}

.skeleton-metrics-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.skeleton-table-box {
  width: 100%;
  background: rgba(18, 20, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
}

.skeleton-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE, TABLET & DESKTOP SYNC)
   ========================================================================== */

/* Tablet (769px - 1024px) */
@media (max-width: 1024px) {
  .skeleton-pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skeleton-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skeleton-checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
  #mogo-page-skeleton-overlay {
    padding: 14px 10px;
  }

  /* Compact Mobile Navbar */
  .skeleton-nav-pill {
    height: 46px;
    padding: 0 12px;
    margin-bottom: 24px;
    width: 95vw;
  }

  .skeleton-nav-links {
    display: none !important;
  }

  .skeleton-nav-burger {
    display: flex !important;
  }

  .skeleton-nav-cta {
    width: 88px;
    height: 32px;
  }

  /* Mobile Hero */
  .skeleton-hero-headline {
    height: 58px;
    width: 88vw;
    margin-bottom: 14px;
  }

  .skeleton-hero-subtitle-1 {
    height: 14px;
    width: 90vw;
  }

  .skeleton-hero-subtitle-2 {
    height: 14px;
    width: 80vw;
    margin-bottom: 20px;
  }

  .skeleton-hero-input-capsule {
    height: 50px;
    padding: 5px 6px 5px 14px;
  }

  .skeleton-hero-input-btn {
    width: 120px;
    height: 38px;
  }

  /* Mobile Pricing Horizontal Snap Carousel Sync */
  .skeleton-pricing-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding: 8px 14px 18px 14px !important;
    margin-bottom: 10px !important;
    width: 100vw !important;
    box-sizing: border-box !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .skeleton-pricing-grid::-webkit-scrollbar {
    display: none !important;
  }

  .skeleton-pricing-card {
    min-width: 80vw !important;
    width: 80vw !important;
    scroll-snap-align: center !important;
    flex-shrink: 0 !important;
    min-height: 420px !important;
  }

  .skeleton-pricing-dots {
    display: flex !important;
  }

  /* Mobile Checkout & Table */
  .skeleton-checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skeleton-metrics-grid {
    grid-template-columns: 1fr;
  }

  .skeleton-payment-tabs {
    flex-wrap: wrap;
  }

  .skeleton-pay-tab {
    min-width: 45%;
  }

  .skeleton-customer-banner {
    height: 90px;
  }
}
