/* Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    transition: background-color 0.3s, color 0.3s;
  }
  
  /* Calendar */
  .calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .month {
    border: 1px solid;
    padding: 10px;
    text-align: center;
    transition: background-color 0.3s, border-color 0.3s;
  }
  
  .month h3 {
    margin: 0;
  }
  
  /* Days Header */
  .days-header {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 5px;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
  }
  
  .days-header div {
    padding: 5px;
    border: 1px solid;
    transition: background-color 0.3s, border-color 0.3s;
  }
  
  .days-header .kw-header {
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Days */
  .days {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 5px;
    margin-top: 5px;
  }
  
  .week-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: bold;
    padding: 5px;
    text-align: center;
    user-select: none;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .day {
    border: 1px solid;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s, border-color 0.3s;
  }
  
  .day.selected {
    background-color: #66bb6a;
  }
  
  /* Ensure selected days are visible in both themes */
  body.dark .day.selected,
  body.light .day.selected {
    background-color: #66bb6a !important;
  }
  
  .day.selected:hover {
    background-color: #66bb6a;
  }
  
  .day:hover {
    background-color: #e0e0e0;
  }
  
  /* Weekend styling */
  .day.weekend {
    /* Additional weekend styling will be applied in the theme sections */
  }
  
  /* ICS (Schulferien) and Public Holiday styling */
  .day.event-day {
    border: 2px solid red !important;
  }
  .day.public-holiday {
    border: 2px solid yellow !important;
  }
  .day.public-holiday.event-day {
    border: 2px solid red !important;
    outline: 2px solid yellow !important;
  }
  
  /* Controls */
  .controls {
    margin-bottom: 20px;
  }
  .controls label,
  .controls button {
    margin-left: 5px;
  }
  .ics-input {
    width: 100%;
    height: 100px;
    margin-top: 10px;
  }
  
  /* Lists */
  .events-list,
  .public-holidays-list,
  .selected-holidays-list {
    margin-top: 20px;
  }
  .events-list ul,
  .public-holidays-list ul,
  .selected-holidays-list ul {
    list-style-type: none;
    padding: 0;
  }
  .events-list li,
  .public-holidays-list li,
  .selected-holidays-list li {
    margin-bottom: 10px;
  }
  #selected-display {
    font-size: 1.1em;
    margin-bottom: 20px;
  }
  
  /* Toggle buttons */
  #themeToggle {
    position: fixed;
    top: 10px;
    right: 120px; /* leave space for the configurator button */
    padding: 5px 10px;
    cursor: pointer;
    z-index: 1000;
  }
  #themeConfigButton {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 1000;
  }
  
  /* Theme Configurator Overlay */
  #themeConfigurator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
  }
  #themeConfigurator .dialog {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    min-width: 300px;
  }
  body.dark #themeConfigurator .dialog {
    background-color: #333;
    color: #e0e0e0;
  }
  
  /* Dark Theme (default) */
  body.dark {
    background-color: #121212;
    color: #e0e0e0;
  }
  body.dark .month {
    background-color: #1e1e1e;
    border-color: #444;
  }
  body.dark .days-header div {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
  }
  body.dark .day {
    background-color: #2a2a2a;
    border-color: #555;
    color: #e0e0e0;
  }
  body.dark .day:hover {
    background-color: #3a3a3a;
  }
  body.dark .day.weekend {
    background-color: #353535;
  }
  body.dark .week-number {
    color: #888;
  }
  
  /* Light Theme */
  body.light {
    background-color: #ffffff;
    color: #000000;
  }
  body.light .month {
    background-color: #f9f9f9;
    border-color: #ccc;
  }
  body.light .days-header div {
    background-color: #eee;
    border-color: #ccc;
    color: #000;
  }
  body.light .day {
    background-color: #fff;
    border-color: #ccc;
    color: #000;
  }
  body.light .day:hover {
    background-color: #f0f0f0;
  }
  body.light .day.weekend {
    background-color: #f5f5f5;
  }
  body.light .week-number {
    color: #666;
  }
  