/* Skeleton Loading Animations */
@keyframes skeleton-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 0.75rem;
}

.skeleton-text {
  height: 1rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-text.medium {
  width: 70%;
}

.skeleton-badge {
  height: 1.5rem;
  width: 80px;
  border-radius: 20px;
  display: inline-block;
}

.skeleton-progress {
  height: 8px;
  width: 100%;
  border-radius: 4px;
  margin-top: 0.75rem;
}

.skeleton-stat {
  height: 2.5rem;
  width: 4rem;
  border-radius: 8px;
}

.skeleton-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Dashboard-specific skeletons */
.skeleton-dashboard-card {
  min-height: 120px;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}

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

/* CEFR Level Skeleton */
.skeleton-cefr-level {
  height: 4rem;
  width: 6rem;
  margin: 0 auto 0.5rem;
  border-radius: 8px;
}

.skeleton-cefr-score {
  height: 1.25rem;
  width: 8rem;
  margin: 0.5rem auto;
}

/* Component bars skeleton */
.skeleton-component-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.skeleton-component-label {
  width: 80px;
  height: 0.8rem;
}

.skeleton-component-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
}

.skeleton-component-value {
  width: 45px;
  height: 0.8rem;
}

/* Stats grid skeleton */
.skeleton-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.skeleton-stat-value {
  height: 1.75rem;
  width: 4rem;
  margin: 0 auto 0.5rem;
  border-radius: 4px;
}

.skeleton-stat-label {
  height: 0.75rem;
  width: 5rem;
  margin: 0 auto;
}

/* Lesson plan card skeleton */
.skeleton-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.skeleton-plan-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
}

.skeleton-plan-stat-value {
  height: 1.5rem;
  width: 3rem;
  margin: 0 auto 0.25rem;
}

.skeleton-plan-stat-label {
  height: 0.75rem;
  width: 4rem;
  margin: 0 auto;
}

.skeleton-button {
  height: 2.5rem;
  width: 100%;
  border-radius: 8px;
  margin-top: 0.5rem;
}

/* Struggling words skeleton */
.skeleton-word-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #dee2e6;
}

.skeleton-word-content {
  flex: 1;
}

.skeleton-word-latvian {
  height: 1rem;
  width: 120px;
  margin-bottom: 0.25rem;
}

.skeleton-word-english {
  height: 0.875rem;
  width: 100px;
}

.skeleton-word-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.skeleton-word-stat {
  height: 0.75rem;
  width: 60px;
}

/* Plan list skeletons */
.skeleton-plan-card {
  margin-bottom: 1rem;
}

.skeleton-card-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.skeleton-card-stat {
  height: 0.875rem;
  width: 80px;
}

/* Review page skeletons */
.skeleton-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.skeleton-stat-item {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.skeleton-achievement {
  height: 2.5rem;
  width: 150px;
  border-radius: 20px;
  display: inline-block;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
}

.skeleton-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0d6efd;
  margin-bottom: 0.75rem;
}

.skeleton-suggestion-text {
  height: 1rem;
  width: 200px;
}

.skeleton-suggestion-btn {
  height: 2rem;
  width: 4rem;
  border-radius: 6px;
}

/* Hidden class for when content loads */
.hidden {
  display: none !important;
}
