html, body {
    overflow-x: hidden !important;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.fc-event {
    cursor: pointer;
}

.uhtech-calendar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    --uhtech-calendar-darkblue: #194570;
    /* Override Default Colors */
    --fc-event-bg-color: var(--uhtech-calendar-darkblue);
    --fc-event-border-color: var(--uhtech-calendar-darkblue);
    --accent: var(--uhtech-calendar-darkblue);
}

.uhtech-calendar-wrapper :is(.fc-daygrid-body, .fc-timegrid-body, table) {
    width: 100% !important;
}

.uhtech-calendar-wrapper #calendar {
    width: 100%;
}

/* UHTECH Calendar Controls */
.uhtech-calendar-controls.fc {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0px;
    position: relative;
    gap: 16px;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__view-title {
    margin-block-end: 0;
    font-size: 1.25rem;
    font-weight: bold;
    width: 100%;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__view-chooser {
    max-width: calc(50% - 8px);
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__back-to-month {}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__navigation-button-group {
    display: flex;
    gap: 0;
    margin-left: auto;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__today-button {
    justify-content: center;
    margin-right: 8px;
    text-transform: capitalize;
    max-width: 150px;
}

.uhtech-calendar-controls.fc :is(.uhtech-calendar-controls__prev-button, .uhtech-calendar-controls__next-button) {
    min-width: 64px;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__prev-button {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__next-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__skip-calendar {
    position: absolute;
    inset: 0 0 4px 0;
    min-height: 48px;
    opacity: 0;
    pointer-events: none;
}

.uhtech-calendar-controls.fc .uhtech-calendar-controls__skip-calendar:focus {
    opacity: 1;
    pointer-events: auto;
}

/* UHTECH Calendar Popover */
.uhtech-calendar-popover {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.uhtech-calendar-popover__inner {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 32px;
    gap: 16px;
    margin: 0 32px;
    max-width: 400px;
    width: 100%;
    max-height: 75%;
    overflow: auto;
}

.uhtech-calendar-popover__title {
    font-size: 2rem;
    margin-block-start: 0;
    margin-block-end: 0;
}

.uhtech-calendar-popover__featured-image {
    margin: 16px 0;
    text-align: center;
}

.uhtech-calendar-popover__featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 200px;
    object-fit: cover;
}

.uhtech-calendar-popover__meta {
    font-size: 14px;
    font-style: italic;
    display: grid;
    grid-template-columns: 50% 50%;
    grid-column-gap: 8px;
    grid-row-gap: 8px;
}

.uhtech-calendar-popover__meta > p {
    margin-block-start: 0;
    margin-block-end: 0;
}

.uhtech-calendar-popover__close-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: sticky;
    top: 0px;
    left: 100%;
    border: none;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    border-radius: 100%;
    cursor: pointer;
    padding: 8px;
}

.uhtech-calendar-popover__close-button::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 80%;
    background: black;
    transform: rotate(45deg);
}

.uhtech-calendar-popover__close-button::before {
    content: "";
    position: absolute;
    width: 2px;
    height: 80%;
    background: black;
    transform: rotate(-45deg);
}

/* Optional wrapping for event titles */
.uhtech-calendar-wrapper.uhtech-calendar-wrap-event-titles .fc-event {
    flex-direction: row;
    flex-wrap: wrap;
    white-space: normal;
}

/* UHTECH Calendar Info */
.uhtech-calendar-info p {
    margin-block-start: 0;
    margin-block-end: 0;
    margin-bottom: 0;
}

/* UHTECH Calendar Footer */
.uhtech-calendar-footer {
    text-align: center;
    font-size: 0.75rem;
}

/* Widget Mode - Both */
.uhtech-calendar-wrapper:not([data-view='listDay']) .uhtech-calendar-controls__back-to-month {
    display: none;
}

/* Responsive Widget Mode */
@media only screen and (min-width: 768px) {
    .uhtech-calendar-wrapper:not(.uhtech-calendar-wrapper--widget) .uhtech-calendar-controls__back-to-month {
        display: none;
    }
}

/* Always Widget Mode */
.uhtech-calendar-wrapper--widget .uhtech-calendar-controls label {
    display: none;
}

.uhtech-calendar-wrapper--widget .fc-header-toolbar.fc-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    grid-row-gap: 8px;
}

.uhtech-calendar-wrapper--widget .fc-header-toolbar .fc-toolbar-title {
    text-align: center;
}

.uhtech-calendar-wrapper--widget .fc-header-toolbar .fc-toolbar-chunk:last-child {
    display: grid;
    grid-row-gap: 8px;
}

.uhtech-calendar-wrapper--widget .fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button-group {
    margin-left: 0;
}

.uhtech-calendar-wrapper--widget .fc-col-header-cell a {
    font-size: 0.75rem;
    text-decoration: none;
}

.uhtech-calendar-wrapper--widget .fc-daygrid-day-frame {
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uhtech-calendar-wrapper--widget .fc-daygrid-day-frame:has(.fc-daygrid-event-harness)::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 100%;
    box-shadow: 0px 0px 0px 1px var(--fc-event-bg-color);
}

.uhtech-calendar-wrapper--widget .fc-daygrid-day-top {
    font-size: 12px;
    margin-left: 6px;
}

.uhtech-calendar-wrapper--widget .fc-daygrid-day-events .fc-daygrid-event-harness a {
    display: none;
}

.uhtech-calendar-wrapper--widget[data-view="listDay"] .fc-today-button {
    display: none;
}

.uhtech-calendar-wrapper--widget .fc-list-event {
    display: flex;
    flex-direction: column;
}

.uhtech-calendar-wrapper--widget .fc-list-event > td {
    width: 100%;
}

.uhtech-calendar-wrapper--widget .fc-list-event > td:first-child {
    padding-bottom: 0px;
    border-bottom: 0px;
}

.uhtech-calendar-wrapper--widget .fc-list-event > td:last-child {
    padding-top: 0px;
    border-top: 0px;
}

.uhtech-calendar-wrapper--widget .fc-list-event-graphic {
    display: none;
}

.uhtech-calendar-wrapper--widget .fc-list-empty-cushion {
    margin-top: 0px;
    margin-bottom: 0px;
}

.uhtech-calendar-wrapper--widget :is(.uhtech-calendar-grid-day-header-text--full, .uhtech-calendar-grid-day-header-text--short) {
    display: none;
}

.uhtech-calendar-wrapper--widget .uhtech-calendar-grid-day-header-text--single-letter {
    display: inline;
}

/* Responsive widget mode */
@media only screen and (max-width: 768px) {
    .uhtech-calendar-wrapper--responsive-widget .uhtech-calendar-controls label {
        display: none;
    }

    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-header-toolbar.fc-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        grid-row-gap: 8px;
    }
    
    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-header-toolbar .fc-toolbar-title {
        text-align: center;
    }
    
    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-header-toolbar .fc-toolbar-chunk:last-child {
        display: grid;
        grid-row-gap: 8px;
    }

    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button-group {
        margin-left: 0;
    }
    
    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-col-header-cell a {
        font-size: 0.75rem;
        text-decoration: none;
    }
    
    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-daygrid-day-frame {
        aspect-ratio: 1 / 1;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-daygrid-day-frame:has(.fc-daygrid-event-harness)::after {
        content: "";
        position: absolute;
        width: 32px;
        height: 32px;
        border-radius: 100%;
        box-shadow: 0px 0px 0px 1px var(--fc-event-bg-color);
    }
    
    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-daygrid-day-top {
        font-size: 12px;
        margin-left: 6px;
    }
    
    .uhtech-calendar-wrapper--responsive-widget[data-view="dayGridMonth"] .fc-daygrid-day-events .fc-daygrid-event-harness a {
        display: none;
    }

    .uhtech-calendar-wrapper--responsive-widget[data-view="listDay"] .fc-today-button {
        display: none;
    }

    .uhtech-calendar-wrapper--responsive-widget :is(.uhtech-calendar-grid-day-header-text--full, .uhtech-calendar-grid-day-header-text--short) {
        display: none;
    }
    
    .uhtech-calendar-wrapper--responsive-widget .uhtech-calendar-grid-day-header-text--single-letter {
        display: inline;
    }
}

/* Generic Responsive Styles */
.uhtech-calendar-grid-day-header-text--short,
.uhtech-calendar-grid-day-header-text--single-letter {
    display: none;
}

@media only screen and (max-width: 768px) {
    /* .uhtech-calendar-wrapper .fc-header-toolbar.fc-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        grid-row-gap: 8px;
    }
    
    .uhtech-calendar-wrapper .fc-header-toolbar .fc-toolbar-title {
        text-align: center;
    }
    
    .uhtech-calendar-wrapper .fc-header-toolbar .fc-toolbar-chunk:last-child {
        display: grid;
        grid-row-gap: 8px;
    }
    
    .uhtech-calendar-wrapper .fc-header-toolbar .fc-toolbar-chunk:last-child .fc-button-group {
        margin-left: 0;
    } */
    .uhtech-calendar-controls__view-title {
        width: 100%;
        text-align: center;
    }

    .uhtech-calendar-controls__view-chooser {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    .uhtech-calendar-controls .uhtech-calendar-controls__navigation-button-group {
        width: 100%;
    }

    .uhtech-calendar-controls .uhtech-calendar-controls__today-button {
        flex-grow: 1;
        max-width: 100%;
    }

    /* List view adjustments */
    .uhtech-calendar-wrapper .fc-list-event {
        display: flex;
        flex-direction: column;
    }

    .uhtech-calendar-wrapper .fc-list-event > td {
        width: 100%;
    }

    .uhtech-calendar-wrapper .fc-list-event > td:first-child {
        padding-bottom: 0px;
        border-bottom: 0px;
    }

    .uhtech-calendar-wrapper .fc-list-event > td:last-child {
        padding-top: 0px;
        border-top: 0px;
    }
    
    .uhtech-calendar-wrapper .fc-list-event-graphic {
        display: none;
    }

    /* Day Header Adjustments */
    .uhtech-calendar-grid-day-header-text--full {
        display: none;
    }

    .uhtech-calendar-grid-day-header-text--short {
        display: inline;
    }
    
}

/* Modern List Views and Upcoming Events Styling */

/* Enhanced List Views */
.fc-list-event {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.fc-list-event:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.fc-list-event-dot {
    margin-top: 8px;
    margin-right: 12px;
    flex-shrink: 0;
}

.fc-list-event-title {
    font-weight: 600;
    font-size: 16px;
    color: #1d2327;
    margin-bottom: 4px;
}

.fc-list-event-time {
    font-size: 14px;
    color: #646970;
    margin-bottom: 8px;
}

.fc-list-event-graphic {
    margin-left: auto;
    margin-right: 12px;
    flex-shrink: 0;
}

.fc-list-event-image {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background: #f0f0f1;
}

.fc-list-event-excerpt {
    font-size: 14px;
    color: #646970;
    line-height: 1.4;
    margin-top: 8px;
}

/* Upcoming Events View */
.uhtech-calendar-upcoming-events {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.uhtech-calendar-upcoming-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 20px;
    text-align: center;
}

.uhtech-calendar-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.uhtech-calendar-upcoming-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.uhtech-calendar-upcoming-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,115,170,0.1);
}

.uhtech-calendar-upcoming-item-image {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f1;
}

.uhtech-calendar-upcoming-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uhtech-calendar-upcoming-item-content {
    flex: 1;
    min-width: 0;
}

.uhtech-calendar-upcoming-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.uhtech-calendar-upcoming-item-title a {
    color: inherit;
    text-decoration: none;
}

.uhtech-calendar-upcoming-item-title a:hover {
    color: #0073aa;
}

.uhtech-calendar-upcoming-item-date {
    font-size: 14px;
    color: #0073aa;
    font-weight: 500;
    margin-bottom: 8px;
}

.uhtech-calendar-upcoming-item-excerpt {
    font-size: 14px;
    color: #646970;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .uhtech-calendar-upcoming-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .uhtech-calendar-upcoming-item-image {
        width: 100%;
        height: 120px;
    }
    
    .fc-list-event {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fc-list-event-graphic {
        margin-left: 0;
        margin-right: 0;
        margin-top: 12px;
        align-self: flex-start;
    }
}

/* Dark Theme Support */
.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-events,
.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-item,
.uhtech-calendar-theme-dark .fc-list-event {
    background: #2c3338;
    color: #f0f0f1;
}

.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-title,
.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-item-title,
.uhtech-calendar-theme-dark .fc-list-event-title {
    color: #f0f0f1;
}

.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-item-date,
.uhtech-calendar-theme-dark .fc-list-event-time {
    color: #72aee6;
}

.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-item-excerpt,
.uhtech-calendar-theme-dark .fc-list-event-excerpt {
    color: #a0a5aa;
}

.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-item {
    border-color: #4a5568;
}

.uhtech-calendar-theme-dark .uhtech-calendar-upcoming-item:hover {
    border-color: #72aee6;
    box-shadow: 0 2px 8px rgba(114,174,230,0.2);
}

/* --- Custom WordPress Calendar Override Styles --- */

/* Force override existing styles */
body .uhtech-calendar-wrapper,
.site .uhtech-calendar-wrapper,
.entry-content .uhtech-calendar-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4f8 100%) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
    overflow: hidden !important;
}

body .uhtech-calendar-wrapper::before,
.site .uhtech-calendar-wrapper::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #71ba64 0%, #3c79ba 100%) !important;
}

