/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
}

.hidden {
  display: none !important;
}

:root {
  /* --trimm-green: ##24571A; old color, not used anymore*/
  --trimm-green: #00580B;
  --trimm-black: #000000;
  --trimm-white: #ffffff;
  --trimm-green-hover: #256b29;
}

/* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--trimm-green);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  z-index: 1000;
  transition: opacity 0.5s ease;
  opacity: 1;
}

#splash-screen h1 {
  color: #000;
  background-color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.circle-logo {
  width: 80px;
  height: 80px;
  border: 4px solid white;
  border-radius: 50%;
  margin-top: 2rem;
  position: relative;
  animation: accelerateSpin 1.5s cubic-bezier(0.1, 0, 0.9, 1) infinite;
}

.indicator {
  position: absolute;
  width: 16px;
  height: 16px;
  background-color: black;
  border-radius: 50%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes accelerateSpin {
  0% { transform: rotate(0deg); }
  40% { transform: rotate(100deg); }
  70% { transform: rotate(250deg); }
  100% { transform: rotate(360deg); }
}

/* Essential resets for proper full-height layout */
html, body {
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* App Container */
#app-container {
  max-width: 480px;
  margin: 0 auto !important;
  height: 100vh !important; 
  display: flex !important;
  flex-direction: column !important;
  background-color: white;
  overflow: hidden !important;
}

/* Fixed-size header and navigation */
header, .bottom-nav {
  flex-shrink: 0 !important;
}

/* Main content area */
main {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0 !important; /* Fixes Firefox flex issues */
  padding-bottom: 70px !important; /* Add padding to account for fixed nav height */
}

/* Screen content */
.screen {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  padding-bottom: 4rem !important;
  box-sizing: border-box !important;
}

/* Map screen special handling */
#map-screen {
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  padding-bottom: 70px !important;
}

#map-screen .screen-header {
  padding: 1rem !important;
}

#map-container {
  flex: 1 0 auto;
  height: calc(100% - 60px) !important;
}

/* Header - prevent it from growing */
header {
  background-color: white;
  border-bottom: 1px solid #e1e1e1;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--trimm-black);
}

.logo-container {
  display: flex;
  flex-direction: column;
}

.logo {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--trimm-green);
}

.logo-dot {
  color: white;
}

.logo-dot-green {
  color: var(--trimm-green);
}

.logo-tagline {
  font-size: 0.7rem;
  color: #ffffff80;
  margin-top: -0.2rem;
}

.notifications {
  color: #fff;
  font-size: 1.2rem;
}

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem 0;
  background-color: white;
  border-top: 1px solid #e1e1e1;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;

  color: #666;
  transition: color 0.3s ease;
}

.nav-item.active {
  color: var(--trimm-green);
}

.nav-item.active i {
  color: var(--trimm-green);
}

.nav-item i {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

/* Menu Items */
.menu-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.menu-item {
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-item:hover {
  background-color: #e9e9e9;
}

.menu-item:active {
  background-color: var(--trimm-green);
  color: white;
}

/* Action Button */
.action-button {
  margin-top: 2rem;
  padding: 1rem;
  background-color: var(--trimm-green);
  color: white;
  border-radius: 2rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  margin: 2rem 0;
}

.action-button:hover {
  background-color: #1d4615;
}

/* Screen - explicit height and stretch content */
.screen {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  padding-bottom: 4rem !important;
  height: auto !important;
  min-height: 100% !important;
  box-sizing: border-box !important;
}

/* Screen Transitions */
.screen.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Status Bar */
.status-bar {
  background-color: var(--trimm-black);
  color: var(--trimm-white);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}

 
/* Add styles for personal stats */
.personal-stats {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.stat-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  margin: 1rem 0 2rem;
}

.tracker-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tracker-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--trimm-green);
  margin-bottom: 0.5rem;
}

.tracker-label {
  color: #666;
  font-size: 0.9rem;
}

/* Style section headers */
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Specific adjustments for track-workout-screen */
#track-workout-screen h3 {
  margin-top: 0.7rem;
  margin-bottom: 0.4rem;
}

