

body {
  font-family: sans-serif;
  background: #f4f4f4;
  padding: 2rem;
  color: #333;
}

main {
  max-width: 1650px;
  margin: auto;
  background: #fff;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}


    #calendar {
      max-width: 1700px;
      margin: auto;
    }


h1, h2 {
  margin-bottom: 1rem;
}

form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input, select, button {
  padding: 0.5rem;
  font-size: 1rem;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

button.delete-btn {
  background: red;
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

form input,
form select {
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.3rem;
  box-sizing: border-box;
}

form button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #222;
  color: #fff;
  border: none;
  cursor: pointer;
}

.modal {
  position: fixed;
  display: none;
  align-items: center;
  justify-content: center;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}


.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
}

.modal-buttons button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #444;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.modal-buttons button:hover {
  background-color: #222;
}

/* Give calendar events a bit more vertical breathing room */
.fc-timegrid-event {
  min-height: 40px; /* Was too short for 30min slots */
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: normal;
  padding: 2px;
}

.fc-event-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fc-event-title,
.fc-event-time {
  font-size: 0.75rem;
  font-weight: bold;
  white-space: normal !important;
  line-height: 1.1;
  margin-bottom: 2px;
}

.grid {
  display: flex;
  gap: 2rem;
}

.left {
  flex: 1;
  min-width: 280px;
}

.right {
  flex: 2;
  min-width: 600px;
}

#calendar {
  background: #fff;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 8px;
}

input, select, button {
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

h1, h2 {
  font-weight: 600;
  color: #222;
}

/* Force event contents to wrap and stack neatly */
.fc-event-main-frame {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  white-space: normal !important;
  height: 100%;
  padding: 2px 4px;
  overflow: hidden;
}

.fc-event-time,
.fc-event-title {
  white-space: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  font-size: 0.75rem;
  padding: 1px 2px;
}

/* Ensure proper layout and wrapping */
.fc-event-main-frame {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  white-space: normal !important;
  overflow-wrap: break-word;
  height: 100%;
  padding: 2px 4px;
  overflow: hidden;
}

.fc-event-time {
  font-size: 0.75rem;
  font-weight: bold;
  line-height: 1.1;
  margin-bottom: 2px;
}

.fc-event-title {
  font-size: 0.7rem;
  white-space: normal !important;
  line-height: 1.1;
}

/* Make 30min cells taller */
.fc-timegrid-slot {
  min-height: 40px;
}

.fc-timegrid-event {
  min-height: 36px !important;
  white-space: normal !important;
  line-height: 1.2;
  font-size: 0.8rem;
  padding: 2px;
}
.fc-event-title {
  white-space: normal !important;
  overflow-wrap: break-word;
}

.fc-timegrid-event {
  min-height: 36px !important;
  white-space: normal !important;
  line-height: 1.2;
  font-size: 0.75rem;
  padding: 2px 4px;
}

.fc-event-title {
  white-space: normal !important;
  overflow-wrap: break-word;
}

/* Make event text wrap and increase height */
.fc-timegrid-event {
  white-space: normal !important;
  min-height: 40px !important;
  font-size: 12px !important;
  padding: 2px 4px;
  display: block !important;
}

/* Wrap event title text */
.fc-event-title {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  font-weight: bold;
  font-size: 11px !important;
  display: block;
}

/* Optional: Make sure the time display doesn't overlap */
.fc-event-time {
  font-size: 11px !important;
  margin-bottom: 2px;
  display: block;
}

.fc-event-title {
  white-space: normal;
  font-size: 0.85rem;
  line-height: 1.1;
}

.fc-timegrid-slot {
  height: 3em !important;
}