#calendar {
  margin-top: 30px;
}

.container-calendar {
  width: 80%;
  max-width: 1100px;
  height: auto;
  margin: auto;
}

.upcoming-container {
  display: flex;
  flex-direction: column;
  width: 100%;

  justify-content: center;
  align-items: center;

  margin: 20px 0;
}

.container-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;

  width: 100%;
  padding: 5px 20px;
  margin: 20px 0; 
  gap: 8px;
}

.upcoming-header {
  width: 100%;
}

.overflow-cont {
  overflow: hidden;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  width: 100%;
  gap:10px;
  max-height: 500px;
  overflow-y: auto;
}

.upcoming-list h3 {
  margin: 0;
}


.fc-toolbar {
  gap: 10px;
}

/* .fc-header-toolbar .fc-toolbar-chunk:nth-of-type(3) {

} */

.fc-toolbar-chunk:nth-of-type(3) {
  display: flex;
  justify-content: flex-end;
  text-align: center;
  flex-wrap: wrap;

  gap: 10px;
}

.fc-toolbar-chunk:nth-of-type(1) {
  display: flex;
  justify-content: flex-start;
  text-align: center;
  flex-wrap: wrap;
}

.fc-toolbar-chunk:nth-of-type(1) .fc-toolbar-title {
  text-align: left;
  margin: 0 20px;
  min-width: 225px;
  text-align: center;
}

.fc-toolbar-chunk:nth-of-type(1) .fc-next-button {
  margin-left: 5px;
}

@media (max-width: 1040px) {
  /* .fc-prev-button {
    order: 5;
  }

  .fc-next-button {
    order: 7;
  }

  .fc-toolbar-title {
    flex: 1 1 100%;
    margin-left: 0 !important; 
  } */

  .fc-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .fc-toolbar-chunk {
    display: flex;
    justify-content: center !important;
  }

  .fc-prev-button {
    order: 5;
  }

  .fc-next-button {
    order: 7;
  }

  .fc-toolbar-title {
    flex: 1 1 100%;
    /* margin-left: 0 !important;  */
  }

  .fc-today-button {
    order: -5;
  }

  .fc-addEventBtn-button {
    order: -2;
  }
}

.calendar-form {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 15px;

  padding: 25px;
  width: fit-content;
}


/*The CSS classes to overwrite the Calendar CSS*/

.fc-header-toolbar {
  font-family: "Inter", sans-serif !important;
}

.fc-header-toolbar .fc-button {
  border-radius: 8px;
  padding: 5px 14px;
  border: 1px solid rgba(27, 31, 35, 0.15);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  box-shadow: rgba(27, 31, 35, 0.06) 0 1px 0;
  background: lch(53.4% 68.13 142.76);
  color: white;
  cursor: pointer;
}

.fc-header-toolbar .fc-prev-button,
.fc-header-toolbar .fc-next-button {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
  box-shadow: none;
}

.fc-header-toolbar .fc-prev-button:hover,
.fc-header-toolbar .fc-next-button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.fc-header-toolbar .fc-prev-button .fc-icon,
.fc-header-toolbar .fc-next-button .fc-icon {
  color: #374151;
}

.fc-view {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.fc-view .fc-daygrid-day-number {
  font-weight: 700;
  font-size: 14px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-view td.fc-day-today.fc-daygrid-day {
  background-color: #e1f3e3;
}

.fc-view .fc-day-today .fc-daygrid-day-number {
  background-color: #4A9D5F;
  color: white;
  font-weight: bold;
  width: 28px;
  height: 28px;
  margin: 4px 0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fc-view td.fc-day > div {
  min-height: 70px;
  padding: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.fc-view td.fc-day:hover {
  background-color: lightgray;
}

.fc-theme-standard table {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.fc-theme-standard .fc-scrollgrid {
  border: none;
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: white;
}

.fc .fc-scrollgrid {
  border-radius: 0.5rem;;
}

.fc-col-header-cell {
  background-color: #f9fafb;
  padding: 12px 8px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb !important;
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: #e5e7eb;
}

.fc-daygrid-event-dot {
  display: none;
}

div.fc-event-time {
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  /*font-size: 0.75em;*/ /* Make time smaller on mobile */
}

/* .fc-daygrid-event-harness {
  overflow: hidden !important;
} */

/*THIS FIXES THE OVERFLOW OF TIME ON SMALLER SCREENS*/
.fc-daygrid-event {
  overflow: hidden !important;
  white-space: nowrap;
}

a.fc-event {
  padding: 0;
  background-color: #e8f5ec !important;
  border: none !important;
  border-left: 3px solid #4A9D5F !important;
  border-radius: 3px !important;
  box-shadow: none !important;
}

a.fc-event .fc-event-main {
  color: #1a3d25 !important;
}

a.fc-event .fc-event-time {
  color: #2d6a40 !important;
  font-weight: 600;
}

a.fc-event .fc-event-title {
  color: #1a3d25 !important;
  font-weight: 500;
}

td.fc-day.fc-day-sat,
td.fc-day.fc-day-sun {
  background-color: #f9f9f9;
}

.event-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px;
  border-radius: 5px;
  font-size: 12px;
  z-index: 10000;
  max-width: 250px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.fc-icon-chevron-right,
.fc-icon-chevron-left {
  color: #374151;
}

#event-start-date, #event-end-date {
  font-weight: 600;
}

.fc-event-initials {
  display: flex;
  gap: 2px;
  width: 100px;
  margin-right: -5px;
  align-items: center;
  justify-content: center;
}

.event-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.5);

  margin: 0;
}

.event-initial-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5) !important;
  color: white !important;
  font-size: 9px;
  font-weight: bold;
}

.fc-list-event .event-initial {
  background: #4A9D5F !important;
  color: white !important;
  border: 1px solid rgba(74, 157, 95, 0.3);
}

.fc-event-main-frame {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 2px 4px !important;
  overflow: hidden !important;
}

.fc-event-main-frame .fc-event-time {
  font-size: 11px !important;
  font-weight: 600 !important;
  flex-shrink: 0;
}

.fc-dayGridMonth-view .fc-event-initials {
  display: none !important;
}

.fc-timeGridWeek-view .fc-event-initials {
  display: flex !important;
}

/* Make events smaller on mobile */
@media (max-width: 768px) {

  .container-calendar {
    width: 100%;
    height: auto;
    margin: auto;
  }

  .fc-event {
    font-size: 0.7em;
    padding: 1px 2px;
  }
  
  .fc-event-time {
    font-size: 1em;
  }
  
  a.fc-event {
    padding: 0 2px;
  }
}

/* For very small screens */
@media (max-width: 540px) {
  .fc-event {
    font-size: 0.6em;
  }
  
  td.fc-day > div {
    min-height: 60px;
  }

  .fc-event-main-frame {
    flex-direction: row !important;
    padding: 0 !important;
  }

  .fc-event-main-frame .fc-event-time {
    font-size: 10px !important;
    font-weight: 400 !important;
    color: white !important;
  }

  .fc-event-initials,
  .fc-event-time {
    display: none !important;
  }

}



