/* Design wie die alte Essensplan-Seite */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: white;
  color: black;
  line-height: 1.4;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2rem;
  color: black;
  font-weight: normal;
}

.week-navigation {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.week-button {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 12px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border-radius: 4px;
  color: black;
}

.week-button:hover {
  background-color: #e0e0e0;
}

.week-button:active {
  background-color: #d0d0d0;
}

.meal-plan {
  border: 1px solid #ccc;
}

.day-row {
  display: flex;
  border-bottom: 1px solid #ccc;
}

.day-row:last-child {
  border-bottom: none;
}

.day-column {
  width: 200px;
  padding: 15px;
  background-color: #f9f9f9;
  border-right: 1px solid #ccc;
  display: flex;
  align-items: center;
}

.day-header {
  font-weight: bold;
  font-size: 1rem;
}

.date {
  font-weight: normal;
  color: #666;
}

.meal-column {
  flex: 1;
  padding: 15px;
  display: flex;
  align-items: flex-start;
}

.meal-input {
  width: 100%;
  border: 2px dashed #999;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: Arial, sans-serif;
  line-height: 1.35;
  background-color: white;
  outline: none;
  transition: border-color 0.2s;
  height: calc(2 * 1.35em + 16px);
  min-height: calc(2 * 1.35em + 16px);
  max-height: calc(2 * 1.35em + 16px);
  overflow-y: auto;
  resize: none;
}

.meal-input:focus {
  border-color: #333;
  border-style: solid;
}

.meal-input::placeholder {
  color: #999;
  font-style: italic;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-width: 500px;
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-header h2 {
  font-size: 1rem;
  font-weight: bold;
  color: black;
}

.modal-close {
  padding: 8px 14px;
  min-width: 40px;
}

#noteInput {
  width: 100%;
  border: 2px dashed #999;
  padding: 12px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  background-color: white;
  outline: none;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.2s;
}

#noteInput:focus {
  border-color: #333;
  border-style: solid;
}

#noteInput::placeholder {
  color: #999;
  font-style: italic;
}

.modal-hint {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #666;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .day-row {
    flex-direction: column;
  }

  .day-column {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ccc;
  }

  .meal-column {
    padding: 10px 15px;
  }
}

@media print {
  .week-navigation,
  .modal-overlay {
    display: none !important;
  }

  .day-row {
    break-inside: avoid;
  }

  .meal-input {
    border: 1px solid #000;
    background-color: white;
  }
}
