/* Progress Tracker Styles */

/* Main container */
#progress-tracker-popup {
  width: 85%;
  height: 100%; /* Full height */
  max-width: 420px;
  left: 0;
  top: 0;
  margin: 0;
  border-radius: 0;
  transform: translateX(-100%);
  background-color: #fff;
  transition: transform 300ms;
  display: block;
  position: fixed;
  z-index: 12000;
  overflow: hidden;
}

#progress-tracker-popup.modal-in {
  transform: translateX(0);
}

#progress-tracker-popup .view,
#progress-tracker-popup .page {
  height: 100%; /* Full height */
  overflow: hidden;
}

#progress-tracker-popup .page-content {
  height: 100%; /* Full height */
  padding: 0;
  overflow-y: auto; /* Allow scrolling content */
  display: flex;
  flex-direction: column;
}

/* Progress Tracker Page */
#progress-tracker-page {
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  height: 100%; /* Full height */
  padding-top: 2.5%; /* Add some padding at top */
  padding-bottom: 2.5%; /* Add some padding at bottom */
}

/* Header Styling */
.progress-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0;
  text-align: center;
}

.progress-header h2 {
  margin: 0;
  font-size: 24px;
  color: #fff;
}

.progress-subtitle {
  margin: 5px 0 0;
  font-size: 14px;
  color: #666;
}

/* Section Styling */
.progress-section {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex-shrink: 0; /* Don't shrink this section */
}

.progress-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

/* Stats Cards (Grid: 2 columns on first row, Level full-width below) */
.progress-stats {
  display: grid;
  grid-template-columns: 1fr 1fr; /* exact 2 columns */
  gap: 12px;
  margin: 0 auto 10px;
  width: 100%;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box; /* ensure no overflow */
}

/* Positioning: two top tiles + level spanning full width */
.progress-stats .stat-total { grid-column: 1 / 2; }
.progress-stats .stat-level { grid-column: 2 / 3; }

/* Center content inside the wide level card */
.stat-level { align-items: center; }

.stat-value {
  font-size: clamp(18px, 5vw, 24px);
  font-weight: bold;
  color: #c8a165;
}

.stat-label {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  text-align: center;
}

/* Dance Style Progress */
.style-progress {
  margin-bottom: 15px;
}

.style-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.style-name {
  font-weight: bold;
  color: #333;
}

.style-level {
  color: #666;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #c8a165;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Achievements */
.achievements-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
}

.badge-icon {
  width: 50px;
  height: 50px;
  background-color: #c8a165;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
}

.badge-icon i {
  font-size: 24px;
  color: white;
}

.badge-name {
  font-size: 12px;
  text-align: center;
  color: #333;
}

.achievement-badge.locked .badge-icon {
  background-color: #ccc;
}

.achievement-badge.locked .badge-name {
  color: #999;
}

/* Recent Activity */
.activity-list {
  max-height: 35vh; /* Limit height to 35% of viewport */
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  background-color: #f0f0f0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.activity-icon i {
  font-size: 16px;
  color: #c8a165;
}

.activity-details {
  display: flex;
  flex-direction: column;
}

.activity-title {
  font-weight: bold;
  color: #333;
}

.activity-date {
  font-size: 12px;
  color: #666;
}

/* Goals */
.goals-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-item {
  display: flex;
  align-items: center;
}

.goal-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #c8a165;
  border-radius: 4px;
  margin-right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.goal-checkbox.checked {
  background-color: #c8a165;
  color: white;
}

.goal-checkbox.add {
  background-color: #eee;
  border-color: #ccc;
  color: #666;
}

.goal-text {
  font-size: 14px;
  color: #333;
}

.goal-item.add-goal {
  cursor: pointer;
  opacity: 0.7;
}

.goal-item.add-goal:hover {
  opacity: 1;
}

/* Remove the Action Buttons section since we removed the button */
.progress-actions {
  display: none;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  color: #999;
  padding: 15px;
  font-style: italic;
  font-size: 14px;
}

/* For tablet and larger screens */
@media (min-width: 768px) {
  #progress-tracker-popup {
    width: 380px;
  }
}

/* Add Goal Modal z-index override */
#add-goal-modal {
  z-index: 13000;
}
