#tc_calendar {
    width: 100%;
}

#tc_calendar button.fc-timeGridWeek-button.fc-button.fc-button-primary, 
#tc_calendar button.fc-timeGridDay-button.fc-button.fc-button-primary,
#tc_calendar button.fc-today-button {
	display: none;
}
#tc_calendar table {
    margin-bottom: 0;
    margin-top: 0;
}

#tc_calendar .fc-widget-header,
#tc_calendar .fc-widget-content {
    padding: 0;
}

#tc_calendar a {
    text-decoration: none;
}

#tc_calendar .fc-center h2 {
    margin-top: 3em;
}
#tc_calendar .fc-day-past {
    opacity: 0.7;
}
#tc_calendar a.fc-day-grid-event,
#tc_calendar a.fc-time-grid-event,
#tc_calendar td .fc_show_event{
    color: #fff;
    padding: 7px;
}

.fc-daygrid-event-dot {
    display: none;
}

.fc-event-time,
.fc-event-title {
    display: inline-block;
}

#tc_calendar a {
    flex-flow: wrap;
}

#tc_calendar td {
    position: relative;
}

#tc_calendar .fc_show_event {
    font-size: 0.95em;
    color: #fff;
}

.fc-day-header {
    font-size: 0.95em;
}

.fc-basic-view .fc-body .fc-row {
    min-height: 0;
}

.tc-responsive-event {
    display: none;
}
.fc-theme-standard .fc-list-day-cushion {
    background-color: #538a93;
    color: #fff;
}
/* Better event display with thumbnails */
.fc-event {
    display: flex !important;
    align-items: center;
    border: none;
    flex-wrap: wrap;
}

.tc-event-thumbnail {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}
td.fc-list-event-graphic {
    display: none;
}
td.fc-list-event-time {
    flex: 1 1 100%;
    color: #000;
    font-weight: 600;
}
td.fc-list-event-title {
    flex: 1 1 100%;
}
td.fc-list-event-title a {font-weight: 600;}

/* Remove fixed heights and scrollbars */
.fc .fc-scroller {
    overflow: visible !important;
}

.fc-daygrid-body {
    width: 100% !important;
}

.fc-day-grid-container {
    height: auto !important;
}

.fc-scroller {
   overflow: visible;
}

.fc-scroller > * {
    overflow: visible;
}

.fc-view-container {
    overflow: visible !important;
}

/* event calender hover image*/
.fc-event-container{
  position: relative;
  z-index: 0;
}
.fc_event_image_show{
  display: none;
}
.fc_show_event{
  position: absolute;
  top: -80px;
  background-color:#eae9d4;
  -webkit-box-shadow: 0 0 6px rgba(132, 132, 132, .75);
  -moz-box-shadow: 0 0 6px rgba(132, 132, 132, .75);
  box-shadow: 0 0 6px rgba(132, 132, 132, .75);
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  background-size: cover !important;
  z-index: 9999;
  padding: 10px !important;
}

.fc_show_event div {
    line-height: 1.2em;
}

.fc_show_event a{
    background: none;
    border: none;
    background-color: rgba(46, 43, 43, 0.6);
    margin:0px;
    min-width: 140px;
    min-height: 100px;
    text-align: center;
    display: flex;
    align-items: center;
}
.fc_show_event a .fc-content{
   margin: 0 auto;
}

.fc-row tr:not(:first-child) td:first-child .fc_show_event{
	left: 0;
	right: inherit !important;
}
.fc-row td:nth-child(7) .fc_show_event,.fc-row tr:not(:first-child) td .fc_show_event{
	right: 0;
}

/* List view styles for mobile */
.fc-list-table .fc-list-event:nth-child(odd) {
    background-color: #fff;
}
.fc-list-table .fc-list-event:nth-child(even) {
    background-color: #f5f5f5;
}
.fc-list-event {
    cursor: pointer;
}

.fc-list-event-graphic {
    padding-right: 0 !important;
}

.fc-list-event-time {
    min-width: 60px;
    padding-bottom: 0 !important;
}

.fc-list-item {
    border-bottom: 1px solid #ddd;
}

.fc-list-event:hover {
    background-color: #f5f5f5;
}

/* Tablet responsiveness */
@media (max-width: 768px) {
    .fc-header-toolbar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px 5px;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .fc-button {
        padding: 0.3em 0.5em;
        font-size: 0.9em;
    }
    
    .fc-toolbar-title {
        font-size: 1.2em;
    }
    
    .fc-daygrid-event {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    .tc-event-thumbnail {
        width: 24px;
        height: 24px;
        margin-right: 4px;
    }
    
    .fc-daygrid-day-frame {
        min-height: 60px;
    }
    
    .fc-col-header-cell {
        font-size: 0.85em;
    }
}

/* Mobile - Switch to list view */
@media only screen and (max-width: 900px) {

    /* Hide the grid view buttons on mobile */
    .fc-dayGridMonth-button,
    .fc-timeGridWeek-button,
    .fc-timeGridDay-button,
    .fc-dayGridMonth-button,
    .fc-listMonth-button {
        display: none !important;
    }
    
    /* List view styling */
    .fc-list-event {
        padding: 12px 8px;
    }
    
    .fc-list-event-time {
        font-weight: 600;
        color: #666;
        min-width: 70px;
        font-size: 0.9em;
    }
    
    .fc-list-event-title {
        font-size: 0.95em;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .fc-list-day-cushion {
        background-color: #f8f8f8;
        padding: 8px 10px;
        font-weight: 600;
        font-size: 0.9em;
    }
    
    .tc-event-thumbnail {
        width: 40px;
        height: 40px;
        margin-right: 8px;
        border-radius: 6px;
    }
    
    .fc-toolbar-title {
        font-size: 1.1em;
    }
    
    .fc-button {
        padding: 0.4em 0.6em;
        font-size: 0.85em;
    }
}

@media only screen and (max-width: 480px) {
    .tc-responsive-event {
        position: absolute;
        z-index: 9999999;
        background-color: #fff;
        padding: 8px 12px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 1px 1px 5px  rgba(0, 0, 0, 0.2);
    }

    .fc-event-container .fc-content {
        width: 100%;
        padding: 7px 0px !important;
    }
    
    .fc-event-container .fc-content span{
        padding-left:7px !important;
		font-size:10px;
    }
    
	.fc-row tr:not(:first-child) td:first-child .fc_show_event {
		left: auto;
		right: 0 !important;
	}

    .tc-responsive-event a {
        text-decoration: none;
    }
    
    .fc-list-event-time {
        min-width: 60px;
        font-size: 0.85em;
    }
    
    .fc-list-event-title {
        font-size: 0.9em;
    }
    
    .tc-event-thumbnail {
        width: 36px;
        height: 36px;
    }
}