.hid-event-calendar-widget {
    --hid-calendar-accent: #702283;
    --hid-calendar-background: #ffffff;
    --hid-calendar-border: #d9d5dc;
    --hid-calendar-text: #2a2430;
    --hid-calendar-event-hover-background: #702283;
    --hid-calendar-event-hover-text: #ffffff;
    color: var(--hid-calendar-text);
    font-family: "Inter", Arial, sans-serif;
    width: 100%;
}

.hid-event-calendar-widget *,
.hid-event-calendar-widget *::before,
.hid-event-calendar-widget *::after {
    box-sizing: border-box;
}

.hid-event-calendar-widget__calendar {
    background: var(--hid-calendar-background);
    min-height: 680px;
    width: 100%;
}

.hid-event-calendar-widget .fc {
    color: var(--hid-calendar-text);
    height: 100%;
}

.hid-event-calendar-widget .fc .fc-toolbar {
    align-items: center;
    background: color-mix(in srgb, var(--hid-calendar-accent) 7%, #ffffff);
    gap: 18px;
    margin: 0;
    min-height: 76px;
    padding: 14px 18px;
}

.hid-event-calendar-widget .fc .fc-toolbar-title {
    color: var(--hid-calendar-accent);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.15;
}

.hid-event-calendar-widget .fc .fc-button-primary {
    align-items: center;
    background: var(--hid-calendar-accent);
    border: 1px solid var(--hid-calendar-accent);
    border-radius: 4px;
    box-shadow: none;
    color: #ffffff;
    display: inline-flex;
    font: inherit;
    font-weight: 600;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hid-event-calendar-widget .fc .fc-button-primary:hover,
.hid-event-calendar-widget .fc .fc-button-primary:focus-visible {
    background: color-mix(in srgb, var(--hid-calendar-accent) 82%, #ffffff);
    border-color: color-mix(in srgb, var(--hid-calendar-accent) 82%, #ffffff);
    color: #ffffff;
}

.hid-event-calendar-widget .fc .fc-button-primary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--hid-calendar-accent) 36%, transparent);
    outline-offset: 2px;
}

.hid-event-calendar-widget .fc .fc-button-primary:disabled {
    background: var(--hid-calendar-accent);
    border-color: var(--hid-calendar-accent);
    opacity: 0.52;
}

.hid-event-calendar-widget .fc-theme-standard td,
.hid-event-calendar-widget .fc-theme-standard th,
.hid-event-calendar-widget .fc-theme-standard .fc-scrollgrid {
    border-color: var(--hid-calendar-border);
}

.hid-event-calendar-widget .fc .fc-col-header-cell-cushion,
.hid-event-calendar-widget .fc .fc-daygrid-day-number {
    color: var(--hid-calendar-accent);
    text-decoration: none;
}

.hid-event-calendar-widget .fc .fc-col-header-cell-cushion {
    font-weight: 700;
    padding: 10px 8px;
}

.hid-event-calendar-widget .fc .fc-daygrid-day-number {
    font-weight: 500;
    padding: 9px;
}

.hid-event-calendar-widget .fc .fc-day-today {
    background: color-mix(in srgb, var(--hid-calendar-accent) 8%, #ffffff);
}

.hid-event-calendar-widget .fc .fc-event {
    border-radius: 4px;
    cursor: pointer;
    margin: 2px 4px;
    padding: 3px 5px;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hid-event-calendar-widget .fc .fc-event:hover,
.hid-event-calendar-widget .fc .fc-event:focus {
    background-color: var(--hid-calendar-event-hover-background) !important;
    border-color: var(--hid-calendar-event-hover-background) !important;
    color: var(--hid-calendar-event-hover-text) !important;
    box-shadow: 0 8px 18px rgba(36, 24, 42, 0.2);
    transform: translateY(-1px);
}

.hid-event-calendar-widget .fc .fc-event:hover .fc-event-main,
.hid-event-calendar-widget .fc .fc-event:focus .fc-event-main,
.hid-event-calendar-widget .fc .fc-event:hover .fc-event-title,
.hid-event-calendar-widget .fc .fc-event:focus .fc-event-title,
.hid-event-calendar-widget .fc .fc-event:hover .fc-event-time,
.hid-event-calendar-widget .fc .fc-event:focus .fc-event-time {
    color: var(--hid-calendar-event-hover-text) !important;
}

.hid-event-calendar-widget .fc .fc-event-main {
    overflow: hidden;
}

.hid-event-calendar-widget .fc .fc-event-title,
.hid-event-calendar-widget .fc .fc-event-time {
    font-weight: 600;
}

.hid-event-calendar-modal[hidden] {
    display: none;
}

.hid-event-calendar-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 999999;
}

.hid-event-calendar-modal__backdrop {
    backdrop-filter: blur(8px);
    background: rgba(24, 15, 29, 0.72);
    inset: 0;
    position: absolute;
}

.hid-event-calendar-modal__dialog {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(17, 8, 24, 0.38);
    height: 80vh;
    max-height: 96vh;
    max-width: 1500px;
    overflow: hidden;
    position: relative;
    width: 80vw;
    z-index: 1;
}

.hid-event-calendar-modal__title {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.hid-event-calendar-modal__close {
    align-items: center;
    background: var(--hid-calendar-accent);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 5px 16px rgba(24, 15, 29, 0.24);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    height: 44px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 3px;
    position: absolute;
    right: 14px;
    top: 14px;
    transition: background-color 180ms ease, transform 180ms ease;
    width: 44px;
    z-index: 2;
}

.hid-event-calendar-modal__close:hover,
.hid-event-calendar-modal__close:focus-visible {
    background: color-mix(in srgb, var(--hid-calendar-accent) 82%, #ffffff);
    color: #ffffff;
    transform: scale(1.04);
}

.hid-event-calendar-modal__close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.82);
    outline-offset: 3px;
}

.hid-event-calendar-modal__frame {
    background: #ffffff;
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

body.hid-event-calendar-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .hid-event-calendar-widget__calendar {
        min-height: 620px;
    }

    .hid-event-calendar-widget .fc .fc-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }

    .hid-event-calendar-widget .fc .fc-toolbar-chunk:nth-child(2) {
        order: -1;
        text-align: center;
        width: 100%;
    }

    .hid-event-calendar-widget .fc .fc-toolbar-title {
        font-size: 24px;
    }

    .hid-event-calendar-widget .fc .fc-button-primary {
        min-height: 38px;
        padding: 6px 10px;
    }

    .hid-event-calendar-widget .fc .fc-col-header-cell-cushion {
        font-size: 12px;
        padding: 8px 2px;
    }

    .hid-event-calendar-widget .fc .fc-daygrid-day-number {
        font-size: 12px;
        padding: 5px;
    }

    .hid-event-calendar-widget .fc .fc-event {
        font-size: 11px;
        margin: 1px 2px;
        padding: 2px;
    }

    .hid-event-calendar-widget .fc .fc-event-time {
        display: none;
    }

    .hid-event-calendar-modal__dialog {
        height: 88vh;
        width: 94vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hid-event-calendar-widget .fc .fc-button-primary,
    .hid-event-calendar-widget .fc .fc-event,
    .hid-event-calendar-modal__close {
        transition: none;
    }
}
