.container {
  padding: 0.5rem;
}

.flat-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: none;
  background: #f9fafb;
}

.flat-card:hover {
  transform: none;
  box-shadow: none;
}

.cal-day-cell:hover:not(.cal-empty) {
  filter: brightness(0.92);
}

/* Custom Calendar Grid */
#calendarGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-header-cell {
  text-align: center;
  font-weight: 600;
  padding: 6px 2px;
  font-size: .8rem;
  color: #6c757d;
}

.cal-day-cell {
  min-height: 52px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: filter 0.1s;
}


.cal-day-cell.cal-delivery {
  background: #d1e7dd;
  border-color: #a3cfbb;
}

.cal-day-cell.cal-closed {
  background: #f8d7da;
  border-color: #f1aeb5;
}

.cal-day-cell.cal-event {
  background: #fde8d0;
  border-color: #fd7e14;
}

.cal-day-cell.cal-past {
  opacity: 0.55;
}

.cal-day-cell.cal-today {
  box-shadow: inset 0 0 0 2px #0d6efd;
}

.cal-day-cell.cal-empty {
  background: transparent;
  border: none;
  cursor: default;
}

.cal-day-number {
  font-size: .9rem;
  font-weight: 500;
}

.cal-day-label {
  font-size: .65rem;
  margin-top: 2px;
  font-weight: 600;
}

.cal-day-cell.cal-delivery .cal-day-label { color: #0f5132; }
.cal-day-cell.cal-closed .cal-day-label { color: #842029; }
.cal-day-cell.cal-event .cal-day-label { color: #7c3100; }

/* Flatpickr day highlights */
.flatpickr-day.fp-has-delivery {
  background: rgba(25, 135, 84, 0.10);
  border-bottom: 2px solid #198754 !important;
}

.flatpickr-day.fp-has-order {
  background: rgba(13, 110, 253, 0.10);
  border-bottom: 2px solid #0d6efd !important;
}

.flatpickr-day.fp-has-event {
  background: rgba(253, 126, 20, 0.10);
  border-bottom: 2px solid #fd7e14 !important;
}

/* Flatpickr inline legend */
.fp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 6px 10px 8px;
  border-top: 1px solid #e9ecef;
  font-size: 0.72rem;
  color: #555;
}

.fp-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fp-legend-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

.fp-legend-swatch.delivery { background: rgba(25,135,84,.12); border-bottom: 2px solid #198754; }
.fp-legend-swatch.order    { background: rgba(13,110,253,.12); border-bottom: 2px solid #0d6efd; }
.fp-legend-swatch.event    { background: rgba(253,126,20,.12); border-bottom: 2px solid #fd7e14; }

/* Flatpickr today highlight */
.flatpickr-day.today {
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-weight: bold;
}

/* Location checkboxes in modal */
#locationCheckboxes .form-check-label {
  color: var(--primary);
}

#locationCheckboxes .form-check-input {
  border-color: var(--border);
}

#locationCheckboxes .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--border);
}

#locationCheckboxes .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
  outline: none;
}

#freezingTime {
  background-color: transparent;
}

#freezingTime:focus {
  border-color: var(--border);
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
  outline: none;
}