/* Update personal info section */
.personal-info-section {
  margin-top: 3rem;
  padding-bottom: 1rem;
}

/* Social Screen Styles */
#social-screen {
  padding-top: 1rem;
}

.messages-preview {
  margin-bottom: 2rem;
}

.message-scroll {
  display: flex;
  overflow-x: auto;
  padding: 1rem 0;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}

.message-bubble {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: white;
  padding: 0.8rem 1.2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-width: 200px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.record-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.record-card {
  height: 160px;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.record-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 1rem;
  color: white;
}

.record-holder {
  font-weight: bold;
  font-size: 1.1rem;
}

.record-type {
  font-size: 0.9rem;
  opacity: 0.9;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.friend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.friend-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 2px solid var(--trimm-green);
}

.friend-name {
  font-weight: 500;
}

.activity-status {
  font-size: 0.8rem;
  color: #666;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
}

/* Discover Section */
.athlete-carousel {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.athlete-card {
  min-width: 200px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.athlete-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.athlete-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 1rem;
  color: white;
}

.athlete-info {
  padding: 1rem;
}

.push-up-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 0.9rem;
}

.push-up-counter i {
  color: var(--trimm-green);
}

.push-up-count {
  font-weight: bold;
  color: #333;
}

.push-up-label {
  color: #666;
}

/* Records Section */
.records-carousel {
  margin: 1rem 0;
}

.record-panel {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.record-video {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.record-info {
  display: flex;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

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

.record-details {
  flex: 1;
}

.cheer-btn {
  background: var(--trimm-green);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trending Section */
.trending-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.trending-card {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.participants-stack {
  display: flex;
  margin-bottom: 1rem;
}

.participants-stack img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid white;
  margin-right: -10px;
}

.more-participants {
  width: 30px;
  height: 30px;
  background: var(--trimm-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.join-btn {
  background: var(--trimm-green);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 20px;
  width: 100%;
  margin-top: 0.5rem;
}

/* Add smooth transitions */
.athlete-card, .record-panel, .trending-card {
  transition: transform 0.2s;
}

.athlete-card:hover, .record-panel:hover, .trending-card:hover {
  transform: translateY(-2px);
}

.connect-btn:active, .cheer-btn:active, .join-btn:active {
  transform: scale(0.95);
}

/* Remove the old connect button styles */
.connect-btn {
  display: none;
}

/* Wiki Screen Styles */
.wiki-header {
  padding: 1rem;
  background: var(--trimm-green);
  border-radius: 0 0 24px 24px;
  margin-bottom: 1rem;
}

.search-container {
  position: relative;
  margin-bottom: 0.5rem;
}

.wiki-search {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  backdrop-filter: blur(10px);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--trimm-green);
}

.wiki-categories {
  display: flex;
  padding: 0 1rem;
  margin-bottom: 1rem;
  gap: 1.5rem;
}

.category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: #666;
  cursor: pointer;
  position: relative;
}

.category i {
  font-size: 1.2rem;
}

.category.active {
  color: var(--trimm-green);
  font-weight: 500;
}

.category.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--trimm-green);
  border-radius: 3px;
}

.filter-scroll {
  display: flex;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  gap: 10px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
}

.filter-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip i {
  font-size: 1rem;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

/* Specific icon colors */
.filter-chip i.fa-dumbbell {
  color: #ff6b4a; /* Strong red-orange for strength */
}

.filter-chip i.fa-heartbeat {
  color: #ff5c85; /* Vibrant red for cardio */
}

.filter-chip i.fa-seedling {
  color: #4caf50; /* Green for beginner */
}

.filter-chip i.fa-hand-rock {
  color: #5c6bc0; /* Blue-purple for no equipment */
}

.filter-chip.active {
  background: var(--trimm-green);
  color: white;
}

.filter-chip.active i {
  background: rgba(255, 255, 255, 0.2);
  color: white !important; /* Override specific icon colors when active */
}

.wiki-content {
  padding: 0 1rem;
}

.wiki-entry {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.wiki-entry:active {
  transform: scale(0.98);
}

.entry-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  position: relative;
}

.entry-header i {
  color: var(--trimm-green);
}

.entry-header .fa-chevron-right {
  margin-left: auto;
  font-size: 1rem;
  color: #ccc;
  position: absolute;
  right: 0.5rem;
}

.entry-header span {
  flex: 1;
  font-weight: 650;
  margin-left: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 40%;
}

.entry-tags {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  position: absolute;
  right: 2rem;
  flex-wrap: nowrap;
}

.tag {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  background: #f8f8f8;
  border-radius: 8px;
  color: #999;
  font-weight: normal;
  white-space: nowrap;
}

.icon-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  padding: 0;
  border-radius: 50%;
  background: #f0f0f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin: 0 0.1rem;
}

.icon-tag i {
  font-size: 0.8rem;
  color: #666;
}

/* Add specific icon colors for different tag types */
.icon-tag i.fa-dumbbell {
  color: #ff6b4a; /* Strong red-orange for strength */
}

.icon-tag i.fa-heartbeat {
  color: #ff5c85; /* Vibrant red for cardio */
}

.icon-tag i.fa-seedling {
  color: #4caf50; /* Green for beginner */
}

.icon-tag i.fa-hand-rock {
  color: #5c6bc0; /* Blue-purple for no equipment */
}

.entry-preview {
  color: #666;
  font-size: 0.9rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Chat support bubble */
.chat-support {
  position: fixed;
  right: max(16px, calc(50% - 224px));
  bottom: 80px;
  background: var(--trimm-green);
  width: 45px;
  height: 45px;
  border-radius: 22.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(36, 87, 26, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 100;
}

#wiki-screen.hidden .chat-support {
  display: none;
}

.chat-support:active {
  transform: scale(0.95);
}

.chat-support i {
  color: white;
  font-size: 1.1rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 16px;
  max-width: 90%;
  width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.close-button {
  position: sticky;
  top: 0;
  right: 15px;
  float: right;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  background-color: white;
  padding: 0 5px;
  margin-top: -20px;
  margin-right: -15px;
  z-index: 2;
}

.modal-content h2 {
  color: var(--trimm-green);
  margin: 0 0 20px 0;
  padding-right: 30px;
  font-size: 1.6rem;
}

.modal-content p {
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
}

.modal-content ol,
.modal-content ul {
  padding-left: 25px;
  margin-bottom: 15px;
}

.modal-content li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Screen Header Styling */
.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.screen-header h2 {
  margin: 0;
}

.settings-icon {
  color: #666;
  font-size: 1.2rem;
  padding: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.settings-icon:hover {
  color: var(--trimm-green);
}

/* Records List Styling */
.records-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.record-item {
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.record-image {
  width: 80px;
  height: 80px;
  background-size: cover;
  background-position: center;
}

.record-details {
  padding: 0.8rem;
  flex: 1;
}

.record-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.record-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.record-name {
  font-weight: 500;
  color: #333;
}

.record-title {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.record-time {
  font-size: 0.8rem;
  color: #999;
  margin: 0.2rem 0 0 0;
}

/* Map Screen Styles */
#map-container {
  flex: 1 0 auto;
  min-height: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  margin: 0 !important;
}

/* Fix for Leaflet map controls */
.leaflet-control-container {
  z-index: 2;
}

.map-controls {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.map-control-btn {
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  color: var(--trimm-green);
  cursor: pointer;
}

.map-control-btn:active {
  transform: scale(0.95);
}

/* Map Markers */
.workout-marker {
  background-color: var(--trimm-green);
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Static Map Styles */
.static-map-container {
  position: relative;
  height: calc(100vh - 200px);
  margin: 1rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.static-map {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  width: 32px;
  height: 32px;
  background-color: var(--trimm-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.map-marker.current-location {
  background-color: #4285F4;
}

/* Specific fixes for map screen */
#map-screen {
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

#map-screen .screen-header {
  flex: 0 0 auto;
  padding: 1rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Make map fill the available space properly */
.leaflet-container {
  height: 100% !important;
  width: 100% !important;
}

/* Override any other properties that might affect the map screen */
#map-screen.screen {
  position: relative !important;
  overflow-y: hidden !important;
}

#wiki-screen {
  position: relative;
}


/* Auth pages */
#login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.form-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-message {
  background-color: #ffebee;
  color: #d32f2f;
  padding: 0.8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.error-message.success {
  background-color: #e8f5e9;
  color: #388e3c;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group small {
  display: block;
  color: #757575;
  margin-top: 0.3rem;
  font-size: 0.8rem;
}

.primary-button {
  width: 100%;
  padding: 1rem;
  background: var(--trimm-green);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-button:hover {
  background: #1b4413;
}

.primary-button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.auth-link a {
  color: var(--trimm-green);
  text-decoration: none;
  font-weight: 500;
}

/* Track workout page */
.back-button {
  color: var(--trimm-green);
  text-decoration: none;
  font-size: 1.2rem;
}

.exercise-selector {
  display: flex;
  gap: 0.5rem;
}

.exercise-selector select {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.add-btn {
  padding: 0.8rem;
  background: var(--trimm-green);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.exercises-list {
  margin: 1rem 0 2rem;
}

.exercise-row {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.exercise-name {
  flex: 1;
  font-weight: 500;
}

.exercise-inputs {
  display: flex;
  gap: 0.5rem;
}

.exercise-inputs .input-group {
  width: 70px;
}

.exercise-inputs label {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.exercise-inputs input {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.remove-exercise-btn {
  background: none;
  border: none;
  color: #d32f2f;
  cursor: pointer;
  margin-left: 0.5rem;
  font-size: 1.2rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input {
  width: auto;
}

textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  min-height: 100px;
  resize: vertical;
}

/* Wiki Exercise Detail Panel */
.exercise-detail-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.detail-header {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
  background-color: var(--trimm-green);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.detail-header h3 {
  flex-grow: 1;
  margin: 0;
  text-align: center;
  font-size: 1.3rem;
}

.close-detail {
  font-size: 1.5rem;
  cursor: pointer;
}

.detail-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
}

.detail-content h4 {
  margin: 15px 0 8px 0;
  color: var(--trimm-green);
  font-size: 1.1rem;
}

.detail-content p {
  margin-bottom: 15px;
  line-height: 1.5;
}

.benefits-list, .variations-list {
  margin-left: 20px;
  margin-bottom: 15px;
}

.benefits-list li, .variations-list li {
  margin-bottom: 5px;
  line-height: 1.4;
}

.detail-metadata {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.metadata-item {
  display: flex;
  margin-bottom: 8px;
}

.metadata-label {
  font-weight: bold;
  width: 100px;
  color: #666;
}

.metadata-value {
  flex-grow: 1;
}

/* No Results Styles */
.no-results {
  padding: 20px;
  text-align: center;
  color: #666;
}

/* Error Message Styles */
.error-message {
  padding: 15px;
  margin: 10px;
  background-color: #fff3f3;
  border: 1px solid #ffcaca;
  border-radius: 5px;
  color: #d32f2f;
  text-align: center;
}

/* Nested filter styling */
.filter-chip.nested-filter {
  background-color: white;
  border: 1px solid #e0e0e0;
}

/* Make sure nested filters turn green when active */
.filter-chip.nested-filter.active {
  background: var(--trimm-green);
  color: white;
  border: none;
}

/* Food category specific icons */
.filter-chip i.fa-drumstick-bite {
  color: #d35400;
}

.filter-chip i.fa-bread-slice {
  color: #f39c12;
}

.filter-chip i.fa-oil-can {
  color: #27ae60;
}

.filter-chip i.fa-tablets {
  color: #3498db;
}

.filter-chip i.fa-book {
  color: #8e44ad;
}

/* Food filter container */
.food-filter-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #f8f8f8;
  border-radius: 15px;
  padding: 5px 10px;
}

/* Nested filters row */
.nested-filters-row {
  display: flex;
  margin-left: 10px;
  gap: 8px;
}

/* Ensure map container doesn't overlap navigation */
#map-container .leaflet-map-pane,
#map-container .leaflet-control-container {
  z-index: 400 !important; /* High but lower than our navigation bar */
}

/* For all Leaflet elements */
.leaflet-container {
  z-index: 1 !important; /* Base value lower than navigation */
}

/* Add or update these styles to ensure track-workout-screen is positioned correctly */
#track-workout-screen {
  padding: 1rem;
  overflow-y: auto;
  height: 100%;
  background-color: white;
  display: flex;
  flex-direction: column;
}

#track-workout-screen .screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

#track-workout-screen .back-button {
  cursor: pointer;
  color: var(--trimm-green);
  font-size: 1.2rem;
}

#track-workout-screen form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Reduced spacing */
}

#track-workout-screen .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

#track-workout-screen label {
  font-weight: 500;
  color: #444;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

#track-workout-screen input, 
#track-workout-screen textarea, 
#track-workout-screen select {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

#track-workout-screen .exercise-selector {
  display: flex;
  gap: 0.5rem;
}

#track-workout-screen select {
  flex: 1;
}

#track-workout-screen .add-btn {
  background-color: var(--trimm-green);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

#track-workout-screen .exercises-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

#track-workout-screen .exercise-row {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background-color: #f5f5f5;
  border-radius: 4px;
}

#track-workout-screen .exercise-name {
  flex: 1;
  font-weight: 600;
  color: #333;
}

#track-workout-screen .exercise-inputs {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  flex-wrap: nowrap;
}

#track-workout-screen .input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 70px;
}

#track-workout-screen .input-group label {
  white-space: nowrap;
  font-size: 0.9rem;
}

#track-workout-screen .input-group input {
  width: 60px;
  padding: 0.5rem;
}

#track-workout-screen .remove-exercise-btn {
  background: none;
  border: none;
  color: #d9534f;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

#track-workout-screen .checkbox-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

#track-workout-screen .primary-button {
  background-color: var(--trimm-green);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1rem;
}

#track-workout-screen .error-message {
  color: #d9534f;
  background-color: #ffebee;
  padding: 0.8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

#track-workout-screen .error-message.success {
  color: #4caf50;
  background-color: #e8f5e9;
}

/* Workout History List */
.workout-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.workout-card {
  background-color: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.workout-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.workout-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--trimm-green);
}

.exercise-list {
  list-style-type: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.exercise-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.exercise-list li:last-child {
  border-bottom: none;
}

.exercise-name {
  font-weight: 500;
}

.exercise-details {
  color: #666;
  font-size: 14px;
}

.workout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.edit-workout-btn, .delete-workout-btn {
  background: none;
  border: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.edit-workout-btn {
  color: var(--trimm-green);
}

.delete-workout-btn {
  color: #e53935;
}

.loading-indicator, .empty-state, .error-state {
  text-align: center;
  padding: 24px 16px;
  color: #666;
}

.loading-indicator i {
  margin-right: 8px;
  color: var(--trimm-green);
}

.empty-state, .error-state {
  font-style: italic;
}

.error-state {
  color: #e53935;
}

/* Edit Exercise Rows */
.edit-exercise-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  background-color: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.edit-exercise-row .exercise-name {
  font-weight: 500;
  width: 30%;
}

.edit-exercise-row .exercise-inputs {
  display: flex;
  gap: 8px;
  width: 60%;
}

.edit-exercise-row .input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.edit-exercise-row label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.edit-exercise-row input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 8px;
}

.remove-exercise-btn {
  background: none;
  border: none;
  color: #e53935;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-exercise-btn:hover {
  background-color: rgba(229, 57, 53, 0.1);
}

.success {
  background-color: #4caf50;
  color: white;
}

/* Make sure to update the secondaryScreens array in navigation.js */

/* Custom Confirmation Dialog */
.confirm-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-dialog-content {
  background-color: white;
  padding: 24px;
  border-radius: 12px;
  max-width: 80%;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.confirm-dialog h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--trimm-green);
}

.confirm-dialog p {
  margin-bottom: 24px;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.confirm-dialog .cancel-btn {
  background: none;
  border: 1px solid #ccc;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

.confirm-dialog .confirm-btn {
  background-color: var(--trimm-green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

.confirm-dialog .confirm-btn.delete {
  background-color: #e53935;
}

/* User location marker styles */
.user-location-marker {
  background: transparent !important;
}

.user-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3388ff;
  border: 2px solid white;
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
  position: relative;
}

.user-pulse {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(51, 136, 255, 0.4);
  border: 2px solid rgba(51, 136, 255, 0.6);
  left: -9px;
  top: -9px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Make sure all map controls have the same dimensions */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.location-button,
.add-workout-spot-button {
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  font-size: 16px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important; 
  justify-content: center !important;
}

.location-button i,
.add-workout-spot-button i {
  font-size: 14px;
}

/* Ensure the control container for the location button sits directly below the zoom control */
.leaflet-control-container .leaflet-top.leaflet-left {
  display: flex;
  flex-direction: column;
}

/* Remove the border between location button and zoom buttons if they're adjacent */
.leaflet-bar {
  margin-bottom: 5px !important;
}

/* User Search Styles for Social Screen */
.user-search-container {
  margin: 1rem 0 1.5rem;
  position: relative;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-input-wrapper i {
  color: #999;
  margin-right: 0.5rem;
}

#user-search {
  border: none;
  width: 100%;
  outline: none;
  font-size: 1rem;
  background: transparent;
}

.search-results-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-height: 0;
  overflow: hidden;
  z-index: 10;
  transition: max-height 0.3s ease;
}

.search-results-container.visible {
  max-height: 300px;
  overflow-y: auto;
}

.user-result-item {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

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

.user-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--trimm-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 1rem;
}

.user-result-info {
  flex: 1;
}

.user-result-username {
  font-weight: 500;
  color: #333;
}

.connect-button {
  background: var(--trimm-green);
  color: white;
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
}

.connect-button:hover {
  background: #3d8b3d;
}

/* Connection button states */
.connect-button.pending {
  background-color: #888;
  cursor: not-allowed;
}

.connect-button.connected {
  background-color: #3d8b3d;
  cursor: not-allowed;
}

.connect-button i {
  margin-right: 4px;
}

/* Pending request notification */
.pending-requests-notification {
  background-color: #f8f8f8;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notification-header {
  margin-bottom: 0.8rem;
}

.notification-header h3 {
  color: var(--trimm-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.pending-requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.request-item {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.request-actions {
  display: flex;
  gap: 0.5rem;
}

.accept-button, .decline-button {
  border: none;
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.accept-button {
  background-color: var(--trimm-green);
  color: white;
}

.decline-button {
  background-color: #f1f1f1;
  color: #666;
}

/* Notification system styles */
.notification-container {
  position: relative;
  display: inline-block;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: 3px;
  background-color: #ff4d4f;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.notification-badge.hidden {
  display: none;
}

.notification-bell {
  cursor: pointer;
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: -10px;
  width: 300px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  transition: all 0.2s ease;
}

.notification-dropdown.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
}

.notification-header {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}

.notification-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #333;
}

.notification-list {
  padding: 0;
}

.notification-item {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
}

.notification-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--trimm-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 12px;
}

.notification-content {
  flex: 1;
}

.notification-message {
  margin: 0 0 5px 0;
  font-size: 0.9rem;
}

.notification-time {
  font-size: 0.75rem;
  color: #888;
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-accept, .btn-reject {
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-accept {
  background-color: var(--trimm-green);
  color: white;
}

.btn-reject {
  background-color: #f5f5f5;
  color: #666;
}

.empty-notifications {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* Challenge Screen Styles */
#challenges-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%; 
  background-color: white;
  overflow-y: auto;
  position: relative;
  padding: 0;
  margin: 0;
}

/* Ensure the challenges container takes full width and height */
.challenges-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.challenges-tabs {
  display: flex;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 0;  /* Changed from 1rem */
  width: 100%;
}

.tab-button {
  flex: 1;
  padding: 1rem 0.8rem;  /* Added more vertical padding */
  background: none;
  border: none;
  font-weight: 500;
  color: #555;
  position: relative;
  transition: color 0.3s;
}

.tab-button.active {
  color: var(--trimm-green);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--trimm-green);
}

.tab-content {
  display: none;
  padding: 0 1rem;
  width: 100%; /* Ensure it takes full width */
  box-sizing: border-box; /* Include padding in width calculation */
}

.tab-content.active {
  display: block;
  height: 100%;
}

.challenges-list {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;  /* Add vertical padding */
  margin-bottom: 5rem;  /* Keep space for the button */
  width: 100%;
}

/* Challenge Card Styles */
.challenge-card {
  background-color: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);  /* Lighter shadow */
  margin: 1rem;  /* Add margin all around */
  margin-bottom: 0.5rem;  /* Less margin at bottom */
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.challenge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.challenge-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.challenge-card-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

.challenge-privacy-indicator {
  font-size: 0.8rem;
  color: #777;
}

.challenge-card-description {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.4;
  max-height: 3.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.challenge-progress {
  margin-bottom: 1rem;
}

.progress-bar-container {
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background-color: var(--trimm-green);
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #777;
}

.challenge-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.challenge-participants {
  display: flex;
}

.participant-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #eee;
  border: 2px solid white;
  margin-left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #555;
}

.participant-avatar:first-child {
  margin-left: 0;
}

.participant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.more-participants {
  background-color: #f0f0f0;
  color: #555;
}

.challenge-time-remaining {
  font-size: 0.8rem;
  color: #777;
}

/* Empty state styling */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: #888;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Floating action button */
.floating-action-button {
  position: absolute;  /* Changed from fixed to absolute */
  bottom: 2rem;  /* Changed from 5rem to 2rem */
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--trimm-green);  /* Changed to use trimm-green variable */
  color: white;
  border: none;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 10;
}

/* Remove these selectors as they're no longer needed with position: absolute */
#challenges-screen .floating-action-button {
  display: flex;
}

.screen:not(#challenges-screen) .floating-action-button {
  display: none;
}

/* Add specific styling for the challenges screen header */
#challenges-screen .screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: white;
  border-bottom: 1px solid #eee;
}

#challenges-screen .screen-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

#challenges-screen .back-button {
  background: none;
  border: none;
  color: #333;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Create Challenge Screen Styles */
#create-challenge-screen {
  padding: 1rem;
  overflow-y: auto;
  height: 100%;
  background-color: white;
  display: flex;
  flex-direction: column;
}

#create-challenge-screen .screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

#create-challenge-screen form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem; /* Reduced from 1.2rem to make it more compact */
}

.date-inputs {
  display: flex;
  gap: 1rem;
}

.date-inputs .input-group {
  flex: 1;
}

.measurement-types {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.target-input-container {
  margin-top: 0.5rem;
}

.privacy-toggle {
  display: flex;
  background-color: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.toggle-option {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.toggle-option i {
  font-size: 1.2rem;
  color: #666;
}

.toggle-option span {
  font-size: 0.9rem;
  color: #666;
}

.toggle-option.active {
  background-color: var(--trimm-green);
}

.toggle-option.active i,
.toggle-option.active span {
  color: white;
}

.toggle-option.active {
  background-color: var(--trimm-green);
  color: white;
}

.toggle-option.active i {
  color: white;
}

.toggle-option i {
  font-size: 0.9rem;
}

.participants-search-container {
  position: relative;
  margin-bottom: 1rem;
}

.selected-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.participant-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 0.5rem 0.8rem;
}

.participant-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #666;
}

.remove-participant {
  cursor: pointer;
  color: #999;
  margin-left: 0.3rem;
}

.remove-participant:hover {
  color: #d32f2f;
}

/* Update the form group spacing for the create challenge form */
#create-challenge-screen form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem; /* Reduced from 1.2rem to make it more compact */
}

/* Make form groups more compact */
#create-challenge-screen .form-group {
  margin-bottom: 0.3rem; /* Add a small bottom margin */
}