body .uhtech-calendar-month-label,
.site .uhtech-calendar-month-label {
    text-align: center !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 0 0 2rem 0 !important;
    color: #1e293b !important;
    letter-spacing: -0.025em !important;
    background: linear-gradient(135deg, #71ba64 0%, #3c79ba 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body .uhtech-calendar-controls,
.site .uhtech-calendar-controls {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 2rem !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

body .uhtech-calendar-controls select,
.site .uhtech-calendar-controls select {
    padding: 0.75rem 1rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    min-width: 140px !important;
}

body .uhtech-calendar-controls button,
.site .uhtech-calendar-controls button {
    padding: 0.75rem 1.25rem !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

body .uhtech-calendar-controls button:hover,
.site .uhtech-calendar-controls button:hover {
    background: #71ba64 !important;
    color: white !important;
    border-color: #71ba64 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px -8px rgba(113, 186, 100, 0.4) !important;
}

body #today-button,
.site #today-button {
    background: linear-gradient(135deg, #71ba64 0%, #5ca455 100%) !important;
    color: white !important;
    border-color: #71ba64 !important;
}

/* Calendar container */
body #calendar,
.site #calendar {
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
}

/* FullCalendar overrides */
body .fc-col-header-cell,
.site .fc-col-header-cell {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    padding: 1rem 0.5rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    border-color: #e2e8f0 !important;
}

body .fc-daygrid-day:hover,
.site .fc-daygrid-day:hover {
    background-color: rgba(113, 186, 100, 0.05) !important;
}

body .fc-day-today,
.site .fc-day-today {
    background: linear-gradient(135deg, rgba(113, 186, 100, 0.1) 0%, rgba(60, 121, 186, 0.1) 100%) !important;
    position: relative !important;
}

body .fc-day-today::before,
.site .fc-day-today::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #71ba64 0%, #3c79ba 100%) !important;
}

body .fc-daygrid-day-number,
.site .fc-daygrid-day-number {
    font-weight: 600 !important;
    color: #1e293b !important;
    padding: 0.5rem !important;
}

body .fc-day-today .fc-daygrid-day-number,
.site .fc-day-today .fc-daygrid-day-number {
    color: #71ba64 !important;
    font-weight: 700 !important;
}

/* Events */
body .fc-daygrid-event,
.site .fc-daygrid-event {
    background: linear-gradient(135deg, #71ba64 0%, #5ca455 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 0.375rem 0.75rem !important;
    margin: 0.125rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    box-shadow: 0 2px 8px -2px rgba(113, 186, 100, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

body .fc-daygrid-event:hover,
.site .fc-daygrid-event:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px -8px rgba(113, 186, 100, 0.5) !important;
}

body .fc-event-title,
.site .fc-event-title {
    white-space: normal !important;
    line-height: 1.3 !important;
    color: white !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body .uhtech-calendar-wrapper,
    .site .uhtech-calendar-wrapper {
        padding: 1rem !important;
        margin: 1rem !important;
    }

    body .uhtech-calendar-month-label,
    .site .uhtech-calendar-month-label {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    body .uhtech-calendar-controls,
    .site .uhtech-calendar-controls {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
}

.uhtech-calendar-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 1000;
    max-width: 400px;
    width: 90vw;
    border-radius: 10px;
    text-align: left;
}
.uhtech-calendar-popup img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
    border-radius: 6px;
}
.uhtech-calendar-popup h3 {
    margin-top: 0;
}
.uhtech-calendar-popup .event-link {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}
.uhtech-calendar-popup .event-link:hover {
    background: #005177;
}
.uhtech-calendar-popup .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #888;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}
.uhtech-calendar-popup .close-btn:hover {
    background: #f0f0f0;
    color: #333;
}
.uhtech-calendar-popup .close-btn span {
    position: absolute;
    width: 18px;
    height: 18px;
    display: block;
}
.uhtech-calendar-popup .close-btn span::before,
.uhtech-calendar-popup .close-btn span::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    width: 2px;
    height: 18px;
    background: currentColor;
    border-radius: 2px;
}
.uhtech-calendar-popup .close-btn span::before {
    transform: rotate(45deg);
}
.uhtech-calendar-popup .close-btn span::after {
    transform: rotate(-45deg);
}

.uhtech-calendar-blur-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(6px);
    pointer-events: none;
    transition: backdrop-filter 0.3s, background 0.3s;
}

/* Prevent vertical scroll on calendar wrapper and calendar */
.uhtech-calendar-wrapper,
#calendar {
    overflow: visible !important;
}

.fc-view-harness,
.fc {
    overflow: visible !important;
    /* Removed height and max-height overrides */
}

body {
    overflow-y: auto !important;
}

.fc-daygrid-event .fc-event-title,
.fc-event-title {
    color: #fff !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    white-space: normal !important;
    display: block !important;
    line-height: 1.3 !important;
}

.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title,
.uhtech-calendar-wrapper .fc-event-title {
    color: #222 !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    white-space: normal !important;
    display: block !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title {
    color: #fff !important;
    font-size: 0.95em !important;
    font-weight: 400 !important;
    white-space: normal !important;
    display: block !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}


/* Clean List View Calendar - Remove heavy grid styling and compact layout */
body .fc-list-view,
.site .fc-list-view,
body .fc-list-table,
.site .fc-list-table {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
body .fc-list-day,
.site .fc-list-day,
body .fc-list-day-text,
.site .fc-list-day-text,
body .fc-list-day-side-text,
.site .fc-list-day-side-text {
    display: none !important;
}
body .fc-list-event,
.site .fc-list-event {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    padding: 0.75rem 0 !important;
    transition: all 0.3s ease !important;
}
body .fc-list-event:hover,
.site .fc-list-event:hover {
    background: rgba(113, 186, 100, 0.05) !important;
    transform: none !important;
    box-shadow: none !important;
    border-bottom-color: #71ba64 !important;
    padding-left: 0.5rem !important;
}
body .fc-list-event:last-child,
.site .fc-list-event:last-child {
    border-bottom: none !important;
}
body .fc-list-event-main,
.site .fc-list-event-main {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 0 !important;
}
body .fc-list-event-datebox,
.site .fc-list-event-datebox {
    display: none !important;
}
body .fc-list-event-image,
.site .fc-list-event-image {
    width: 70px !important;
    height: 50px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    border: 1px solid #e2e8f0 !important;
    margin-right: 1rem !important;
}
body .fc-list-event-content,
.site .fc-list-event-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
body .fc-list-event-title,
.site .fc-list-event-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 0.5rem 0 !important;
    line-height: 1.3 !important;
    order: 1 !important;
}
body .fc-list-event-time,
.site .fc-list-event-time {
    font-size: 0.85rem !important;
    color: #3c79ba !important;
    font-weight: 600 !important;
    margin: 0 0 0.5rem 0 !important;
    display: block !important;
    order: 2 !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
body .fc-list-event-excerpt,
.site .fc-list-event-excerpt {
    color: #64748b !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    order: 3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
body .fc-list-event-dot,
.site .fc-list-event-dot,
body .fc-list-event-graphic,
.site .fc-list-event-graphic {
    display: none !important;
}
body .fc-list-view,
.site .fc-list-view {
    padding: 1rem 0 !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}
body .fc-list-view .fc-scroller,
.site .fc-list-view .fc-scroller {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}
body .fc-list-table tbody,
.site .fc-list-table tbody {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
@media (max-width: 768px) {
    body .fc-list-view,
    .site .fc-list-view {
        max-width: 100% !important;
        padding: 0.5rem !important;
    }
    body .fc-list-event-main,
    .site .fc-list-event-main {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    body .fc-list-event-image,
    .site .fc-list-event-image {
        width: 100% !important;
        height: 120px !important;
        margin-right: 0 !important;
    }
    body .fc-list-event,
    .site .fc-list-event {
        padding: 0.75rem 0 !important;
    }
    body .fc-list-event-title,
    .site .fc-list-event-title {
        font-size: 1.1rem !important;
    }
}
body .fc-list-event,
.site .fc-list-event {
    animation: fadeInUp 0.3s ease-out !important;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uhtech-calendar-wrapper .fc-list-event-date {
    font-size: 0.95rem !important;
    color: #71ba64 !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    order: 0 !important;
}
.uhtech-calendar-wrapper .fc-list-event-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin: 0 0 0.25rem 0 !important;
    line-height: 1.3 !important;
    order: 1 !important;
}
.uhtech-calendar-wrapper .fc-list-event-excerpt {
    font-weight: 400 !important;
}

.uhtech-calendar-wrapper .fc-list-event,
body .fc-list-event,
.site .fc-list-event {
    border: none !important;
    border-bottom: none !important;
}

.uhtech-calendar-wrapper .fc-list-table,
.uhtech-calendar-wrapper .fc-list-table tr,
.uhtech-calendar-wrapper .fc-list-table td,
.uhtech-calendar-wrapper .fc-list-table th {
    border: none !important;
    box-shadow: none !important;
}
.uhtech-calendar-wrapper .fc-list-view {
    width: 100% !important;
    max-width: 350px !important;
    min-width: 220px !important;
    margin: 2rem auto !important;
    padding: 2rem 2rem !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
    overflow-x: auto !important;
}
.uhtech-calendar-wrapper .fc-list-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}
.uhtech-calendar-wrapper .fc-list-event {
    padding: 1.5rem 1.5rem !important;
    margin-bottom: 1.5rem !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
}

.uhtech-calendar-wrapper .fc-list-day-side,
.uhtech-calendar-wrapper td.fc-list-day-side,
.uhtech-calendar-wrapper .fc-list-day-side-text {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.uhtech-calendar-wrapper .fc-list-table tr > td:first-child {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.uhtech-calendar-wrapper .fc-list-table tr > td {
    width: 100% !important;
}

.uhtech-calendar-wrapper .fc-list-event-view-btn {
    display: inline-block;
    margin-top: 1rem;
    width: 115px;
    padding: 0.5rem 0;
    background: #0073aa !important;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: none;
    border: none;
    line-height: 1.2;
    transition: background 0.2s, color 0.2s;
    text-align: center;
}
.uhtech-calendar-wrapper .fc-list-event-view-btn:hover {
    background: #005177 !important;
    color: #fff !important;
    text-decoration: none !important;
}

.uhtech-calendar-wrapper .fc-list-event-content {
    display: block !important;
}
.uhtech-calendar-wrapper .fc-list-event-view-btn {
    display: block;
    margin: 1rem 0 0 0;
    width: 115px;
    text-align: center;
    float: none;
    clear: both;
}

.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title,
.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title-container,
.uhtech-calendar-wrapper .fc-daygrid-event {
    color: #fff !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    white-space: normal !important;
    display: block !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title,
.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title span,
.uhtech-calendar-wrapper .fc-daygrid-event .fc-event-title-container {
    color: #fff !important;
    font-size: 0.9em !important;
    font-weight: 400 !important;
    white-space: normal !important;
    display: block !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    letter-spacing: 0 !important;
}

.uhtech-calendar-wrapper .fc-daygrid-event {
    min-height: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

@media (max-width: 768px) {
    .uhtech-calendar-wrapper #view-selector {
        display: none !important;
    }
}

.uhtech-calendar-wrapper .fc-list-event-main {
    display: flex !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 0 !important;
    min-height: 120px !important;
    height: 100% !important;
}
.uhtech-calendar-wrapper .fc-list-event-image {
    width: 120px !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    border: 1px solid #e2e8f0 !important;
    margin-right: 1rem !important;
    align-self: stretch !important;
}

.uhtech-calendar-wrapper .fc-list-event-content-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 0%;
}
.uhtech-calendar-wrapper .fc-list-event-view-btn {
    align-self: flex-start;
    margin-top: 1rem;
    width: 115px;
    text-align: center;
    float: none;
    clear: both;
    display: block;
}

/* Upcoming Events List Styling */
.uhtech-upcoming-events {
    font-family: inherit;
    margin: 0;
    padding: 0;
}

.uhtech-upcoming-events h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #194570;
    padding-bottom: 8px;
}

.uhtech-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.uhtech-event-item {
    display: flex;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.uhtech-event-item:hover {
    border-color: #194570;
    box-shadow: 0 2px 8px rgba(25, 69, 112, 0.1);
}

.uhtech-event-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    padding: 8px 5px;
    background: #194570;
    color: white;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    line-height: 1.2;
}

.uhtech-event-date small {
    font-size: 0.8em;
    opacity: 0.9;
}

.uhtech-event-content {
    flex: 1;
    margin-left: 12px;
}

.uhtech-event-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.3;
}

.uhtech-event-title a {
    color: #194570;
    text-decoration: none;
    transition: color 0.2s ease;
}

.uhtech-event-title a:hover {
    color: #2a5a8a;
    text-decoration: underline;
}

.uhtech-event-excerpt {
    margin: 0;
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
}

/* Responsive design for upcoming events */
@media (max-width: 480px) {
    .uhtech-event-item {
        flex-direction: column;
    }
    
    .uhtech-event-date {
        width: auto;
        margin-bottom: 8px;
        align-self: flex-start;
    }
    
    .uhtech-event-content {
        margin-left: 0;
    }
}

/* Dark theme support for upcoming events */
.uhtech-calendar-theme-dark .uhtech-upcoming-events h3 {
    color: #fff;
    border-bottom-color: #4a90e2;
}

.uhtech-calendar-theme-dark .uhtech-event-item {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

.uhtech-calendar-theme-dark .uhtech-event-item:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.uhtech-calendar-theme-dark .uhtech-event-date {
    background: #4a90e2;
}

.uhtech-calendar-theme-dark .uhtech-event-title a {
    color: #4a90e2;
}

.uhtech-calendar-theme-dark .uhtech-event-title a:hover {
    color: #6ba3e8;
}

.uhtech-calendar-theme-dark .uhtech-event-excerpt {
    color: #ccc;
}

