.scheduler {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: 0;
    border: 1px solid #ccc;
    border-radius: 3px;

    --background-color: white;
    --theme-color: aqua;
    --new-appointment-color: #bce;
    background-color: var(--background-color);
    touch-action: none;
}

.scheduler-overflow {
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.scheduler > .header > .actions {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background-color: white;
}
.scheduler > .header > .actions > .actions-left,
.scheduler > .header > .actions > .actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.scheduler > .header > .actions > .actions-left > .navigation {
    display: flex;
    align-items: center;
    gap: 4px;
}
.scheduler > .header > .actions > .actions-left > .navigation > .selected-month {
    min-width: 160px;
    display: inline-block;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    vertical-align: middle;
}
.scheduler > .header > .actions .btn {
    background-color: #f4f6f8;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    color: #1f2937;
    padding: .4rem .8rem;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.scheduler > .header > .actions .btn:hover {
    background-color: #e8ecf0;
    border-color: #c6cdd6;
}
.scheduler > .header > .actions .btn:focus-visible {
    outline: 2px solid var(--theme-color, #4f8ef7);
    outline-offset: 1px;
}
.scheduler > .header > .actions .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .45rem;
}
.scheduler > .header > .actions .icon-btn > svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.scheduler > .month {
    display: flex;
    flex-direction: column;
}
.scheduler > .month > .week {
    position: relative;
}
.scheduler > .month > div:not(:last-of-type) {
    border-bottom: 1px solid #eee;
}
.scheduler > .month > .week > .days {
    display: flex;
    justify-content: space-around;
    height: max(8.313rem, calc(1.5rem + 5px + 8px + var(--maxAppointments) * 1.5rem));
}

.scheduler > .month > .week.header {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #eee;
}

.scheduler > .month > .week.header > .day-of-month {
    background-color: white;
    text-align: center;
    font-weight: bold;
    flex: 1;
}
.scheduler > .month > .week.header > .day-of-month > .short-dayname {
    display: none;
}
.scheduler > .month > .week.header > div:not(:last-of-type) {
    border-right: 1px solid #eee;
}

.scheduler > .month > .week > .days > .day {
    background-color: white;
    flex: 1;
    text-align: center;
}

.scheduler > .month > .week > .days > div:not(:last-of-type) {
    border-right: 1px solid #eee;
}

.scheduler > .month > .week > .days > .day > span {
    margin-top: 5px;
    font-size: .9rem;
    font-size: .75rem;
    display: inline-block;

    background-color: inherit;
    text-align: center;
    border-radius: 50%;
    --size: 1.5rem;
    min-width: var(--size);
    height: var(--size);
    line-height: var(--size);
}

.scheduler > .month > .week > .days > .day > span.today {
    background-color: var(--theme-color);
}

.scheduler > .month > .week > .days > .day.diff-month {
    background-color: #f7f7f7;
    color: #ababab;
}

.scheduler > .month > .week > .appointments > .appointment {
    position: absolute;
    left: calc(var(--start) / 7 * 100%);
    top: max(10px, calc(15px + (var(--order) * 1.5rem)));
    border-radius: 2px;
    margin-left: 2px;
    width: calc((var(--end) - var(--start) + 1) / 7 * 100% - 4px);
    padding-left: 4px;
    font-size: .95rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.scheduler > .month > .week > .appointments > .appointment.new-appointment {
    top: 30px;
    z-index: 1;
    box-shadow: 3px 6px 6px rgb(0 0 0 / 50%);
    background-color: var(--new-appointment-color);
}
.scheduler > .month > .week > .appointments > .appointment-timed {
    background-color: var(--background-color);
    width: calc(100% / 7 - 4px);
}
.scheduler > .month > .week > .appointments > .appointment-timed.new-appointment {
    border: 1px solid #eee;
}
.scheduler > .month > .week > .appointments > .appointment > .dot {
    --size: 7px;
    display: inline-block;
    width: var(--size);
    height: var(--size);
    line-height: 1rem;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 50%;
    background-color: red;
}

.scheduler-loader,
.scheduler-loader:after {
    border-radius: 50%;
    width: var(--size);
    height: var(--size);
}

.scheduler-loader {
    --size: 25px;
    --color1: #666;
    --color2: #ccc;
    border-top: calc(var(--size)/10) solid var(--color1);
    border-right: calc(var(--size)/10) solid var(--color2);
    border-bottom: calc(var(--size)/10) solid var(--color2);
    border-left: calc(var(--size)/10) solid var(--color2);
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation: scheduler-loader-anim 1.1s infinite linear;
    animation: scheduler-loader-anim 1.1s infinite linear;
}

@-webkit-keyframes scheduler-loader-anim {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes scheduler-loader-anim {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}


@media only screen and (max-width: 550px) {
    .scheduler > .month > .week.header > .day-of-month > .full-dayname {
        display: none;
    }
    .scheduler > .month > .week.header > .day-of-month > .short-dayname {
        display: initial;
    }
}

/* View switcher (default header, right of the actions row) */
.scheduler > .header > .actions > .actions-right > .view-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}
.scheduler > .header > .actions > .actions-right > .view-switcher > .view-switcher-label {
    color: #5d6678;
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
}
.scheduler > .header > .actions > .actions-right > .view-switcher > .view-select {
    appearance: none;
    font: inherit;
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.2;
    padding: .45rem 2.2rem .45rem .8rem;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background-color: white;
    color: #1f2937;
    cursor: pointer;
    box-shadow: 0 1px 2px rgb(16 24 40 / 5%);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6678' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    background-size: 1em;
}
.scheduler > .header > .actions > .actions-right > .view-switcher > .view-select:hover {
    border-color: #b8c0cc;
    background-color: #f8fafc;
}
.scheduler > .header > .actions > .actions-right > .view-switcher > .view-select:focus-visible {
    outline: 2px solid var(--theme-color, #4f8ef7);
    outline-offset: 1px;
    border-color: var(--theme-color, #4f8ef7);
}
.scheduler > .header > .actions > .actions-right > .view-switcher > .view-select:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Week view */
.scheduler > .week-view {
    display: flex;
    flex-direction: column;
    overflow: auto;
    max-height: 100%;
}

.scheduler > .week-view > .week-day-header {
    display: grid;
    grid-template-columns: 3.5rem repeat(7, 1fr);
    border-bottom: 1px solid #eee;
    background-color: white;
}
.scheduler > .week-view > .week-day-header > .day-header {
    text-align: center;
    padding: 4px 0;
    border-left: 1px solid #eee;
}
.scheduler > .week-view > .week-day-header > .day-header > .day-name {
    display: block;
    font-size: .75rem;
    font-weight: bold;
}
.scheduler > .week-view > .week-day-header > .day-header > .day-number {
    display: inline-block;
    border-radius: 50%;
    min-width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    font-size: .9rem;
}
.scheduler > .week-view > .week-day-header > .day-header > .day-number.today {
    background-color: var(--theme-color);
}

.scheduler > .week-view > .all-day-strip {
    position: relative;
    min-height: calc(var(--rows, 0) * 1.5rem + 12px);
    border-bottom: 1px solid #eee;
}
.scheduler > .week-view > .all-day-strip > .appointment {
    position: absolute;
    left: calc(var(--start) / 7 * 100%);
    top: calc(6px + (var(--order) - 1) * 1.5rem);
    border-radius: 2px;
    margin-left: 2px;
    width: calc((var(--end) - var(--start) + 1) / 7 * 100% - 4px);
    padding-left: 4px;
    font-size: .95rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.scheduler > .week-view > .all-day-strip > .scheduler-overflow {
    z-index: 1;
}

.scheduler > .week-view > .time-grid {
    display: grid;
    grid-template-columns: 3.5rem repeat(7, 1fr);
    grid-template-rows: repeat(var(--hour-count), var(--hour-height));
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(var(--hour-height) - 1px),
        #eee calc(var(--hour-height) - 1px),
        #eee var(--hour-height));
}
.scheduler > .week-view > .time-grid > .hour-label {
    grid-column: 1;
    background-color: white;
    text-align: right;
    padding-right: 6px;
    font-size: .75rem;
    color: #888;
    line-height: var(--hour-height);
}
.scheduler > .week-view > .time-grid > .day-column {
    grid-row: 1 / -1;
    position: relative;
    border-left: 1px solid #eee;
}
.scheduler > .week-view > .time-grid > .day-column.today {
    background-color: #fafafa;
}
.scheduler > .week-view > .time-grid > .day-column > .appointment.timed {
    position: absolute;
    top: var(--top);
    height: var(--height);
    left: calc(var(--slot) / var(--maxSlots) * 100% + 2px);
    width: calc(100% / var(--maxSlots) - 4px);
    box-sizing: border-box;
    border: 1px solid rgb(0 0 0 / 10%);
    border-radius: 2px;
    padding-left: 4px;
    font-size: .95rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.scheduler > .week-view > .time-grid > .day-column > .appointment.timed.new-appointment {
    z-index: 2;
}
.scheduler > .week-view > .time-grid > .day-column > .scheduler-overflow {
    position: absolute;
    bottom: 4px;
    left: 2px;
    z-index: 1;
}

/* Week-view overflow chips get a visible chip treatment (the base .scheduler-overflow is transparent). */
.scheduler > .week-view .scheduler-overflow {
    background-color: #f4f6f8;
    border: 1px solid #d8dde3;
    border-radius: 2px;
    font-size: .85rem;
    padding: 0 4px;
}