/* Reduce space between label and inputs */
#create-challenge-screen .form-group label {
  margin-bottom: 0.2rem;
  display: block;
  font-weight: 500;
}

/* Update the toggle option styling */
.goal-type-toggle, .privacy-toggle {
  display: flex;
  background-color: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.toggle-option {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.toggle-option i {
  font-size: 1.2rem;
  color: #666;
}

.toggle-option span {
  font-size: 0.9rem;
  color: #666;
}

.toggle-option.active {
  background-color: var(--trimm-green);
}

.toggle-option.active i,
.toggle-option.active span {
  color: white;
}

/* Add styling for the exercises list in the challenge form */
#challenge-exercises-list {
  margin-top: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
}

#challenge-exercises-list .exercise-row {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
  gap: 0.5rem;
}

#challenge-exercises-list .exercise-name {
  flex: 1;
  font-weight: 500;
}

#challenge-exercises-list .exercise-inputs {
  display: flex;
  gap: 0.5rem;
}

#challenge-exercises-list .input-group {
  display: flex;
  flex-direction: column;
  min-width: 100px;
}

#challenge-exercises-list .input-group label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
  color: #666;
}

#challenge-exercises-list .input-group input {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#challenge-exercises-list .remove-exercise-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  transition: all 0.2s;
}

