/* FULLCALENDAR THEME OVERRIDES */

/* CSS VARIABLE OVERRIDES */

.fc {
    --fc-border-color:                var(--itemBorder);
    --fc-button-text-color:           var(--main);
    --fc-button-bg-color:             transparent;
    --fc-button-border-color:         var(--main);
    --fc-button-hover-bg-color:       var(--main);
    --fc-button-hover-border-color:   var(--main);
    --fc-button-active-bg-color:      var(--main);
    --fc-button-active-border-color:  var(--main);
    --fc-event-bg-color:              var(--main);
    --fc-event-border-color:          transparent;
    --fc-event-text-color:            var(--surface);
    --fc-event-selected-overlay-color: hsla(0, 0%, 0%, 0.25);
    --fc-more-link-bg-color:          var(--itemBackground);
    --fc-more-link-text-color:        var(--main);
    --fc-non-business-color:          hsla(0, 0%, 0%, 0.06);
    --fc-highlight-color:             var(--mainLight);
    --fc-today-bg-color:              var(--mainLight);
    --fc-now-indicator-color:         var(--main);
    --fc-neutral-bg-color:            var(--backgroundDark);
    --fc-neutral-text-color:          var(--textLight);
    --fc-list-event-hover-bg-color:   var(--itemBackground);
    --fc-small-font-size:             0.85em;
    --fc-page-bg-color:               var(--backgroundDark);
}

/* BASE STYLING */

.fc {
    font-family: inherit;
    color: var(--text);
}

/* TOOLBAR STYLING */

.fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
}

/* TOOLBAR BUTTON STYLING */

.fc .fc-button,
.fc .fc-button-primary {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: var(--borderRadius);
    box-shadow: none;
    transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
    text-transform: none;
    letter-spacing: normal;
}

.fc .fc-button:hover,
.fc .fc-button-primary:hover {
    color: var(--surface);
    box-shadow: 0 4px 14px var(--mainGlow);
}

.fc .fc-button:focus,
.fc .fc-button-primary:focus {
    box-shadow: 0 0 0 3px var(--mainGlow);
    outline: none;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    color: var(--surface);
    box-shadow: none;
}

.fc .fc-button-primary:disabled {
    background-color: var(--itemBorder);
    border-color: transparent;
    color: var(--textLight);
    opacity: 1;
}

/* BACKGROUND OVERRIDES */

.fc table,
.fc .fc-timegrid-axis,
.fc .fc-scrollgrid-section > td,
.fc .fc-scrollgrid-section > th,
.fc td.fc-day-disabled,
.fc .fc-daygrid-day.fc-day-disabled {
    background-color: var(--backgroundDark);
}

/* GRID STYLING */

.fc .fc-scrollgrid {
    border-color: var(--itemBorder);
    background-color: var(--backgroundDark);
    border-radius: var(--borderRadius);
}

.fc .fc-scrollgrid td,
.fc .fc-scrollgrid th {
    border-color: var(--itemBorder);
}

/* COLUMN HEADER STYLING */

.fc .fc-col-header-cell {
    background-color: var(--backgroundDark);
    padding: 0.5rem 0;
}

.fc .fc-col-header-cell-cushion {
    color: var(--textLight);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

/* DAY CELL STYLING */

.fc .fc-daygrid-day {
    transition: background-color var(--transition);
}

.fc .fc-daygrid-day:hover {
    background-color: var(--itemBackground);
}

.fc .fc-daygrid-day-number {
    color: var(--textLight);
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.4rem 0.5rem;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: var(--main);
    font-weight: bold;
}

/* TIME GRID STYLING */

.fc .fc-timegrid-slot {
    height: 2rem;
    border-color: var(--itemBorder);
}

.fc .fc-timegrid-slot-label {
    color: var(--textLight);
    font-size: 0.75rem;
    vertical-align: top;
    padding: 0.25rem 0.5rem;
}

.fc .fc-timegrid-slot-minor {
    border-color: hsla(0, 0%, 100%, 0.03);
}

.fc .fc-timegrid-col.fc-day-today {
    background-color: var(--mainLight);
}

/* NOW INDICATOR STYLING */

.fc .fc-timegrid-now-indicator-line {
    border-color: var(--main);
    border-width: 2px;
}

.fc .fc-timegrid-now-indicator-arrow {
    border-color: var(--main);
}

/* EVENT STYLING */

.fc .fc-event {
    border-radius: var(--borderRadius);
    border: none;
    cursor: pointer;
    transition: filter var(--transition), transform var(--transition);
}

.fc .fc-event:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.fc .fc-daygrid-event {
    padding: 0.1rem 0.25rem;
}

/* MORE LINK STYLING */

.fc .fc-daygrid-more-link {
    color: var(--main);
    font-size: 0.8rem;
}

/* LIST VIEW STYLING */

.fc .fc-list {
    border-color: var(--itemBorder);
}

.fc .fc-list-day-cushion {
    background-color: var(--backgroundDark);
    color: var(--textLight);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
    color: var(--textLight);
    text-decoration: none;
}

.fc .fc-list-event td {
    color: var(--text);
    border-color: var(--itemBorder);
}

.fc .fc-list-event:hover td {
    background-color: var(--itemBackground);
}

.fc .fc-list-event-dot {
    border-color: var(--main);
}

.fc .fc-list-event-title a {
    color: var(--text);
    text-decoration: none;
}

/* POPOVER STYLING */

.fc .fc-popover {
    background-color: var(--background);
    border-color: var(--itemBorder);
    border-radius: var(--borderRadius);
    box-shadow: 0 8px 24px var(--shadow);
}

.fc .fc-popover-header {
    background-color: var(--backgroundDark);
    color: var(--text);
    padding: 0.5rem 0.75rem;
}

.fc .fc-popover-close {
    color: var(--textLight);
}

/* TOOLTIP STYLING */

.fc-tooltip {
    background-color: var(--background);
    color: var(--text);
    border: 1px solid var(--itemBorder);
    padding: 0.4rem 0.75rem;
    border-radius: var(--borderRadius);
    box-shadow: 0 4px 12px var(--shadow);
    font-size: 0.875rem;
    pointer-events: none;
    max-width: 240px;
    line-height: 1.4;
}

/* CUSTOM EVENT CONTENT STYLING */

.custom-event-container {
    padding: 2px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.custom-event-time {
    font-weight: bold;
    font-size: 0.8em;
    opacity: 0.85;
}

.custom-event-title {
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.9em;
    line-height: 1.2;
}

.fc-event-main {
    padding: 0 !important;
}
