/* calendar.css */

/* Calendar container */
#custom-event-calendar {
    min-height: 600px;
/*    height: 100vh; */
    max-width: 100%;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
}
#calendar-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
}


/* FullCalendar event styles */
.fc-event {
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: clamp(10px, 1.5vw, 18px);
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

/* Day numbers in the month view */
.fc .fc-daygrid-day-number {
  font-size: clamp(10px, 1.5vw, 18px);
}

/* Event titles in day grid view */
.fc .fc-event-title {
  font-size: clamp(10px, 1.3vw, 16px);
}

/* Text in list view */
.fc .fc-list-event-title {
  font-size: clamp(10px, 1.2vw, 16px);
}

.fc .fc-event-title,
.fc .fc-event-time {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Allow event text to wrap */
.fc-daygrid-event {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.2;
  font-size: clamp(6px, 1.5vw, 16px);
}

/* Ensure container adapts on small screens */
.fc-daygrid-day-frame {
  display: flex;
  flex-direction: column;
}

/* Make sure events don't overflow their container */
.fc-daygrid-day-events {
  overflow: visible !important;
}

/* Optional: Set max height and scroll on small devices */
@media (max-width: 600px) {
  .fc-daygrid-day {
    min-height: 100px;
  }
/*
  .fc-daygrid-event {
    font-size: 0.75rem;
  }
  */
}




.fc-v-event .fc-event-main {
    color: #FF001F;
    height: 100%;
}

a.fc-event:hover {
    background: transparent;
}
a.fc-event .fc-event-custom:hover {
    text-decoration: underline;
}
a.fc-event .fc-event-custom.fc-private-event:hover {
    text-decoration: none;
    cursor: default;
}

.fc-scrollgrid-sync-inner a.fc-col-header-cell-cushion, .fc-scrollgrid-sync-inner a.fc-col-header-cell-cushion:hover {
    color: #4a4a4a;
}

.fc-daygrid-day-top a.fc-daygrid-day-number, .fc-daygrid-day-top a.fc-daygrid-day-number:hover {
    color: #4a4a4a;
}

/* Modal popup content */


.event-modal-content {
    padding: 20px;
    background-color: #fff;
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
    color: #333;
}

.event-modal-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1e40af;
}

.event-modal-content p {
    margin: 8px 0;
    font-size: 14px;
}

.event-modal-content ul {
    list-style-type: disc;
    padding-left: 20px;
}

.event-modal-content .event-html-details {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

/* Facilities list styling */
.event-modal-content strong {
    color: #111827;
}

#calendar-view-select {
    margin: 0 0 10px;
    padding: 5px 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

#calendar-nav-buttons {
    display: flex;
    gap: 5px;
}

#calendar-view-select {
    padding: 6px 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}


#calendar-nav-buttons button:hover {
    color: #FF0020;
}

.calendar-nav-btn {
    background: #fff;
    border: 1px solid #ccc;
    padding: 0.5em 1em;
    cursor: pointer;
    font-size: 1em;
    border-radius: 4px;
}
#calendar-nav-buttons button {
    padding: 3px 5px;
    font-size: 0.95rem;
    background-color: transparent;
    color: #2c2c2c;
    border: none;
    border-radius: 0;
    margin-right: 6px;
    cursor: pointer;
}
.fc-event-facilities {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}
.fc th {
    text-align: right;
}

.fc-event-custom.fc-private-event {
    color: #4A4A4A;
}
@media (max-width: 480px) {
  #calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #calendar-nav-buttons,
  #calendar-view-selector,
  #calendar-month-label {
    margin-bottom: 0.5rem;
    text-align: center;
    justify-content: center;
  }
}

#calendar-month-label {
  transition: opacity 0.3s ease;
  opacity: 1;
}

#calendar-month-label.fade-out {
  opacity: 0;
}
span.event-list-title {
    font-weight: 500;
    font-size: 1.0rem;
    line-height: 1.5rem;
}
span.event-list-date {
    font-size: .9rem;
    color: #4A4A4A;
}

.event-title {
    color: #ff001f;
}
.fc-private-event .event-title {
    color: #4A4A4A;
}
td.fc-list-event-time {
    display: none;
}
.event-facilities {
    color: #a4a4a4;
}
#calendar-nav-buttons button:hover {
    /* color: #4A4A4A; */
}

tr.fc-event.fc-event-start.fc-event-end.fc-event-today.fc-event-future.fc-list-event {
    background-color: var(--fc-today-bg-color);
}

.b

/* Mobile-only styles */
@media (max-width: 767px) {
  #custom-event-calendar {
/*    height: 100dvh; */ /* dynamic viewport height for modern mobile browsers */
  }
}

@media (max-width: 768px) {
    .fc .fc-col-header-cell-cushion {
        font-size: 14px;         /* Optional: adjust size for small screens */
        text-align: right;       /* Right-align the text */
        display: block;
    }

    /* Show only the first letter of the day */
    .fc .fc-col-header-cell-cushion::after {
        content: attr(data-full); /* fallback */
    }

    .fc .fc-col-header-cell-cushion {
        visibility: hidden;  /* Hide full name */
        position: relative;
    }

    .fc .fc-col-header-cell-cushion::before {
        content: attr(data-full); /* Use the full name, but then truncate */
        position: absolute;
        right: 0;
        visibility: visible;
        font-weight: bold;
    }

    /* Truncate to first letter */
    .fc .fc-col-header-cell-cushion::before {
        content: attr(data-full);
    }

}