#challenge-exercises-list .remove-exercise-btn:hover {
  background-color: #f0f0f0;
  color: #d32f2f;
}

.empty-exercises-message {
  padding: 1rem;
  text-align: center;
  color: #888;
  font-style: italic;
  background-color: #f9f9f9;
  border-radius: 8px;
}

/* Update the toggle-option.active styling */
.toggle-option.active {
  background-color: var(--trimm-green);
  color: white;
}

/* Add hover effect for toggle options */
.toggle-option:hover {
  background-color: rgba(36, 87, 26, 0.1);
}

/* Make sure the icons inside active toggles are white */
.toggle-option.active i {
  color: white;
}

/* Updates to challenge card styles - add after line 2429 */
.challenge-card {
  background-color: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);  /* Lighter shadow */
  margin: 1rem;  /* Add margin all around */
  margin-bottom: 0.5rem;  /* Less margin at bottom */
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.challenge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}



.loading-indicator {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

.error-state {
  padding: 20px;
  text-align: center;
  color: #d32f2f;
  font-size: 0.9rem;
}

/* Challenge Details Styles */
.challenge-details-container {
  padding: 1rem;
  margin-bottom: 5rem;
}

.challenge-details-header {
  margin-bottom: 1.5rem;
}

.challenge-details-header h3 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem 0;
  color: #333;
}

