/* ================================================
   FEEDING PAGE STYLES
   Baby feeding tracking interface
   ================================================ */

/* Hero Section - Reuse page-hero from vaccinations.css with minor adjustments */
.page-hero {
  padding: calc(70px + var(--space-2xl)) 0 var(--space-2xl);
  background: linear-gradient(135deg, 
    rgba(78, 205, 196, 0.05) 0%, 
    rgba(149, 225, 211, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

/* Quick Actions */
.quick-actions {
  padding: var(--space-xl) 0;
  background: white;
  border-bottom: 1px solid var(--gray-200);
}

.action-buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
  color: var(--gray-700);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn.primary {
  background: var(--accent-teal);
  color: white;
  border-color: var(--accent-teal);
}

.action-btn.secondary {
  background: var(--accent-mint);
  color: var(--gray-800);
  border-color: var(--accent-mint);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.action-btn.primary:hover {
  background: #26A69A;
  border-color: #26A69A;
}

.action-btn.secondary:hover {
  background: #7BCFB3;
  border-color: #7BCFB3;
}

/* Main Content */
.main-content {
  padding: var(--space-3xl) 0;
  background: var(--gray-50);
  min-height: 60vh;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Today's Feedings Section */
.today-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  height: fit-content;
  position: sticky;
  top: calc(70px + var(--space-xl));
}

.feeding-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feeding-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  cursor: pointer;
}

.feeding-item:hover {
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.feeding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.feeding-type {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--gray-800);
}

.type-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.type-icon.bottle { background: var(--accent-teal); }
.type-icon.breast { background: var(--accent-pink); }
.type-icon.solid { background: var(--accent-orange); }

.feeding-time {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.feeding-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.feeding-detail {
  text-align: center;
}

.detail-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.detail-value {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  font-size: 1.125rem;
}

.feeding-notes {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.4;
  font-style: italic;
}

/* Patterns Section */
.patterns-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.pattern-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.pattern-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.pattern-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: var(--shadow-sm);
}

.pattern-content {
  flex: 1;
}

.pattern-title {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: var(--space-xs);
}

.pattern-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.stat-btn {
  padding: var(--space-lg);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.stat-btn:hover {
  border-color: var(--accent-teal);
  background: var(--primary-50);
}

.stat-btn.active {
  border-color: var(--accent-teal);
  background: var(--primary-50);
  color: var(--accent-teal);
}

.stat-btn-label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: var(--space-xs);
}

.stat-btn-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
}

/* Recent Section */
.recent-section {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.feeding-timeline {
  position: relative;
}

.feeding-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-teal), var(--accent-mint));
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: var(--space-xl);
}

.timeline-marker {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: var(--shadow-md);
}

.timeline-marker.bottle { background: var(--accent-teal); }
.timeline-marker.breast { background: var(--accent-pink); }
.timeline-marker.solid { background: var(--accent-orange); }

.timeline-content {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.timeline-type {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--gray-800);
}

.timeline-time {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.timeline-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: var(--space-lg);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.modal-content.large {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl);
  border-bottom: 1px solid var(--gray-200);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  display: flex;
  gap: var(--space-lg);
  justify-content: flex-end;
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--gray-200);
}

/* Feeding Type Tabs */
.feeding-type-tabs {
  display: flex;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.tab-btn {
  flex: 1;
  padding: var(--space-md);
  border: none;
  background: white;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tab-btn:first-child {
  border-right: 1px solid var(--gray-200);
}

.tab-btn:last-child {
  border-left: 1px solid var(--gray-200);
}

.tab-btn.active {
  background: var(--accent-teal);
  color: white;
}

.tab-btn:hover:not(.active) {
  background: var(--gray-50);
}

/* Form Enhancements */
.amount-input {
  display: flex;
  gap: var(--space-sm);
}

.amount-input .form-input {
  flex: 1;
}

.amount-input .form-select {
  width: 80px;
}

.duration-input {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.unit-label {
  color: var(--gray-500);
  font-weight: 500;
}

/* Quick Amount Buttons */
.quick-amounts {
  margin-top: var(--space-lg);
}

.quick-label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.quick-btn {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.quick-btn:hover {
  background: var(--primary-50);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

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

/* Chart Styles */
.chart-container {
  padding: var(--space-lg);
}

.chart-controls {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.chart-btn {
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.chart-btn.active {
  background: var(--accent-teal);
  color: white;
  border-color: var(--accent-teal);
}

.chart-btn:hover:not(.active) {
  background: var(--gray-50);
}

#feeding-chart {
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  margin-bottom: var(--space-xl);
}

.chart-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.chart-stat {
  text-align: center;
}

.chart-stat .stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: var(--space-xs);
}

.chart-stat .stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--gray-500);
}

.empty-icon {
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--gray-700);
  margin-bottom: var(--space-md);
}

.empty-state p {
  margin-bottom: var(--space-lg);
}

/* Status Indicators */
.status-good {
  color: var(--success-500);
}

.status-warning {
  color: var(--accent-orange);
}

.status-alert {
  color: var(--error-500);
}

/* Animation Classes */
.slide-in {
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .today-section {
    position: relative;
    top: auto;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .action-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .feeding-details {
    grid-template-columns: 1fr;
  }

  .feeding-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .pattern-summary {
    gap: var(--space-sm);
  }

  .pattern-card {
    flex-direction: column;
    text-align: center;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .feeding-timeline::before {
    left: 15px;
  }

  .timeline-marker {
    left: 3px;
    width: 20px;
    height: 20px;
  }

  .timeline-details {
    grid-template-columns: 1fr;
  }

  .feeding-type-tabs {
    flex-direction: column;
  }

  .tab-btn {
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid var(--gray-200);
  }

  .tab-btn:last-child {
    border-bottom: none;
  }

  .amount-input {
    flex-direction: column;
  }

  .amount-input .form-select {
    width: 100%;
  }

  .quick-buttons {
    justify-content: center;
  }

  .chart-controls {
    flex-wrap: wrap;
  }

  .chart-stats {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: var(--space-md);
  }

  .modal-footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: calc(70px + var(--space-lg)) 0 var(--space-lg);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  .stat-number {
    font-size: 2rem;
  }

  .pattern-value {
    font-size: 1.25rem;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .feeding-timeline::before {
    left: 10px;
  }

  .quick-buttons {
    gap: var(--space-xs);
  }

  .quick-btn {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
  }
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Print Styles */
@media print {
  .navbar,
  .quick-actions,
  .modal {
    display: none !important;
  }

  .main-content {
    padding: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .today-section,
  .patterns-section,
  .recent-section {
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
}