/* Skeleton Loading Animation */

@keyframes skeleton-pulse {
  0%, 100% {
    background-color: rgba(255, 255, 255, 0.08);
  }
  50% {
    background-color: rgba(255, 255, 255, 0.14);
  }
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  animation: skeleton-pulse 2s ease-in-out infinite;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.skeleton--shimmer {
  animation: skeleton-shimmer 2s infinite;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0px,
    rgba(255, 255, 255, 0.14) 50px,
    rgba(255, 255, 255, 0.08) 100px
  );
  background-size: 200px 100%;
  background-repeat: no-repeat;
}

/* Skeleton Utilities */

.skeleton-text {
  height: 1.2em;
  margin: 0.5rem 0;
  display: block;
  border-radius: 4px;
}

.skeleton-title {
  height: 1.8em;
  margin: 0.75rem 0 1.5rem 0;
  display: block;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-line {
  height: 16px;
  margin: 8px 0;
  display: block;
}

/* Billing Plan Skeleton */

.billing-plan-skeleton {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass);
  min-height: 320px;
}

.billing-plan-skeleton__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.billing-plan-skeleton__title {
  height: 1.4em;
  width: 60%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.billing-plan-skeleton__description {
  height: 3em;
  width: 100%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.08) 0px,
    rgba(255, 255, 255, 0.14) 50px,
    rgba(255, 255, 255, 0.08) 100px);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
}

.billing-plan-skeleton__details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.billing-plan-skeleton__detail-line {
  height: 1.2em;
  width: 70%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.billing-plan-skeleton__button {
  height: 2.5rem;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  margin-top: 1rem;
}

.billing-plans-grid--skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Analytics Skeleton */

.analytics-skeleton {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.analytics-stat-skeleton {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass);
  gap: 0.75rem;
}

.analytics-stat-skeleton__label {
  height: 0.9em;
  width: 40%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.analytics-stat-skeleton__value {
  height: 1.8em;
  width: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.analytics-summary-grid--skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.analytics-chart-skeleton {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-chart-skeleton__header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.analytics-chart-skeleton__title {
  height: 1.4em;
  width: 40%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.analytics-chart-skeleton__subtitle {
  height: 1em;
  width: 60%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.analytics-chart-skeleton__canvas {
  height: 220px;
  width: 100%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04) 0px,
    rgba(255, 255, 255, 0.1) 50px,
    rgba(255, 255, 255, 0.04) 100px);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: 6px;
}

.analytics-grid--skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.analytics-kpi-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
}

.analytics-kpi-skeleton__label {
  height: 0.9em;
  width: 30%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.analytics-kpi-skeleton__value {
  height: 1.6em;
  width: 40%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Notification Skeleton */

.notification-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.notification-skeleton__tone {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
}

.notification-skeleton__title {
  height: 1.1em;
  width: 70%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.notification-skeleton__body {
  height: 2em;
  width: 100%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.08) 0px,
    rgba(255, 255, 255, 0.14) 50px,
    rgba(255, 255, 255, 0.08) 100px);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
}

.notification-skeleton__date {
  height: 0.9em;
  width: 40%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Request Item Skeleton */

.request-item-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.request-item-skeleton__title {
  height: 1.1em;
  width: 60%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.request-item-skeleton__status {
  height: 1em;
  width: 40%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.request-item-skeleton__date {
  height: 0.9em;
  width: 30%;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* Responsive adjustments */

@media (max-width: 768px) {
  .billing-plans-grid--skeleton {
    grid-template-columns: 1fr;
  }

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

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