/* Mobile First Design */
html {
  font-size: 14px;
  height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  padding-bottom: 0;
  margin: 0;
}

/* Enhanced touch targets for mobile */
.btn {
  min-height: 44px;
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 8px;
  font-weight: 500;
}

.btn-lg {
  min-height: 52px;
  padding: 16px 24px;
  font-size: 18px;
}

.form-control, .form-select {
  min-height: 44px;
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Calendar Styles */
.calendar-container {
  max-width: 100%;
  margin: 0 auto;
}

.calendar-grid {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.calendar-day-header {
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #6c757d;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #dee2e6;
}

.calendar-day {
  background: white;
  padding: 16px 8px;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  position: relative;
  transition: all 0.2s ease;
}

.calendar-day:not(.empty):hover {
  background: #f8f9fa;
  transform: scale(1.05);
}

.calendar-day.empty {
  background: #f8f9fa;
}

.calendar-day.with-intake {
  background: #d1ecf1;
  border: 2px solid #bee5eb;
}

.calendar-day.complete-pain {
  background: #d4edda;
  border: 2px solid #c3e6cb;
}

.calendar-day.incomplete-pain {
  background: #f8d7da;
  border: 2px solid #f5c6cb;
}

.calendar-day.with-intake.complete-pain {
  background: linear-gradient(45deg, #d1ecf1 50%, #d4edda 50%);
  border: 2px solid #28a745;
}

.calendar-day.with-intake.incomplete-pain {
  background: linear-gradient(45deg, #d1ecf1 50%, #f8d7da 50%);
  border: 2px solid #dc3545;
}

/* Legend */
.legend-item {
  text-align: center;
  margin-bottom: 10px;
}

.legend-item .calendar-day {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  font-size: 12px;
  min-height: auto;
}

/* Food Type Badges */
.badge-food-type {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 20px;
}

.food-type-noten {
    background-color: #fd7e14;
    color: white;
}
.food-type-zaden {
    background-color: #fd7e14;
    color: white;
}
.food-type-sauzen {
    background-color: #fd7e14;
    color: white;
}
.food-type-eieren {
    background-color: gold;
    color: black;
}
.food-type-snacks {
    background-color: #e83e8c;
    color: white;

}

.food-type-brood {
    background-color: #fd7e14;
    color: white;
}
.food-type-granen { background-color: #fd7e14;color: white; }
.food-type-groente { background-color: #28a745; color: white; }
.food-type-fruit { background-color: #fd7e14; color: white; }
.food-type-zuivel { background-color: #6f42c1; color: white; }
.food-type-vlees { background-color: #dc3545; color: white; }
.food-type-vis { background-color: #20c997; color: white; }
.food-type-snoep { background-color: #e83e8c; color: white; }

/* Time Slot Styling */
.time-slot-container {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.time-slot-header {
  color: #495057;
  margin-bottom: 12px;
  font-size: 18px;
}

/* Pain Level Buttons */
.pain-level-group {
  width: 100%;
}

.pain-level-btn {
  flex: 1;
  min-width: 44px;
  font-weight: 600;
  border-radius: 6px;
}

.pain-level-btn.active {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}


.btn-xs {
    min-height: 20px;
    padding: 4px 4px;
    font-size: 10px;
    border-radius: 8px;
    font-weight: 500;
}

/* Autocomplete Dropdown */
.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f4;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

.suggestion-item:hover,
.suggestion-item.active {
  background-color: #e3f2fd;
  color: #1976d2;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* Hero Section */
.hero-section {
  padding: 40px 20px;
}

.feature-card {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  height: 100%;
  text-align: center;
}

/* Animation Effects */
.pulse-success {
  animation: pulse-success 0.6s ease-in-out;
}

@keyframes pulse-success {
  0% { background-color: #28a745; transform: scale(1); }
  50% { background-color: #34ce57; transform: scale(1.1); }
  100% { background-color: #28a745; transform: scale(1); }
}

/* Mobile Specific Styles */
@media (max-width: 767px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .calendar-day {
    min-height: 50px;
    padding: 12px 4px;
    font-size: 14px;
  }
  
  .calendar-day-header {
    padding: 8px 4px;
    font-size: 12px;
  }
  
  .btn-group .btn {
    font-size: 14px;
    padding: 8px 12px;
  }
  
  .table-responsive {
    font-size: 14px;
  }
  
  .card-header h4, .card-header h2 {
    font-size: 1.2rem;
  }
  
  .time-slot-header {
    font-size: 16px;
  }
}

/* Focus and Active States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* iOS Safari Specific */
@supports (-webkit-touch-callout: none) {
  .form-control, .form-select, .btn {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 8px;
  }
}

/* Form Styling */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Card Enhancements */
.card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  border-bottom: none;
  font-weight: 600;
}

/* Responsive Tables */
.table-responsive {
  border-radius: 8px;
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table th {
  border-top: none;
  font-weight: 600;
  color: #495057;
}