/* style.css – Kalender Styles mit Druckunterstützung und Dark Mode */

/* Basis Tabellen-Layout */
table {
  border-collapse: collapse;
  width: 100%;
}
th, td {
  border: 1px solid #ccc;
  padding: 6px;
  text-align: center;
  font-size: 0.875rem;
}
th {
  background-color: #f3f4f6;
}

/* Aktuelles Datum */
td.today {
  text-decoration: underline;
  background-color: #fefcbf;
}

/* Belegte Tage */
td.highlight {
  background-color: #ef4444;
  color: white;
}

/* Start-/Endmarkierung */
td.start-date {
  background: linear-gradient(to left, #ef4444 50%, white 50%);
  color: black;
}
td.end-date {
  background: linear-gradient(to right, #ef4444 50%, white 50%);
  color: black;
}
td.start-end-date {
  background-color: #ef4444;
  color: white;
}

/* Hovereffekte */
td {
  transition: all 0.2s ease-in-out;
}
td:hover {
  transform: scale(1.05);
  background-color: #cbd5e1;
  cursor: pointer;
}

/* Dark Mode */
.dark th {
  background-color: #374151;
  color: white;
}
.dark td.highlight,
.dark td.start-end-date {
  background-color: #b91c1c;
}
.dark td.start-date {
  background: linear-gradient(to left, #b91c1c 50%, #1f2937 50%);
  color: white;
}
.dark td.end-date {
  background: linear-gradient(to right, #b91c1c 50%, #1f2937 50%);
  color: white;
}

/* Monatscontainer */
.calendar-container {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out;
    margin: 0 auto;
}
.calendar-container:hover {
  transform: scale(1.01);
}
.dark .calendar-container {
  background-color: #1f2937;
  color: white;
}

@media (max-width: 640px) {
  th, td {
    padding: 2px !important;
    font-size: 0.65rem !important;
  }

  table {
    table-layout: fixed;
    width: 100%;
  }

  .calendar-container {
    padding: 0.5rem !important;
  }
}


/* Druckunterstützung */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  header, #darkToggle, button[onclick*="print"] {
    display: none !important;
  }
  td.highlight {
    background-color: #ef4444 !important;
    color: white !important;
  }
  td.start-date {
    background: linear-gradient(to left, #ef4444 50%, white 50%) !important;
    color: black !important;
  }
  td.end-date {
    background: linear-gradient(to right, #ef4444 50%, white 50%) !important;
    color: black !important;
  }
  td.start-end-date {
    background-color: #ef4444 !important;
    color: white !important;
  }
  td {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
  .calendar-container {
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
