/* Insights Tab CSS - Insight cards, stats, patterns, locked features */

.insights-content {
  padding: 20px;
  min-height: 100%;
  position: relative;
}

.insight-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(233, 236, 239, 0.5);
  position: relative;
  overflow: hidden;
}

.insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9a9e, #fecfef, #4caf50);
  border-radius: 20px 20px 0 0;
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.insight-icon {
  font-size: 1.8em;
}

.insight-title {
  font-weight: 700;
  color: #5d4037;
  font-size: 1.1em;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 1.8em;
  font-weight: bold;
  color: #ff6b6b;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
}

.pattern-insight {
  background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
  padding: 18px;
  border-radius: 15px;
  margin: 20px 0;
  border-left: 5px solid #4caf50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.loading {
  text-align: center;
  padding: 50px;
  color: #666;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ff9a9e;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #999;
}

.empty-icon {
  font-size: 4em;
  margin-bottom: 20px;
  opacity: 0.5;
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Locked Features Showcase */
.locked-features {
  background: linear-gradient(135deg, #f8f9fa, #f0f0f0);
  border: 2px solid rgba(128, 128, 128, 0.3);
}

.locked-features .insight-header {
  background: linear-gradient(135deg, #666, #888);
  color: white;
}

.locked-features .insight-title {
  color: white;
}

.locked-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.locked-feature {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(128, 128, 128, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0.7;
}

.locked-feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(128, 128, 128, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.locked-feature:hover::before {
  left: 100%;
}

.locked-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(128, 128, 128, 0.15);
  opacity: 0.8;
}

.feature-icon {
  font-size: 2.5em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #666, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-title {
  font-weight: 700;
  color: #5d4037;
  margin-bottom: 8px;
  font-size: 0.95em;
}

.feature-desc {
  font-size: 0.8em;
  color: #666;
  line-height: 1.4;
  margin-bottom: 12px;
}

.locked-badge {
  background: linear-gradient(135deg, #666, #888);
  color: white;
  font-size: 0.7em;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Locked feature notification */
.locked-feature-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #666, #888);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.locked-feature-notification.show {
  transform: translateX(-50%) translateY(0);
}

.locked-feature-notification div {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.95em;
  line-height: 1.4;
}

/* Responsive adjustments for locked features */
@media (max-width: 480px) {
  .locked-features-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .locked-feature {
    padding: 15px;
  }

  .feature-icon {
    font-size: 2em;
    margin-bottom: 10px;
  }

  .feature-title {
    font-size: 0.9em;
  }

  .feature-desc {
    font-size: 0.75em;
  }

  .locked-badge {
    font-size: 0.65em;
    padding: 3px 6px;
  }
}

/* Meal Plan Styling */
.meal-plan-container {
  margin-top: 20px;
}

.meal-plan-header {
  text-align: center;
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
  border-radius: 15px;
}

.meal-plan-header h3 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 1.3em;
}

.day-meal-plan {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(233, 236, 239, 0.3);
  transition: all 0.3s ease;
}

.day-meal-plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.day-name {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.1em;
}

.day-focus {
  font-size: 0.85em;
  color: #666;
  background: rgba(76, 175, 80, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-style: italic;
}

.meals-container {
  display: grid;
  gap: 12px;
}

.meal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.meal-item:hover {
  background: #e9ecef;
}

.meal-time {
  font-weight: 600;
  color: #495057;
  min-width: 80px;
  font-size: 0.9em;
}

.meal-content {
  color: #2c3e50;
  line-height: 1.4;
  flex: 1;
}

.meal-plan-tips {
  background: linear-gradient(135deg, #fff3e0, #fff8e1);
  padding: 20px;
  border-radius: 15px;
  margin: 25px 0;
  border-left: 5px solid #ff9800;
}

.meal-plan-tips h4 {
  margin: 0 0 15px 0;
  color: #e65100;
  font-size: 1.1em;
}

.meal-plan-tips ul {
  margin: 0;
  padding-left: 20px;
}

.meal-plan-tips li {
  margin-bottom: 8px;
  color: #5d4037;
  line-height: 1.5;
}

.meal-plan-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.meal-plan-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 120px;
}

.meal-plan-actions button:nth-child(1) {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #5d4037;
}

.meal-plan-actions button:nth-child(2) {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #5d4037;
}

.meal-plan-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.meal-plan-actions button:active {
  transform: translateY(0);
}

/* Responsive design for meal plan */
@media (max-width: 768px) {
  .day-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .meal-item {
    flex-direction: column;
    gap: 8px;
  }

  .meal-time {
    min-width: auto;
  }

  .meal-plan-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-secondary {
    width: 100%;
    max-width: 200px;
  }
}