.challenge-detail-dates {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #777;
  font-size: 0.9rem;
}

.challenge-detail-description {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #555;
  line-height: 1.5;
}

.challenge-details-section {
  margin-bottom: 2rem;
}

.challenge-details-section h4 {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #444;
}

.challenge-details-section h4 i {
  margin-right: 0.5rem;
  color: var(--trimm-green);
}

.challenge-detail-exercises {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.challenge-exercise-item {
  display: flex;
  justify-content: space-between;
  background-color: white;
  padding: 0.8rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.exercise-name {
  font-weight: 500;
}

.exercise-target {
  color: #555;
  font-size: 0.9rem;
}

.challenge-detail-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.participant-item {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.participant-avatar {
  margin-right: 0.5rem;
}

.participant-username {
  font-size: 0.9rem;
}

.challenge-participants-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1rem;
}

.participant-tab-button {
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  font-weight: 500;
  color: #555;
  position: relative;
}

.participant-tab-button.active {
  color: var(--trimm-green);
}

.participant-tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--trimm-green);
}

.participant-tab-content {
  display: none;
}

.participant-tab-content.active {
  display: block;
}

.empty-participants {
  color: #888;
  font-style: italic;
  padding: 1rem 0;
}

/* Add creator badge styles */
.creator-badge {
  background-color: var(--trimm-green);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 6px;
}

/* Fix participant item display */
.participant-item {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.participant-item .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #555;
}

/* Add styles for action buttons */
.challenge-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.challenge-action-button {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.delete-challenge-btn, .leave-challenge-btn {
  background-color: #f44336;
  color: white;
}

.delete-challenge-btn:hover, .leave-challenge-btn:hover {
  background-color: #d32f2f;
}

/* Share Button Styles */
.share-workout-container {
  margin-top: 2rem;
  text-align: center;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  background-color: var(--trimm-green); /* Use the app's green color */
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  margin: 0 auto;
}

.share-button:hover {
  background-color: #3a9d3a; /* Slightly darker green for hover state */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-button i {
  font-size: 1.1rem;
}
