.i-calendar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    flex-grow: 1;
    min-height: 0;
}

.i-calendar-event {
    position: absolute;
    background-color: var(--dark);
    overflow: hidden;
    color: white;
    border-radius: 4px;
    box-sizing: border-box;
    border: 1px solid #ffffffaa;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 0px;
    z-index: 2;
}

.i-calendar-event-selected {
    border: 2px solid var(--blue);
}

.i-calendar-event-body {
    flex-grow: 1;
    flex-basis: 0;
    min-height: 0;
    margin-top: -8px;
    margin-bottom: -8px;
    text-align: left;
    white-space: pre-wrap;
    overflow: hidden;
    width: 100%;
}

.i-calendar-event-background {
    z-index: 1;
    background-color: var(--green);
    opacity: 0.2;
}

.i-calendar-event-body-render {
    padding: 2px;
}

.i-calendar-event-body-textarea {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    resize: none;
    border: 2px solid var(--blue);
}

.i-calendar-event-drag-top, .i-calendar-event-drag-bottom {
    min-height: 8px;
    max-height: 8px;
    cursor: row-resize;
    width: 100%;
    z-index: 1;
}

.i-calendar-body {
    border: 1px solid var(--border);
    display: flex;
    position: relative;
    flex-direction: column;
    overflow: auto;
    border-radius: 4px;
}

.i-calendar-body-load {
    background-color: white;
    display: none;
    justify-content: center;
    position: absolute;
    padding-top: 64px;
    box-sizing: border-box;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0.5;
    z-index: 5;
}

.i-calendar-body-load-active {
    display: flex;
    animation: i-calendar-grid-load-active 2s ease-in;
}

.i-calendar-cell {
    box-sizing: border-box;
    display: flex;
    border-right: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    display: flex;
    flex-direction: column;
}

.i-calendar-grid-col {
    display: flex;
    flex-direction: column;
    flex-basis: 0;
    flex-grow: 1;
    box-sizing: border-box;
}

.i-calendar-grid-col-time {
    max-width: 64px;
    z-index: 3;
}

@keyframes i-calendar-grid-load-active {
    0% { opacity: 0; }
    100% { opacity: 0.5; }
}

.i-calendar-body-headers {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 4;
}

.i-calendar-body-headers .i-calendar-cell {
    flex-grow: 1;
    font-weight: bold;
    display: flex;
    justify-content: flex-start;
    flex-basis: 0;
    border-right: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    background-color: #fafafa;
    color: #222222;
    font-weight: bold;
}

.i-calendar-body-headers .i-calendar-cell-time {
    
}

.i-calendar-grid {
    position: relative;
    display: flex;
    min-height: 200px;
    border-radius: 4px;
}

.i-calendar-cell-time {
    align-items: center;
    justify-content: center;
    background-color: #E9F4FB;
    min-width: 64px !important;
    max-width: 64px !important;
    color: #222222;
    font-weight: bold;
}

.i-calendar-cell-separator {
    flex-grow: 1;
    flex-basis: 0;
    box-sizing: border-box;
    border-bottom: 1px dotted var(--border);
    pointer-events: none;
    opacity: 0.5;
    font-size: 0.6em;
    padding: 4px;
    display: flex;
    user-select: none;
    align-items: center;
    min-height: 0;
}

.i-calendar-cell-separator:last-child {
    border-bottom: 0;
}

.i-calendar-column-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding-left: 2px;
    padding-right: 2px;
}

.i-calendar-header-highlight {
    background-color: #3399ff !important;
    color: white !important;
}

.i-calendar-selection-rectangle {
    background-color: #3399ff22;
    border: 2px solid #3399ff88;
    position: absolute;
    z-index: 6;
    pointer-events: none;
    display: none;
}