/*
 * Viipo admin calendar
 * Mobile-first: wider breakpoints only add columns.
 */

#viipo-calendar-wrap {
    --agenda-purple: #7438E8;
    --agenda-ink: #242033;
    --agenda-muted: #777184;
    --agenda-border: #EAE6F0;
    --agenda-surface: #FFFFFF;
    --agenda-active: #F3EBFF;
    color: var(--agenda-ink);
    font-family: var(--viipo-admin-font, Manrope, sans-serif);
    margin-inline: auto;
    max-width: 1180px;
}

#viipo-calendar-wrap :is(button, input, select) { font: inherit; }

/* Initial page load: show the final layout only after controls have mounted. */
body.viipo-admin-app #viipo-calendar-wrap.viipo-calendar--initializing { position: relative; }
body.viipo-admin-app #viipo-calendar-wrap.viipo-calendar--initializing > * { visibility: hidden; }
body.viipo-admin-app #viipo-calendar-wrap.viipo-calendar--initializing::before {
    animation: viipo-admin-spinner-appear .16s ease-out 180ms forwards,
        viipo-admin-spinner-spin .7s linear 180ms infinite;
    border: 2px solid rgba(145, 50, 199, .18);
    border-radius: 50%;
    border-top-color: var(--viipo-shell-purple, #9132c7);
    box-sizing: border-box;
    content: "";
    height: 22px;
    left: calc(50% - 11px);
    opacity: 0;
    position: absolute;
    top: 48px;
    width: 22px;
    z-index: 2;
}

/* Filters */
.viipo-calendar-custom-wrapper {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 22px 0 18px;
}

.viipo-calendar-filter--employee,
.viipo-calendar-week-field,
.viipo-calendar-custom-wrapper > .viipo-calendar-view-picker,
.viipo-calendar-custom-wrapper > .viipo-add-new-button { grid-column: 1 / -1; }

.viipo-calendar-filter {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.viipo-calendar-filter[hidden],
.viipo-calendar-week-control[hidden],
.viipo-calendar-weekdays[hidden] { display: none; }

.viipo-calendar-filter__label {
    color: var(--agenda-ink);
    font-size: var(--viipo-admin-font-label, 13px);
    font-weight: 650;
}

.viipo-calendar-select-wrap,
.viipo-employee-filter { min-width: 0; width: 100%; }

.viipo-calendar-select--native {
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.viipo-employee-filter { position: relative; }

.viipo-employee-filter__trigger,
.viipo-calendar-date-control,
.viipo-calendar-week-control {
    background: var(--agenda-surface);
    border: 1px solid var(--agenda-border);
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
    min-height: 48px;
}

.viipo-employee-filter__trigger {
    align-items: center;
    color: var(--agenda-ink);
    cursor: pointer;
    display: grid;
    gap: 5px;
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    padding: 6px 10px;
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

.viipo-employee-filter__trigger:hover,
.viipo-calendar-date-control:hover { border-color: #BDA7F6; }

.viipo-employee-filter__trigger:focus-visible,
.viipo-employee-filter__trigger[aria-expanded="true"],
.viipo-calendar-date-control:focus-within {
    border-color: var(--agenda-purple);
    box-shadow: 0 0 0 3px rgba(116, 56, 232, .16);
    outline: 0;
}

.viipo-employee-filter__label {
    font-weight: 620;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viipo-employee-filter__chevron,
.viipo-calendar-view-picker__chevron {
    color: var(--agenda-muted);
    display: grid;
    place-items: center;
}

.viipo-employee-filter__chevron svg,
.viipo-calendar-view-picker__chevron svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 18px;
}

.viipo-employee-filter__trigger[aria-expanded="true"] .viipo-employee-filter__chevron {
    transform: rotate(180deg);
}

.viipo-employee-avatar,
.viipo-employee-filter__group-icon {
    border-radius: 50%;
    height: 32px;
    width: 32px;
}

.viipo-employee-avatar { object-fit: cover; }

.viipo-employee-filter__group-icon {
    background: var(--agenda-active);
    color: var(--agenda-purple);
    display: grid;
    place-items: center;
}

.viipo-employee-filter__group-icon svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 18px;
}

.viipo-employee-filter__menu,
.viipo-calendar-view-picker__menu {
    background: var(--agenda-surface);
    border: 1px solid var(--agenda-border);
    box-shadow: 0 14px 32px rgba(35, 25, 41, .16);
    position: absolute;
    z-index: 20;
}

.viipo-employee-filter__menu {
    border-radius: 15px;
    left: 0;
    max-height: 310px;
    overflow: auto;
    padding: 6px;
    right: 0;
    top: calc(100% + 8px);
}

.viipo-employee-filter__menu[hidden],
.viipo-calendar-view-picker__menu[hidden] { display: none; }

.viipo-employee-filter__option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--agenda-ink);
    cursor: pointer;
    display: grid;
    gap: 5px;
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    min-height: 46px;
    padding: 6px 8px;
    text-align: left;
    width: 100%;
}

.viipo-employee-filter__option:hover,
.viipo-employee-filter__option:focus-visible { background: #F8F7FA; outline: 0; }
.viipo-employee-filter__option[aria-selected="true"] { background: var(--agenda-active); color: var(--agenda-ink); font-weight: 650; }
.viipo-employee-filter__check { color: var(--agenda-purple); text-align: center; visibility: hidden; }
.viipo-employee-filter__option[aria-selected="true"] .viipo-employee-filter__check { visibility: visible; }

.viipo-calendar-date-control {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 0 12px;
}

.viipo-calendar-date-control input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--agenda-ink);
    height: 46px;
    min-width: 0;
    padding: 0;
    width: 100%;
}

.viipo-calendar-date-control input:focus { outline: 0; }
.viipo-calendar-filter--date .viipo-admin-date-field__calendar { border-radius: 8px; }

.viipo-add-new-button {
    align-items: center;
    background: #7438E8;
    border-radius: 11px;
    box-shadow: 0 10px 22px rgba(116, 56, 232, .18);
    color: #fff !important;
    display: inline-flex;
    font-size: 16px;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    text-decoration: none;
    white-space: nowrap;
    gap: 5px;
}
.viipo-add-new-button:hover,
.viipo-add-new-button:focus-visible { background: #6230C8; color: #fff !important; }

.viipo-add-new-button > span { font-size: 22px; line-height: 1; }

/* Hero view switch */
#viipo-calendar-wrap .viipo-admin-hero {
    align-items: flex-start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
}

#viipo-calendar-wrap .viipo-calendar-hero__copy { min-width: 0; }
#viipo-calendar-wrap .viipo-calendar-hero__copy :is(h1, p) { margin-inline: 0; }

.viipo-calendar-view-picker {
    align-items: center;
    background: var(--agenda-surface);
    border: 1px solid var(--agenda-border);
    border-radius: 12px;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 106px;
    inline-size: 106px;
    justify-self: start;
    padding: 3px;
    position: relative;
}

.viipo-calendar-view-picker__trigger {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--agenda-muted);
    cursor: pointer;
    display: grid;
    gap: 2px;
    grid-template-columns: 48px minmax(0, 1fr) 40px;
    min-height: 42px;
    padding: 0;
    width: 100%;
}

.viipo-calendar-view-picker__trigger:hover,
.viipo-calendar-view-picker__trigger:focus-visible { background: var(--agenda-active); color: var(--agenda-purple); outline: 0; }
.viipo-calendar-view-picker__trigger:focus-visible { box-shadow: 0 0 0 3px rgba(116, 56, 232, .16); }
.viipo-calendar-view-picker__field-label { display: none; }

.viipo-calendar-view-picker__icon {
    background: var(--agenda-active);
    border-radius: 8px;
    color: var(--agenda-purple);
    display: grid;
    height: 42px;
    place-items: center;
    width: 48px;
}

.viipo-calendar-view-picker__icon svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 17px;
}

.viipo-calendar-view-picker__label {
    color: var(--agenda-ink);
    font-size: var(--viipo-admin-font-body, 15px);
    font-weight: 600;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viipo-calendar-view-picker__chevron { height: 42px; width: 48px; }

.viipo-calendar-view-picker__menu {
    border-radius: 16px;
    min-width: 260px;
    padding: 10px;
    right: 0;
    top: calc(100% + 10px);
}

.viipo-calendar-view-picker__option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 11px;
    color: var(--agenda-ink);
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    justify-content: space-between;
    min-height: 50px;
    padding: 8px 14px;
    text-align: left;
    width: 100%;
}

.viipo-calendar-view-picker__option:hover,
.viipo-calendar-view-picker__option:focus-visible,
.viipo-calendar-view-picker__option[aria-selected="true"] { background: #f5edf9; color: #67208e; outline: 0; }
.viipo-calendar-view-picker__option[aria-selected="true"]::after { content: "✓"; font-size: 20px; }

/* The mobile switch sits at the left edge, so its menu opens into the viewport. */
@media (max-width: 600px) {
    .viipo-calendar-view-picker {
        background: transparent;
        border: 0;
        flex-basis: 100%;
        inline-size: 100%;
        border-radius: 0;
        display: grid;
        gap: 6px;
        justify-self: stretch;
        padding: 0;
    }

    .viipo-calendar-custom-wrapper .viipo-add-new-button {
        margin-top: 10px;
    }

    .viipo-calendar-view-picker__field-label {
        color: #554d5b;
        display: block;
        font-size: var(--viipo-admin-font-label, 13px);
        font-weight: 650;
    }

    .viipo-calendar-view-picker__label {
        color: #3d3544;
    }

    .viipo-calendar-view-picker__trigger {
        background: var(--viipo-admin-control-bg, #fbfafc);
        border: 1px solid var(--viipo-admin-control-border, #dcd5df);
        border-radius: 12px;
        grid-template-columns: 32px minmax(0, 1fr) 18px;
        align-items: center;
        min-height: 48px;
        gap: 10px;
        padding: 6px 10px;
    }

    .viipo-calendar-view-picker__trigger:hover {
        background: var(--viipo-admin-control-bg, #fbfafc);
        border-color: #c8b7d0;
    }

    .viipo-calendar-view-picker__icon {
        background: #f3e9f8;
        border-radius: 50%;
        height: 32px;
        width: 32px;
    }

    .viipo-calendar-view-picker__icon svg {
        height: 18px;
        width: 18px;
    }

    .viipo-calendar-view-picker__chevron {
        height: 32px;
        width: 18px;
    }

    .viipo-calendar-view-picker__menu {
        left: 0;
        min-width: 0;
        right: 0;
        width: auto;
    }
}

/* Week navigation */
.viipo-calendar-week-control {
    align-items: center;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
}

.viipo-calendar-week-control__button {
    align-self: stretch;
    background: transparent;
    border: 0;
    color: var(--agenda-purple);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.viipo-calendar-week-control__button:first-child { border-radius: 12px 0 0 12px; }
.viipo-calendar-week-control__button:last-child { border-radius: 0 12px 12px 0; }
.viipo-calendar-week-control__button:hover,
.viipo-calendar-week-control__button:focus-visible { background: var(--agenda-active); outline: 0; }

.viipo-calendar-week-control__button svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    width: 18px;
}

.viipo-calendar-week-control__button--previous svg { transform: rotate(90deg); }
.viipo-calendar-week-control__button--next svg { transform: rotate(-90deg); }

.viipo-calendar-week-control__label {
    align-items: center;
    display: flex;
    font-size: var(--viipo-admin-font-body, 15px);
    justify-content: center;
    min-width: 0;
    white-space: nowrap;
}

.viipo-calendar-week-control__calendar {
    color: var(--agenda-purple);
    display: grid;
    flex: 0 0 36px;
    height: 36px;
    place-items: center;
    width: 36px;
}

.viipo-calendar-weekdays {
    display: grid;
    gap: 8px;
    grid-auto-columns: minmax(104px, 1fr);
    grid-auto-flow: column;
    margin: 0 0 18px;
    overflow-x: auto;
    padding: 10px 12px 10px 0;
    scrollbar-width: none;
    overflow-y: visible;
    overflow-x: auto;
}

.viipo-calendar-weekdays::-webkit-scrollbar { display: none; }

.viipo-calendar-weekdays__day {
    align-items: center;
    background: var(--agenda-surface);
    border: 1px solid var(--agenda-border);
    border-radius: 12px;
    color: #332d38;
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 5px;
    justify-content: center;
    min-height: 88px;
    padding: 12px 16px;
    position: relative;
}

.viipo-calendar-weekdays__day:hover,
.viipo-calendar-weekdays__day:focus-visible { background: #F8F7FA; border-color: #BDA7F6; outline: 0; }
.viipo-calendar-weekdays__day.is-active { background: var(--agenda-active); border-color: var(--agenda-purple); border-width: 2px; }
.viipo-calendar-weekdays__weekday { font-size: var(--viipo-admin-font-body, 15px); font-weight: 700; }
.viipo-calendar-weekdays__date { color: var(--agenda-muted); font-size: var(--viipo-admin-font-body, 15px); font-weight: 600; }
.viipo-calendar-weekdays__count { 
    align-items: center; background: #e9e2ee; border-radius: 50%; color: #665a6c; display: inline-flex; font-size: 12px; font-weight: 700; height: 22px; justify-content: center; position: absolute; right: -8px; top: -9px; width: 22px; 
}
.viipo-calendar-weekdays__day.is-active .viipo-calendar-weekdays__count { background: var(--agenda-purple); color: #fff; }
.viipo-calendar-weekdays__day.is-active :is(.viipo-calendar-weekdays__weekday, .viipo-calendar-weekdays__date) { color: var(--agenda-purple); }
.viipo-calendar-weekdays__status { align-items: center; background: #ffe5e8; border-radius: 50%; color: #ed202c; display: inline-flex; height: 22px; justify-content: center; position: absolute; right: -10px; top: -10px; width: 22px; }
.viipo-calendar-weekdays__status svg { fill: none; height: 13px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; width: 13px; }
.viipo-calendar-weekdays__day.is-closed,
.viipo-calendar-weekdays__day.is-closed:hover,
.viipo-calendar-weekdays__day.is-closed:focus-visible {
    --weekday-status-ink: #74667d;
    background: repeating-linear-gradient(-45deg, #faf9fc 0 4px, #f0edf4 4px 5px);
}
.viipo-calendar-weekdays__day.is-exception,
.viipo-calendar-weekdays__day.is-exception:hover,
.viipo-calendar-weekdays__day.is-exception:focus-visible {
    --weekday-status-ink: #976516;
    background: #fff5df;
}
.viipo-calendar-weekdays__day:is(.is-closed, .is-exception) :is(.viipo-calendar-weekdays__weekday, .viipo-calendar-weekdays__date) { color: var(--weekday-status-ink); }
.viipo-calendar-weekdays__day.is-closed .viipo-calendar-weekdays__status { background: #f0edf4; color: #74667d; }
.viipo-calendar-weekdays__day.is-exception .viipo-calendar-weekdays__status { background: #fff4dc; color: #976516; }
.viipo-calendar-weekdays__day.is-employee-off .viipo-calendar-weekdays__status { background: #fff0d1; color: #ed8a00; }

/* Agenda */
.viipo-calendar-wrapper {
    background: #fff;
    border: 1px solid var(--agenda-border);
    border-radius: 16px;
    padding: 20px;
}

.viipo-calendar-loader { min-height: 220px; padding: 6px 0 0; }
.viipo-calendar-loader.is-hidden { display: none; }
.viipo-calendar-loader__skeleton { display: grid; gap: 10px; }
.viipo-calendar-loader__heading,
.viipo-calendar-loader__row { background: #f3eef5; display: block; overflow: hidden; position: relative; }
.viipo-calendar-loader__heading { border-radius: 7px; height: 20px; margin: 3px 4px 0; width: 180px; }
.viipo-calendar-loader__heading--short { margin-top: 13px; width: 145px; }
.viipo-calendar-loader__row { background: #faf8fb; border: 1px solid #f0eaf2; border-radius: 13px; height: 76px; }
.viipo-calendar-loader__heading::after,
.viipo-calendar-loader__row::after { animation: viipo-agenda-shimmer 1.25s ease-in-out infinite; background: linear-gradient(90deg, transparent, rgba(255,255,255,.82), transparent); content: ""; inset: 0; position: absolute; transform: translateX(-100%); }
.viipo-calendar-wrapper[aria-busy="true"] #viipo-bookings-agenda { display: none; }

.viipo-agenda-day + .viipo-agenda-day { margin-top: 20px; }
.employee-calendar-view .viipo-agenda-day + .viipo-agenda-day { margin-top: 0px; }
.viipo-agenda-day__header { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin: 0 4px 8px; margin-bottom: 10px; }
.viipo-agenda-day__header h2 { color: var(--agenda-ink); font-size: 18px; font-weight: 600 !important; margin: 0; text-transform: capitalize; }
.viipo-agenda-day__count { background: #f6f0fa; border-radius: 999px; color: #685c70; font-size: 11px; font-weight: 650; padding: 5px 9px; white-space: nowrap; }
#viipo-bookings-agenda:not(.employee-calendar-view) .viipo-agenda-day__header { align-items: flex-start; }
.viipo-agenda-day__heading { min-width: 0; }
.viipo-agenda-day__shop-hours { align-items: baseline; color: #756b7d; display: flex; flex-wrap: wrap; font-size: 13px; gap: 6px; line-height: 1.35; margin-top: 5px; }
.viipo-agenda-day__shop-hours strong { color: #302936; font-weight: 650; }
.viipo-agenda-day__rows { background: #fff; border: 1px solid var(--agenda-border); border-radius: 13px; overflow: hidden; }

.viipo-agenda-row {
    align-items: center;
    border-bottom: 1px solid #f1edf3;
    color: #413948;
    display: grid;
    gap: 3px 10px;
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 76px;
    padding: 12px;
    text-align: left;
    text-decoration: none;
}

.viipo-agenda-row:last-child { border-bottom: 0; }
.viipo-agenda-row--booking { cursor: pointer; }
.viipo-agenda-row--booking.viipo-booking-row { align-items: start; gap: 8px 12px; grid-template-columns: minmax(0, 1fr) max-content; min-height: 66px; padding: 14px; }
.viipo-agenda-row--booking .viipo-agenda-row__time { grid-column: 1; grid-row: 1; min-width: 0; }
.viipo-agenda-row--booking .viipo-agenda-row__content { grid-column: 1; grid-row: 2; min-width: 0; }
.viipo-agenda-row--booking .viipo-agenda-row__employee { align-self: center; grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; justify-self: end; min-width: max-content; }
.viipo-agenda-row--booking:hover,
.viipo-agenda-row--booking:focus-visible { background: #fcf9fd; outline: 0; }
.viipo-agenda-row__time { color: #62586a; font-size: 12px; font-weight: 600; grid-column: 2; }
.viipo-agenda-row__dot,
.viipo-agenda-row__break-icon,
.viipo-agenda-row__work-icon { grid-column: 1; grid-row: 2; justify-self: center; }
.viipo-agenda-row__dot { background: var(--agenda-purple); border-radius: 50%; height: 9px; width: 9px; }
.viipo-agenda-row__break-icon { color: #a66d15; }
.viipo-agenda-row__content { display: grid; gap: 2px; grid-column: 2; grid-row: 2; min-width: 0; }
.viipo-agenda-row__content strong { align-items: center; color: #302936; display: flex; flex-wrap: wrap; font-size: 14px; gap: 8px; }
.viipo-agenda-row__content > span,
.viipo-agenda-row__employee { color: var(--agenda-muted); font-size: 12px; }
.viipo-agenda-row__employee { grid-column: 2; grid-row: 3; padding-left: 0; }
.viipo-agenda-row__employee:not(:empty) { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.viipo-agenda-row__employee .viipo-employee-avatar { height: 28px; width: 28px; }
.viipo-agenda-row__employee .viipo-agenda-row__employee-name { overflow: visible; text-overflow: clip; white-space: nowrap; }
.viipo-agenda-row__employee.viipo-booking-row__employee { overflow: visible; }
.viipo-booking-row__employee > .viipo-booking-any-employee { overflow: visible; }
.viipo-booking-row__details > .viipo-booking-any-employee { justify-self: start; width: fit-content; }
.viipo-booking-any-employee { align-items: center; background: #f4ebfa; border: 0; border-radius: 999px; color: #7b2ca5; cursor: pointer; display: inline-flex; flex: 0 0 auto; font-family: inherit; font-size: 11px; font-weight: 700; gap: 6px; line-height: 1.2; padding: 8px 12px; white-space: nowrap; }
.viipo-booking-any-employee svg { fill: none; flex: 0 0 18px; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; width: 18px; }
.viipo-booking-row__customer { align-items: center; align-self: center; color: #554c5c; display: flex; font-size: 12px; gap: 9px; grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; justify-self: end; min-width: max-content; }
.viipo-booking-row__customer-avatar { align-items: center; background: #eee8f1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(70,51,80,.07); color: #7b2ca5; display: inline-flex; flex: 0 0 32px; height: 32px; justify-content: center; width: 32px; }
.viipo-booking-row__customer-avatar svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 17px; }
.viipo-booking-row__customer-name { flex: 0 0 auto; overflow: visible; text-overflow: clip; white-space: nowrap; }

@media (max-width: 500px) {
    .viipo-agenda-row--booking .viipo-agenda-row__employee { gap: 4px; }
    .viipo-booking-any-employee { border-radius: 50%; display: grid; height: 32px; padding: 0; place-content: center; width: 32px; }
    .viipo-booking-any-employee__text { display: none; }
    body.viipo-admin-app #viipo-bookings-agenda .viipo-booking-any-employee svg { flex-basis: 15px; height: 15px; width: 15px; }
}
.viipo-agenda-row__status { background: #fde9e8; border-radius: 999px; color: #b4322b; font-size: 10px; font-weight: 700; padding: 3px 7px; }
.viipo-agenda-row__status--noshow { background: #fff1d9; color: #9a5a08; }
.viipo-booking-any-employee-tooltip { background: #29242f; border-radius: 7px; box-shadow: 0 5px 14px rgba(31,24,35,.2); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; max-width: calc(100vw - 16px); padding: 6px 9px; pointer-events: none; position: fixed; transform: translate(-50%, -100%); white-space: nowrap; z-index: 100; }
.viipo-agenda-row--work { background: #f8eeff;}
.viipo-agenda-row--work .viipo-agenda-row__work-icon { color: var(--agenda-purple); }
.viipo-agenda-row--work .viipo-agenda-row__work-icon svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 17px; }
.viipo-agenda-row--work .viipo-agenda-row__content strong { color: #514657; }

.viipo-agenda-day-off { align-items: center; background: #f6f7fa; color: #69758a; display: flex; gap: 11px; padding: 15px 18px; }
.viipo-agenda-day-off--vacation { background: #f1faf5; }
.viipo-agenda-day-off__icon { border: 2px solid #8797b4; border-radius: 50%; height: 9px; width: 9px; }
.viipo-agenda-day-off--vacation .viipo-agenda-day-off__icon { border-color: #58a27a; }
.viipo-agenda-day-off__copy { display: grid; gap: 2px; }
.viipo-agenda-day-off__copy strong { color: #50617e; font-size: 13px; }
.viipo-agenda-day-off__copy > span { font-size: 12px; }

.viipo-agenda-empty,
.viipo-agenda-error { background: #fcfbfd; color: var(--agenda-muted); display: grid; justify-items: center; min-height: auto; padding: 24px 16px; place-content: center; text-align: center; }
.viipo-agenda-empty { border: 0; }
.viipo-agenda-empty__icon { background: #f1e7f6; border-radius: 12px; color: var(--agenda-purple); display: grid; height: 42px; margin-bottom: 5px; place-items: center; width: 42px; }
.viipo-agenda-empty__icon svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; width: 22px; }
.viipo-agenda-empty strong { color: #4b4251; font-size: 15px; }
.viipo-agenda-empty p { margin: 5px 0 0; }
.viipo-calendar-day-notice { align-items: center; background: linear-gradient(115deg, #fffbfb, #fff5f6); border: 0; border-radius: 12px; color: #ee2f39; display: grid; justify-items: center; margin: 10px; min-height: auto; padding: 30px 20px; place-content: center; text-align: center; }
.viipo-calendar-day-notice__icon { align-items: center; background: #ffe5e8; border-radius: 12px; display: grid; height: 42px; margin-bottom: 5px; place-items: center; width: 42px; }
.viipo-calendar-day-notice__icon svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; width: 22px; }
.viipo-calendar-day-notice__copy { display: grid; justify-items: center; }
.viipo-calendar-day-notice__copy strong { color: #171126; font-size: 15px; }
.viipo-calendar-day-notice__copy span { color: #716a83; margin-top: 5px; }
.viipo-calendar-day-notice--closed { background: repeating-linear-gradient(-45deg, #faf9fc 0 4px, #f0edf4 4px 5px); color: #74667d; }
.viipo-calendar-day-notice--closed .viipo-calendar-day-notice__icon { background: #f0edf4; }
.viipo-calendar-day-notice--exception { background: #fff5df; color: #976516; }
.viipo-calendar-day-notice--exception .viipo-calendar-day-notice__icon { background: #fff4dc; }
.viipo-calendar-day-notice--employee_off { background: linear-gradient(115deg, #fffdf8, #fff7e9); color: #ed8a00; }
.viipo-calendar-day-notice--employee_off .viipo-calendar-day-notice__icon { background: #fff0d1; }

@keyframes viipo-agenda-shimmer { to { transform: translateX(100%); } }

@media (min-width: 601px) {
    #viipo-calendar-wrap .viipo-admin-hero { align-items: flex-end; gap: 24px; grid-template-columns: minmax(0, 1fr) auto; }
    .viipo-calendar-view-picker { justify-self: end; }
    .viipo-calendar-view-picker__trigger { grid-template-columns: 48px 48px; }
    .viipo-calendar-view-picker__label { display: none; }
    .viipo-calendar-custom-wrapper { align-items: end; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .viipo-add-new-button { align-self: end; }
    .viipo-calendar-weekdays { grid-auto-columns: minmax(112px, 1fr); }
    .viipo-calendar-wrapper { padding: 20px 22px 28px; }
    .viipo-calendar-loader { min-height: 250px; }
    .viipo-calendar-loader__row { height: 66px; }
    .viipo-agenda-row { grid-template-columns: 112px 20px minmax(180px, 1fr) max-content; gap: 12px; min-height: 66px; padding: 10px 16px; }
    .viipo-agenda-row__time { grid-column: 1; grid-row: auto; }
    .viipo-agenda-row__dot,
    .viipo-agenda-row__break-icon,
    .viipo-agenda-row__work-icon { grid-column: 2; grid-row: auto; }
    .viipo-agenda-row__content { grid-column: 3; grid-row: auto; }
    .viipo-agenda-row__employee { grid-column: 4; grid-row: auto; justify-content: flex-end; }
}

@media (max-width: 690px) {
    .viipo-agenda-row--booking.viipo-booking-row { min-height: 0; }
    .viipo-agenda-row--booking .viipo-agenda-row__time { padding-right: 0; }
    .viipo-agenda-row--booking .viipo-agenda-row__content { margin-left: 0; }
    .viipo-agenda-row--booking .viipo-agenda-row__employee { min-width: 0; }
}

@media (min-width: 1120px) {
    .viipo-calendar-custom-wrapper { grid-template-columns: minmax(220px, 1.35fr) minmax(160px, 1fr) minmax(160px, 1fr) auto; }
    .viipo-calendar-custom-wrapper.is-week-view { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .viipo-calendar-filter--employee,
    .viipo-calendar-week-field,
    .viipo-calendar-custom-wrapper > .viipo-calendar-view-picker,
    .viipo-calendar-custom-wrapper > .viipo-add-new-button { grid-column: auto; }
    .viipo-calendar-weekdays { grid-auto-columns: minmax(0, 1fr); grid-template-columns: repeat(var(--viipo-week-days, 7), minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    body.viipo-admin-app #viipo-calendar-wrap.viipo-calendar--initializing::before { animation: viipo-admin-spinner-appear .16s ease-out 180ms forwards; }
    .viipo-calendar-loader__heading::after,
    .viipo-calendar-loader__row::after { animation: none; }
}

/* Workday, break and day-off entries follow the booking-row proportions. */
.viipo-agenda-row--work,
.viipo-agenda-row--break,
.viipo-agenda-row--day-off,
.viipo-agenda-row--vacation {
    align-items: start;
    background: #f8f4fb;
    border: 0;
    gap: 0 1rem;
    grid-template-columns: minmax(0, 1fr) max-content;
    min-height: 66px;
    padding: 14px;
}

.viipo-agenda-row--break { background: #fdf9f1; border-left: 3px solid #ffcdaf; }
.viipo-agenda-row--day-off,
.viipo-agenda-row--vacation { background: #f1f6fd; }

.viipo-agenda-row--work .viipo-agenda-row__time,
.viipo-agenda-row--break .viipo-agenda-row__time,
.viipo-agenda-row--day-off .viipo-agenda-row__time,
.viipo-agenda-row--vacation .viipo-agenda-row__time {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding: 0;
}

.viipo-agenda-row--work .viipo-agenda-row__content,
.viipo-agenda-row--break .viipo-agenda-row__content,
.viipo-agenda-row--day-off .viipo-agenda-row__content,
.viipo-agenda-row--vacation .viipo-agenda-row__content {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
}

.viipo-agenda-row--work .viipo-agenda-row__employee,
.viipo-agenda-row--break .viipo-agenda-row__employee,
.viipo-agenda-row--day-off .viipo-agenda-row__employee,
.viipo-agenda-row--vacation .viipo-agenda-row__employee { display: none; }

@media (max-width: 690px) {
    .viipo-agenda-row--work,
    .viipo-agenda-row--break,
    .viipo-agenda-row--day-off,
    .viipo-agenda-row--vacation { min-height: 0; }
}

/* A selected employee gets a compact daily schedule summary. Booking rows retain their shared presentation. */
#viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day {
    background: #fff;
    padding: 16px;
    padding-left: 0;
    padding-right: 0;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day:first-child { margin-top: 0; padding-top: 0;}
#viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__header { margin: 0 0 5px; }
#viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__rows {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__header h2 {
    font-weight: 600;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule {
    align-items: center;
    color: #756b7d;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 5px;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-bookings {
    background: #fff;
    border: 1px solid var(--agenda-border);
    border-radius: 13px;
    margin-top: 5px;
    overflow: hidden;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-bookings .viipo-agenda-row--booking.viipo-booking-row {
    align-content: start;
    border: 0;
    border-bottom: 1px solid #f1edf3;
    border-radius: 0;
    grid-auto-rows: min-content;
    padding-block: var(--viipo-list-row-padding, 16px);
    margin-top: 0;
    row-gap: 2px;
    min-height: auto;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-bookings .viipo-agenda-row--booking.viipo-booking-row:last-child {
    border-bottom: 0;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-booking-row__details > .viipo-booking-any-employee {
    display: inline-flex;
    font-size: 10px;
    gap: 6px;
    height: auto;
    padding: 5px 7px;
    margin-top: 5px;
    place-content: initial;
    width: auto;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-booking-row__details > .viipo-booking-any-employee .viipo-booking-any-employee__text {
    display: inline;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-booking-row__details > .viipo-booking-any-employee svg {
    flex-basis: 15px;
    height: 15px;
    width: 15px;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__item {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__item > span { font-size: 13px; }
#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__item strong { color: #302936; font-size: 13px; }
#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__separator { background: #ded6e7; height: 20px; width: 1px; }

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off {
    align-items: center;
    background: #fff8e9;
    border-radius: 10px;
    color: #9a6815;
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    margin-top: 10px;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off--closed {
    background: #f3f4f6;
    color: #61656d;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off--empty {
    background: #f8f4fb;
    color: #76518b;
    margin-top: 5px;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off--empty .viipo-employee-agenda-day-off__icon {
    background: #eee4f7;
    color: #8436ad;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off--empty .viipo-employee-agenda-day-off__copy > span {
    color: #7c6c86;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off--closed .viipo-employee-agenda-day-off__icon {
    background: #e5e7eb;
    color: #626873;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off--closed .viipo-employee-agenda-day-off__copy > span {
    color: #737983;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off__icon {
    align-items: center;
    background: #fff0cf;
    border-radius: 10px;
    color: #e38b00;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off__icon svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 22px; }
#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off__copy { display: grid; gap: 3px; }
#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off__copy strong { color: #302936; font-size: 14px; }
#viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-day-off__copy > span { color: #8a7450; font-size: 13px; }

@media (max-width: 690px) {
    #viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day { border-radius: 13px; padding: 14px;padding-left: 0;
    padding-right: 0; }
    #viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__header { align-items: center; flex-wrap: wrap; }
}

@media (max-width: 690px) {
    #viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule {
        align-items: center;
        flex-wrap: nowrap;
        gap: 7px;
    }

    #viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__item {
        flex: 0 1 auto;
        gap: 4px;
        min-width: 0;
        white-space: nowrap;
    }

    #viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__item > span,
    #viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__item strong {
        font-size: 12px;
    }

    #viipo-bookings-agenda.employee-calendar-view .viipo-employee-agenda-schedule__separator {
        display: block;
        flex: 0 0 1px;
        height: 18px;
    }
}

@media (max-width: 500px) {
    #viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day {
        display: grid;
    }

    #viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__header {
        display: contents;
    }

    #viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__header h2 {
        grid-row: 1;
        margin-bottom: 5px;
    }

    #viipo-bookings-agenda.employee-calendar-view .viipo-agenda-day__rows {
        grid-row: 2;
    }

}

@media (max-width: 1120px) {

    body.viipo-admin-app #viipo-calendar-wrap .viipo-calendar-custom-wrapper > .viipo-add-new-button {
        bottom: calc(10px + env(safe-area-inset-bottom) + var(--viipo-calendar-floating-keyboard-offset, 0px));
        box-sizing: border-box;
        box-shadow: 0 10px 24px rgba(107, 48, 151, .24);
        left: var(--viipo-calendar-floating-left, 20px);
        position: fixed;
        right: auto;
        width: var(--viipo-calendar-floating-width, calc(100vw - 40px));
        z-index: 1000;
    }
}

@media (max-width: 600px) {
    body.viipo-admin-app #viipo-calendar-wrap .viipo-calendar-custom-wrapper > .viipo-add-new-button {
        bottom: calc(14px + env(safe-area-inset-bottom) + var(--viipo-calendar-floating-keyboard-offset, 0px));
    }

    body.viipo-admin-app #viipo-calendar-wrap.wrap {
        padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    }
}

/* Subtle feedback for passive real-time calendar updates. */
@keyframes viipo-calendar-row-enter {
    from { background-color: #f5e9ff; opacity: 0; transform: translateY(5px); }
    to { background-color: transparent; opacity: 1; transform: translateY(0); }
}
@keyframes viipo-calendar-day-change {
    0%, 100% { background-color: #fff; }
    40% { background-color: #fcf7ff; }
}
.viipo-agenda-row--booking.viipo-realtime-enter { animation: viipo-calendar-row-enter .32s ease-out both; }
.viipo-agenda-day.viipo-realtime-day-change .viipo-agenda-day__rows { animation: viipo-calendar-day-change .48s ease-out both; }

@media (prefers-reduced-motion: reduce) {
    .viipo-agenda-row--booking.viipo-realtime-enter,
    .viipo-agenda-row--booking.viipo-realtime-update,
    .viipo-agenda-day.viipo-realtime-day-change .viipo-agenda-day__rows { animation: none; }
}

/* The week layout removes wrapper padding. During a refresh its old grid is
   still present under the skeleton, so restore an inset for loading UI. */
.viipo-calendar-wrapper:has(.viipo-week-calendar)[aria-busy="true"] { padding: 20px; }
@keyframes viipo-calendar-day-leave {
    to { max-height: 0; margin-top: 0; opacity: 0; transform: translateY(-4px); }
}
.viipo-agenda-day.viipo-realtime-day-leave { animation: viipo-calendar-day-leave .22s ease-in both; max-height: 1200px; overflow: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .viipo-agenda-day.viipo-realtime-day-leave { animation: none; }
}

/* Time-grid week view ----------------------------------------------------- */
#viipo-bookings-agenda:has(.viipo-week-calendar) { min-width: 0; }
.viipo-calendar-wrapper:has(.viipo-week-calendar) { max-height: none; overflow: visible; padding: 0; }
.viipo-calendar-wrapper:has(.viipo-week-calendar) #viipo-bookings-agenda { min-height: min-content; }
.viipo-week-calendar {
    /* Favour a readable, full-height timetable over a nested scrollbar. */
    --viipo-week-minute-height: 1.42px;
    --viipo-week-axis-width: 58px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-width: 760px;
    /* The weekday header needs the page scroll container as its sticky
       ancestor. Clipping this element made position: sticky inert. */
    overflow: visible;
}
.viipo-week-calendar__header,
.viipo-week-calendar__body { display: grid; grid-template-columns: var(--viipo-week-axis-width) repeat(var(--viipo-week-days, 7), minmax(0, 1fr)); }
.viipo-week-calendar__body { padding: 16px 0 24px; padding-top: 0;}
.viipo-week-calendar__header { background: var(--agenda-surface); border-radius: 13px 13px 0 0; overflow: clip; position: sticky; top: 0; z-index: 10; }
.viipo-week-calendar__corner { border-right: 1px solid var(--agenda-border); min-height: 54px; }
.viipo-week-calendar__day-heading { align-items: center; border-right: 1px solid var(--agenda-border); color: var(--agenda-ink); display: flex; font-size: 13px; font-weight: 700; justify-content: center; min-height: 54px; padding: 0 8px; text-align: center; }
.viipo-week-calendar__day-heading:last-child { border-right: 0; }
.viipo-week-calendar__day-heading.is-today { color: var(--agenda-purple); }
.viipo-week-calendar__axis { background: var(--agenda-surface); border-right: 1px solid var(--agenda-border); min-height: calc(var(--viipo-week-minutes) * var(--viipo-week-minute-height)); position: relative; }
.viipo-week-calendar__axis > span { color: var(--agenda-muted); font-size: 12px; line-height: 1; position: absolute; right: 10px; transform: translateY(-50%); }
.viipo-week-calendar__axis > span:first-child { transform: translateY(1px); }
.viipo-week-calendar__axis > span:last-child { transform: translateY(-100%); }
.viipo-week-calendar__day { background: var(--agenda-surface); border-right: 1px solid var(--agenda-border); min-height: calc(var(--viipo-week-minutes) * var(--viipo-week-minute-height)); position: relative; }
.viipo-week-calendar__day:last-child { border-right: 0; }
.viipo-week-calendar__grid { inset: 0; pointer-events: none; position: absolute; }
.viipo-week-calendar__hour-line { border-top: 1px solid var(--agenda-border); display: block; left: 0; position: absolute; right: 0; }
.viipo-week-calendar__closed { align-content: start; align-items: center; background: repeating-linear-gradient(-45deg, #FAF9FC 0 4px, #F0EDF4 4px 5px); color: #777184; display: grid; inset: 0; justify-items: center; min-width: 0; padding: 20px 6px; position: absolute; text-align: center; z-index: 1; }
.viipo-week-calendar__closed svg { fill: none; height: 28px; margin-bottom: 4px; stroke: #777184; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; width: 28px; }
.viipo-week-calendar__closed strong { color: #777184; font-size: clamp(9px, 1.3vw, 13px); max-width: 100%; overflow-wrap: anywhere; }
.viipo-week-calendar__employee-off { align-content: start; align-items: center; background: repeating-linear-gradient(-45deg, rgba(128,96,42,.025) 0 4px, rgba(128,96,42,.08) 4px 5px); color: #756c79; display: grid; inset: 0; justify-items: center; min-width: 0; padding: 20px 6px; pointer-events: none; position: absolute; text-align: center; z-index: 1; }
.viipo-week-calendar__employee-off svg { fill: none; height: 27px; margin-bottom: 4px; stroke: #9a7428; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; width: 27px; }
.viipo-week-calendar__employee-off strong { color: #69521f; font-size: clamp(9px, 1.3vw, 13px); max-width: 100%; overflow-wrap: anywhere; }
.viipo-week-booking-card,
.viipo-week-group-card { place-content: flex-start; border: 0; box-sizing: border-box; cursor: pointer; min-width: 0; overflow: hidden; position: absolute; text-align: left; z-index: 2; }
.viipo-week-booking-card { background: var(--viipo-week-soft); border: 0; border-left: 0 !important; border-radius: 8px; color: #26212c; display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); padding: 7px 7px 6px 9px; transition: box-shadow .16s ease, transform .16s ease; }
.viipo-week-booking-card:hover,
.viipo-week-booking-card:focus-visible { box-shadow: 0 8px 18px color-mix(in srgb, var(--viipo-week-accent) 22%, transparent); outline: 2px solid color-mix(in srgb, var(--viipo-week-accent) 50%, white); outline-offset: 1px; transform: translateY(-1px); z-index: 3; }
.viipo-week-booking-card__time { color: #62586a; font-size: 10px; grid-column: 1 / -1; line-height: 1.2; white-space: nowrap; }
.viipo-week-booking-card strong { display: -webkit-box; font-size: 12px; font-weight: 700; grid-column: 1; line-height: 1.2; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.viipo-week-booking-card__customer { color: #655c69; font-size: 10px; grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viipo-week-booking-card__employee-meta { align-items: center; align-self: center; display: inline-flex; gap: 3px; grid-column: 2; grid-row: 2 / 4; }
.viipo-week-booking-card__employee { align-items: center; background: color-mix(in srgb, var(--viipo-week-accent) 16%, white); border-radius: 50%; color: var(--viipo-week-accent); display: inline-flex; font-size: 9px; font-weight: 800; height: 25px; justify-content: center; letter-spacing: -.02em; width: 25px; }
.viipo-week-booking-card.is-short { gap: 1px; grid-template-rows: auto minmax(0, 1fr); padding: 5px 6px 4px 8px; }
.viipo-week-booking-card.is-short strong { font-size: 11px; line-height: 1.15; }
.viipo-week-booking-card.is-short .viipo-week-booking-card__customer { display: none; }
.viipo-week-booking-card.is-short .viipo-week-booking-card__employee-meta { grid-row: 2; }
.viipo-week-booking-card.is-short .viipo-week-booking-card__employee { height: 23px; width: 23px; }
.viipo-week-booking-card__any { align-items: center; background: rgba(255,255,255,.88); border-radius: 50%; color: #702a91; display: inline-flex; flex: 0 0 16px; height: 16px; justify-content: center; width: 16px; }
.viipo-week-booking-card__any svg { fill: none; height: 10px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.15; width: 10px; }
.viipo-week-booking-card.is-short .viipo-week-booking-card__any { flex-basis: 14px; height: 14px; width: 14px; }
.viipo-week-break-card { align-items: center; background: repeating-linear-gradient(-45deg, rgba(96,82,108,.09) 0 4px, rgba(96,82,108,.14) 4px 5px); border: 0; box-sizing: border-box; color: #625767; display: flex; font-size: 10px; font-weight: 700; justify-content: center; left: 1px; overflow: hidden; position: absolute; right: 1px; text-align: center; z-index: 2; }
.viipo-week-group-card { background: linear-gradient(135deg, #f5eaff, #efddfb); border-radius: 9px; color: #372440; display: grid; gap: 5px; left: 4px; padding: 10px 10px 8px; right: 4px; transition: box-shadow .16s ease, transform .16s ease; }
.viipo-week-group-card:hover,
.viipo-week-group-card:focus-visible { box-shadow: 0 10px 22px rgba(130,41,180,.22); outline: 2px solid rgba(145,50,199,.4); outline-offset: 1px; transform: translateY(-1px); z-index: 3; }
.viipo-week-group-card__time { color: #72527d; font-size: 11px; }
.viipo-week-group-card__initials { display: flex; flex-wrap: nowrap; padding-left: 1px; }
.viipo-week-group-card__initials > span { align-items: center; background: var(--viipo-week-soft, #fff); border: 1px solid #fff; border-radius: 50%; color: var(--viipo-week-accent, #802ab3); display: inline-flex; font-size: 9px; font-weight: 800; height: 26px; justify-content: center; margin-left: -5px; width: 26px; }
.viipo-week-group-card__initials > span:first-child { margin-left: 0; }
.viipo-week-group-card__initials .viipo-week-group-card__more { --viipo-week-accent: #6c4a7c; --viipo-week-soft: #fff; font-size: 10px; }
.viipo-week-group-card__count { color: #4d3657; font-size: 11px; font-weight: 650; line-height: 1.25; }
.viipo-calendar-booking-group { align-items: center; display: flex; inset: 0; justify-content: center; opacity: 0; padding: 22px; position: fixed; transition: opacity .18s ease; visibility: hidden; z-index: 100020; }
.viipo-calendar-booking-group.is-open { opacity: 1; visibility: visible; }
.viipo-calendar-booking-group__backdrop { background: rgba(28,22,33,.48); border: 0; inset: 0; position: absolute; }
.viipo-calendar-booking-group__dialog { max-height: 90vh !important; background: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(23,15,29,.3); display: grid; gap: 14px; max-width: 390px; overflow: auto; padding: 24px; position: relative; transform: translateY(12px); transition: transform .18s ease; width: min(100%, 390px); }
.viipo-calendar-booking-group.is-open .viipo-calendar-booking-group__dialog { transform: translateY(0); }
.viipo-calendar-booking-group__header { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
.viipo-calendar-booking-group__header strong { color: #25202a; display: block; font-size: 17px; line-height: 1.3; }
.viipo-calendar-booking-group__header span { color: #756b7d; display: block; font-size: 13px; margin-top: 4px; }
.viipo-calendar-booking-group__close { align-items: center; background: #f6f0fa; border: 0; border-radius: 50%; color: #6f288f; cursor: pointer; display: inline-flex; flex: 0 0 38px; height: 38px; justify-content: center; width: 38px; }
.viipo-calendar-booking-group__close:hover,
.viipo-calendar-booking-group__close:focus-visible { background: #ead8f5; outline: 2px solid rgba(145,50,199,.35); outline-offset: 2px; }
.viipo-calendar-booking-group__close svg,
.viipo-calendar-booking-group__more svg { fill: none; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.9; width: 20px; }
.viipo-calendar-booking-group__list { display: grid; gap: 8px; }
.viipo-calendar-booking-group__booking { align-items: center; background: #fff; border: 1px solid #ebe4ef; border-radius: 12px; color: #2d2632; cursor: pointer; display: grid; gap: 10px; grid-template-columns: 42px minmax(0, 1fr) 26px; padding: 9px; text-align: left; width: 100%; }
.viipo-calendar-booking-group__booking.without-employee { grid-template-columns: minmax(0, 1fr) 26px; }
.viipo-calendar-booking-group__booking.is-readonly { cursor: default; grid-template-columns: 42px minmax(0, 1fr); }
.viipo-calendar-booking-group__booking.is-readonly.without-employee { grid-template-columns: minmax(0, 1fr); }
.viipo-calendar-booking-group__booking:hover,
.viipo-calendar-booking-group__booking:focus-visible { background: #fbf7fd; border-color: #d6c3e4; outline: 0; }
.viipo-calendar-booking-group__employee { align-items: center; align-self: start; background: var(--viipo-week-soft); border-radius: 50%; color: var(--viipo-week-accent); display: inline-flex; font-size: 12px; font-weight: 800; height: 38px; justify-content: center; width: 38px; }
.viipo-calendar-booking-group__booking-copy { display: grid; gap: 2px; min-width: 0; }
.viipo-calendar-booking-group__time { color: #796e80; font-size: 11px; }
.viipo-calendar-booking-group__booking-copy strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viipo-calendar-booking-group__customer { color: #766b7c; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viipo-calendar-booking-group__employee-name { color: #554c5c; font-size: 12px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; }
/* Same Kuka tahansa pill as the list view. It is a span here because the
   surrounding booking row is already the interactive button. */
.viipo-calendar-booking-group__any { justify-self: start; margin-top: 5px; }
.viipo-calendar-booking-group__more { color: #6d6372; display: grid; place-items: center; }
.viipo-calendar-booking-group__add { align-items: center; background: linear-gradient(135deg, #9132c7, #747fd0); border-radius: 9px; color: #fff !important; display: flex; font-size: 14px; font-weight: 700; justify-content: center; min-height: 48px; padding: 0 12px; text-decoration: none; transition: box-shadow .16s ease, transform .16s ease; }
.viipo-calendar-booking-group__add:hover,
.viipo-calendar-booking-group__add:focus-visible { box-shadow: 0 10px 22px rgba(125,43,167,.26); color: #fff !important; outline: 0; transform: translateY(-1px); }

@media (max-width: 900px) {
    .viipo-calendar-wrapper:has(.viipo-week-calendar) { overflow: visible; padding: 0; }
    #viipo-bookings-agenda:has(.viipo-week-calendar) { -webkit-overflow-scrolling: touch; }
}
/* Keep every day visible on tablets as well. The normal desktop minimum
   widths would otherwise force the last weekday columns outside the viewport. */
@media (max-width: 960px) {
    .viipo-week-calendar { --viipo-week-axis-width: 46px; min-width: 0; width: 100%; }
    .viipo-week-calendar__header,
    .viipo-week-calendar__body { grid-template-columns: var(--viipo-week-axis-width) repeat(var(--viipo-week-days, 7), minmax(0, 1fr)); }
    .viipo-week-calendar__day-heading { font-size: 11px; min-height: 50px; padding: 0 2px; }
    .viipo-week-booking-card { padding: 6px 4px 5px 6px; }
    .viipo-week-booking-card__employee-meta { gap: 2px; }
}
@media (max-width: 760px) {
    .viipo-week-calendar { --viipo-week-axis-width: 40px; }
    .viipo-week-calendar__day-heading { font-size: 10px; min-height: 48px; }
    .viipo-week-calendar__axis > span { font-size: 11px; right: 5px; }
    .viipo-week-booking-card { gap: 1px; padding: 5px 3px 4px 5px; }
    .viipo-week-booking-card__time { font-size: 9px; }
    .viipo-week-booking-card strong { font-size: 10px; line-height: 1.15; }
    .viipo-week-booking-card__customer { display: none; }
    .viipo-week-booking-card__employee { font-size: 8px; height: 20px; width: 20px; }
    .viipo-week-booking-card.is-short .viipo-week-booking-card__employee { height: 20px; width: 20px; }
}
@media (max-width: 600px) {
    .viipo-calendar-wrapper:has(.viipo-week-calendar) { background: transparent; border: 0; border-radius: 0; margin-inline: -16px; max-height: none; overflow: visible; padding: 0; }
    #viipo-bookings-agenda:has(.viipo-week-calendar) { -webkit-overflow-scrolling: touch; display: block; max-width: 100vw; overflow: visible; overscroll-behavior: contain; padding: 0 16px 14px; scrollbar-color: #cdb6dc transparent; scrollbar-width: thin; touch-action: pan-x pan-y; }
    .viipo-week-calendar { --viipo-week-axis-width: 36px; --viipo-week-minute-height: 1.52px; min-width: 0; width: 100%; }
    .viipo-week-calendar__header,
    .viipo-week-calendar__body { grid-template-columns: var(--viipo-week-axis-width) repeat(var(--viipo-week-days, 7), minmax(0, 1fr)); }
    .viipo-week-calendar__corner,
    .viipo-week-calendar__axis { box-shadow: 5px 0 10px rgba(39,29,46,.06); left: 0; position: sticky; z-index: 5; }
    .viipo-week-calendar__corner { background: #fff; z-index: 6; }
    .viipo-week-calendar__day-heading { font-size: 9px; line-height: 1.2; min-height: 46px; padding: 0 1px; }
    .viipo-week-calendar__axis > span { font-size: 10px; right: 4px; }
    .viipo-week-booking-card { gap: 2px; padding: 6px 3px 5px 5px; }
    .viipo-week-booking-card strong { font-size: 9.5px; line-height: 1.2; }
    .viipo-week-booking-card__time { font-size: 8.5px; }
    .viipo-week-booking-card__customer { display: none; }
    .viipo-week-booking-card__employee-meta { gap: 1px; }
    .viipo-week-booking-card__employee { font-size: 7px; height: 17px; width: 17px; }
    .viipo-week-booking-card.is-short .viipo-week-booking-card__employee { height: 17px; width: 17px; }
    .viipo-week-booking-card__any { flex-basis: 12px; height: 12px; width: 12px; }
    .viipo-week-booking-card__any svg { height: 8px; width: 8px; }
    .viipo-week-group-card { gap: 3px; padding: 7px 4px; }
    .viipo-week-group-card__initials > span { font-size: 8px; height: 20px; width: 20px; }
    .viipo-week-group-card__count { font-size: 9px; }
    .viipo-calendar-booking-group { padding: 12px; }
    .viipo-calendar-booking-group__dialog { border-radius: 18px; max-height: min(78dvh, 700px); max-width: 420px; padding: 18px; transform: translateY(12px); width: 100%; }
    .viipo-calendar-booking-group.is-open .viipo-calendar-booking-group__dialog { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .viipo-week-booking-card,
    .viipo-week-group-card,
    .viipo-calendar-booking-group__add,
    .viipo-calendar-booking-group,
    .viipo-calendar-booking-group__dialog { transition: none; }
}

/* Personal calendar presentation; all availability data remains unchanged. */
.viipo-calendar-settings-trigger,
.viipo-calendar-settings button {
    background: #fff; border: 1px solid #e5dfee; border-radius: 10px; color: #30253e; cursor: pointer; font: inherit; padding: 10px 16px;
}
.viipo-calendar-settings-trigger { align-self: center; font-size: 14px; white-space: nowrap; }
.viipo-calendar-settings {
    background: #fff; border: 1px solid #ece7f2; border-radius: 20px; box-shadow: 0 24px 80px #24143833;
    box-sizing: border-box; color: #292332; font-family: var(--viipo-admin-font, Manrope, sans-serif); font-size: 14px;
    line-height: 1.5; margin: auto; max-height: 92dvh; max-width: calc(100vw - 32px); overflow: auto; padding: 26px; width: 1120px;
}
.viipo-calendar-settings::backdrop { background: #251d3c66; }
.viipo-calendar-settings *, .viipo-calendar-settings *::before, .viipo-calendar-settings *::after { box-sizing: border-box; }
.viipo-calendar-settings__header { align-items: flex-start; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 24px; }
.viipo-calendar-settings h2 { font-size: 24px; line-height: 1.3; margin: 0 0 5px; }
.viipo-calendar-settings h3 { font-size: 16px; margin: 0 0 4px; }
.viipo-calendar-settings p { color: #7b7287; font-size: 13px; margin: 0 0 12px; }
.viipo-calendar-settings .viipo-calendar-settings__close { background: #f4edff; border: 0; border-radius: 50%; color: var(--viipo-shell-purple, #9132c7); font-size: 24px; line-height: 1; padding: 8px 12px; }
.viipo-calendar-settings__layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.viipo-calendar-settings__fields { align-content: start; display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.viipo-calendar-settings fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
.viipo-calendar-settings legend { color: #30253e; font-size: 14px; font-weight: 700; margin-bottom: 10px; padding: 0; }
.viipo-calendar-settings__choice { align-items: flex-start; cursor: pointer; display: flex; gap: 8px; margin: 8px 0; overflow-wrap: anywhere; }
.viipo-calendar-settings input[type='checkbox'], .viipo-calendar-settings input[type='radio'] { accent-color: var(--viipo-shell-purple, #9132c7); flex: 0 0 17px; height: 17px; margin: 2px 0 0; width: 17px; }
.viipo-calendar-settings__employees { background: #faf8fd; border-radius: 8px; margin-top: 12px; max-height: 160px; overflow: auto; padding: 6px 12px; }
.viipo-calendar-settings [hidden] { display: none !important; }
.viipo-calendar-settings__preview { align-self: start; background: #fcfbfe; border: 1px solid #ece7f2; border-radius: 12px; min-width: 0; padding: 14px; }
.viipo-calendar-settings__surface { display: grid; gap: 6px; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
.viipo-calendar-settings__surface.is-list { grid-auto-flow: row; }
.viipo-calendar-settings__day { border: 1px solid #ece7f2; border-radius: 6px; min-width: 0; padding: 5px; }
.viipo-calendar-settings__day h4 { font-size: 11px; margin: 3px 0 10px; text-align: center; }
.viipo-calendar-preview-card { background: var(--viipo-week-soft); border-left: 2px solid var(--viipo-week-accent); border-radius: 6px; display: grid; gap: 2px; margin-bottom: 8px; padding: 8px; }
.viipo-calendar-detail { display: block; font-size: 10px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.viipo-calendar-detail--service { font-size: 12px; font-weight: 700; }
.viipo-calendar-detail--time { color: #62586a; font-size: 10px; }
.viipo-calendar-detail--duration { color: #62586a; font-size: 11px; }
.viipo-calendar-preview-notice { background: #f0edf4; border-radius: 5px; color: #756b80; font-size: 10px; margin: 6px 0; padding: 8px 4px; text-align: center; }
.viipo-calendar-settings__footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.viipo-calendar-settings__footer button:first-child { margin-right: auto; }
.viipo-calendar-settings button.is-primary { background: var(--viipo-shell-purple, #9132c7); border-color: var(--viipo-shell-purple, #9132c7); color: #fff; }
.viipo-calendar-settings button:hover, .viipo-calendar-settings-trigger:hover { filter: brightness(.97); }
.viipo-calendar-settings :focus-visible, .viipo-calendar-settings-trigger:focus-visible { outline: 2px solid var(--viipo-shell-purple, #9132c7); outline-offset: 3px; }
.viipo-calendar-settings .viipo-calendar-settings__error { color: #a32638; margin: 16px 0 0; }
.viipo-calendar-settings__error:empty { display: none; }
.viipo-week-calendar[data-density='compact'] { --viipo-week-minute-height: 1.05px; }
.viipo-week-calendar[data-density='normal'] { --viipo-week-minute-height: 1.65px; }
.viipo-week-calendar[data-density='roomy'] { --viipo-week-minute-height: 2.35px; }
.viipo-week-booking-card:has(.viipo-calendar-detail) { display: flex; flex-direction: column; gap: 2px; }
.viipo-week-booking-card .viipo-calendar-detail { flex-shrink: 0; }
.viipo-week-booking-card .viipo-calendar-detail--employee { color: #655c69; }
.viipo-calendar-styled-row { background: var(--viipo-week-soft) !important; border-left: 3px solid var(--viipo-week-accent) !important; }
[data-density='compact'] .viipo-calendar-styled-row { padding-block: 8px; }
[data-density='roomy'] .viipo-calendar-styled-row { padding-block: 24px; }
[data-density='compact'] .viipo-calendar-preview-card { gap: 1px; margin-bottom: 4px; padding: 4px; }
[data-density='roomy'] .viipo-calendar-preview-card { gap: 5px; margin-bottom: 12px; padding: 12px 8px; }
@media (max-width: 900px) {
    .viipo-calendar-settings__layout { grid-template-columns: minmax(0, 1fr); }
    .viipo-calendar-settings__preview { width: 100%; }
}
@media (max-width: 540px) {
    .viipo-calendar-settings { max-height: 94dvh; max-width: calc(100vw - 16px); padding: 18px; }
    .viipo-calendar-settings__fields { grid-template-columns: minmax(0, 1fr); }
    .viipo-calendar-settings__footer { flex-direction: column; }
    .viipo-calendar-settings__footer button:first-child { margin-right: 0; }
    .viipo-calendar-settings h2 { font-size: 21px; }
}
.viipo-calendar-settings input[type='checkbox'], .viipo-calendar-settings input[type='radio'] { appearance: auto; }
.viipo-calendar-settings input::before { display: none !important; }
.viipo-calendar-settings__surface { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 480px; overflow: auto; }
.viipo-calendar-settings__surface.is-list { grid-template-columns: minmax(0, 1fr); }
.viipo-calendar-settings__day:last-child:nth-child(3) { grid-column: 1 / -1; }
#viipo-calendar-wrap .viipo-admin-hero { flex-wrap: wrap; }
.viipo-week-calendar { min-width: 0; }
.viipo-calendar-settings fieldset:has(input[name='calendar-view']),
.viipo-calendar-settings fieldset:has(input[name='calendar-density']) { align-content: start; display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.viipo-calendar-settings fieldset:has(input[name='calendar-density']) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.viipo-calendar-settings fieldset:has(input[name='calendar-view']) .viipo-calendar-settings__choice,
.viipo-calendar-settings fieldset:has(input[name='calendar-density']) .viipo-calendar-settings__choice { align-items: center; border: 1px solid #e5dfee; border-radius: 10px; flex-direction: column; margin: 0; padding: 16px 6px; text-align: center; }
.viipo-calendar-settings__choice:has(input:checked) { color: var(--viipo-shell-purple, #9132c7); }
.viipo-calendar-settings fieldset:has(input[name='calendar-view']) .viipo-calendar-settings__choice:has(input:checked),
.viipo-calendar-settings fieldset:has(input[name='calendar-density']) .viipo-calendar-settings__choice:has(input:checked) { background: #f8f4ff; border-color: var(--viipo-shell-purple, #9132c7); }

/* Keep metadata compact, while the grid scales to the selected detail rows. */
.viipo-calendar-detail-header { align-items: baseline; display: flex; flex: 0 0 auto; gap: 5px; margin-bottom: 5px; justify-content: space-between; min-width: 0; }
.viipo-calendar-detail-header .viipo-calendar-detail { font-size: 10px; white-space: nowrap; }
.viipo-calendar-detail-header .viipo-calendar-detail--duration { flex-shrink: 0; }
.viipo-week-booking-card:has(.viipo-calendar-detail) { gap: 1px; padding: 5px 6px; }
.viipo-week-booking-card .viipo-calendar-detail--customer,
.viipo-week-booking-card .viipo-calendar-detail--employee { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viipo-week-booking-card .viipo-calendar-detail--service { line-height: 1.2; }
.viipo-week-group-card { align-content: start; column-gap: 5px; grid-template-columns: auto minmax(0, 1fr); padding: 6px; row-gap: 4px; }
.viipo-week-group-card__time { grid-column: 1 / -1; }
.viipo-week-group-card__count { align-self: center; }
.viipo-week-booking-card:focus-visible,
.viipo-week-booking-card:hover { height: auto !important; min-height: var(--viipo-card-height); overflow: visible; z-index: 12; }
.viipo-week-booking-card:focus-visible .viipo-calendar-detail,
.viipo-week-booking-card:hover .viipo-calendar-detail { display: block; overflow: visible; white-space: normal; -webkit-line-clamp: unset; }

/* Measure wrapped contents instead of guessing a fixed number of text rows. */
.viipo-week-booking-card .viipo-calendar-detail,
.viipo-week-booking-card:hover .viipo-calendar-detail,
.viipo-week-booking-card:focus-visible .viipo-calendar-detail { display: block; overflow: visible; text-overflow: clip; white-space: normal; -webkit-line-clamp: unset; }
.viipo-calendar-detail--employee,
.viipo-agenda-row__employee-name,
.viipo-calendar-booking-group__employee-name { font-weight: 600; }
.viipo-calendar-detail-header { flex-wrap: wrap; }
.viipo-calendar-detail--employee:has(.viipo-calendar-any-icon) { align-items: flex-start; display: flex !important; gap: 4px; }
.viipo-calendar-detail--employee > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.viipo-calendar-any-icon { display: inline-flex; flex: 0 0 14px; height: 14px; }
.viipo-calendar-any-icon svg { fill: none; height: 14px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 14px; }
.viipo-calendar-booking-group .viipo-calendar-detail--employee:has(.viipo-calendar-any-icon) { align-items: center; gap: 6px; }
.viipo-calendar-booking-group .viipo-calendar-any-icon { align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: #f4ebfa; color: #7b2ca5; }
.viipo-calendar-booking-group .viipo-calendar-any-icon svg { width: 12px; height: 12px; }
.viipo-week-group-card__initials > span { flex-shrink: 0; overflow: hidden; }
.viipo-week-group-card__avatar { display: block; height: 100%; object-fit: cover; width: 100%; }
.viipo-week-group-card { grid-template-columns: minmax(0, 1fr); }
.viipo-week-group-card__time { overflow-wrap: anywhere; }
#viipo-bookings-agenda:has(.viipo-week-calendar) { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.viipo-week-calendar { min-width: calc(var(--viipo-week-axis-width) + var(--viipo-week-days, 7) * 128px); }
#viipo-calendar-wrap .viipo-calendar-settings-trigger { align-items: center; background: #fff; border: 1px solid #e5dfee; border-radius: 12px; color: var(--viipo-shell-purple, #9132c7); display: inline-flex; flex: 0 0 auto; gap: 9px; justify-content: center; justify-self: end; min-height: 44px; padding: 10px 16px; width: auto; }
.viipo-calendar-settings-trigger__icon { display: inline-flex; }
.viipo-calendar-settings-trigger__icon svg { fill: none; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 20px; }
#viipo-calendar-wrap .viipo-calendar-settings-trigger:hover { background: #f8f4ff; border-color: #cbb6ed; }
.viipo-week-booking-card:hover,
.viipo-week-booking-card:focus-visible { height: max(1px, calc(var(--viipo-card-height) - 2px)) !important; }
@media (min-width: 601px) {
    #viipo-calendar-wrap .viipo-admin-hero { grid-template-columns: minmax(0, 1fr) auto auto; }
}
.viipo-agenda-row__employee .viipo-booking-any-employee,
.viipo-calendar-detail--employee .viipo-booking-any-employee { flex: 0 0 auto; padding: 3px; }
.viipo-agenda-row__employee .viipo-booking-any-employee__text,
.viipo-calendar-detail--employee .viipo-booking-any-employee__text { display: none; }
.viipo-calendar-detail--employee:has(.viipo-booking-any-employee) { align-items: center; display: flex; gap: 4px; }
.viipo-agenda-row__employee-name { overflow-wrap: anywhere; white-space: normal; }

/* Desktop settings should fit as one surface, including the action buttons. */
@media (min-width: 901px) {
    .viipo-calendar-settings { max-height: calc(100dvh - 24px); padding: 20px 24px; width: 1240px; }
    .viipo-calendar-settings__header { margin-bottom: 16px; }
    .viipo-calendar-settings__header p { margin-bottom: 0; }
    .viipo-calendar-settings__layout { gap: 20px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
    .viipo-calendar-settings__fields { column-count: 2; column-gap: 22px; display: block; }
    .viipo-calendar-settings fieldset { break-inside: avoid; margin-bottom: 16px; }
    .viipo-calendar-settings legend { margin-bottom: 6px; }
    .viipo-calendar-settings__choice { margin-block: 5px; }
    .viipo-calendar-settings fieldset:has(input[name='calendar-view']) .viipo-calendar-settings__choice,
    .viipo-calendar-settings fieldset:has(input[name='calendar-density']) .viipo-calendar-settings__choice { padding-block: 10px; }
    .viipo-calendar-settings__employees { display: grid; gap: 2px 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; max-height: 180px; padding: 6px 8px; }
    .viipo-calendar-settings__employees .viipo-calendar-settings__choice { font-size: 12px; }
    .viipo-calendar-settings__preview { padding: 12px; }
    .viipo-calendar-settings__surface { max-height: none; overflow: visible; }
    .viipo-calendar-settings__footer { margin-top: 14px; }
    .viipo-calendar-settings__day h4 { margin-bottom: 6px; }
    .viipo-calendar-preview-notice { margin-block: 4px; padding-block: 5px; }
}

/* Explicit columns keep every fieldset and its legend visible in all browsers. */
.viipo-calendar-settings__fields { column-count: auto; display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.viipo-calendar-settings__column { display: grid; align-content: start; gap: 14px; min-width: 0; }
.viipo-calendar-settings__column fieldset { margin: 0; }
@media (max-width: 540px) {
    .viipo-calendar-settings__fields { grid-template-columns: minmax(0, 1fr); }
}
.viipo-calendar-settings__surface.is-month { display: block; }
.viipo-month-calendar { display: grid; gap: 6px; grid-template-columns: repeat(var(--viipo-month-columns, 7), minmax(0, 1fr)); width: 100%; }
.viipo-month-calendar__weekday { font-size: 12px; font-weight: 600; padding: 5px; text-align: center; }
.viipo-month-calendar__day { align-content: start; background: #fff; border: 1px solid #e9e2f0; border-radius: 8px; color: #30253e; display: grid; gap: 5px; min-width: 0; min-height: 95px; padding: 9px; text-align: left; overflow-wrap: anywhere; }
button.viipo-month-calendar__day { cursor: pointer; font: inherit; }
button.viipo-month-calendar__day:hover { background: #f8f3ff; border-color: #7438e8; }
button.viipo-month-calendar__day:focus-visible { outline: 2px solid #7438e8; outline-offset: 1px; }
.viipo-month-calendar__day.is-empty { background: #faf9fc; border-color: transparent; }
.viipo-month-calendar__count, .viipo-month-calendar__day small { font-size: 11px; }
.viipo-month-calendar__markers { display: flex; flex-wrap: wrap; gap: 3px; }
.viipo-month-calendar__markers i { border-radius: 50%; height: 5px; width: 5px; }
@media (max-width: 600px) {
    .viipo-month-calendar { gap: 3px; }
    .viipo-month-calendar__day { min-height: 80px; padding: 4px; }
    .viipo-month-calendar__count { font-size: 9px; }
}
.viipo-calendar-settings fieldset:has(input[name='calendar-view']) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.viipo-month-calendar__day.is-closed, .viipo-calendar-booking-group__status.is-closed { --day-accent: #74667d; --day-surface: #f0edf4; }
.viipo-month-calendar__day.is-exception, .viipo-calendar-booking-group__status.is-exception { --day-accent: #976516; --day-surface: #fff4dc; }
.viipo-month-calendar__day.is-vacation, .viipo-calendar-booking-group__status.is-vacation { --day-accent: #7438e8; --day-surface: #f1e9ff; }
.viipo-month-calendar__day.is-off, .viipo-calendar-booking-group__status.is-off { --day-accent: #287b88; --day-surface: #e9f5f6; }
.viipo-month-calendar__day:has(.viipo-month-calendar__status) { background: var(--day-surface); border-top: 3px solid var(--day-accent); }
.viipo-month-calendar__status { color: var(--day-accent); font-weight: 600; }
.viipo-calendar-detail.viipo-calendar-detail--employee { margin-top: 5px; }
.viipo-calendar-booking-group__status { background: var(--day-surface); border-left: 3px solid var(--day-accent); border-radius: 6px; color: var(--day-accent); margin: 0; padding: 10px; }
.viipo-calendar-booking-group__booking-copy > .viipo-agenda-row__status { display: inline-flex; font-size: 10px; font-weight: 700; justify-self: start; line-height: 1.2; margin-top: 5px; padding: 5px 7px; width: fit-content; }

/* Calendar preferences: grouped controls and a calendar-shaped live preview. */
.viipo-calendar-settings--redesigned { width: 1110px; padding: 22px 18px 0; border-radius: 16px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__header { padding: 0 28px; margin-bottom: 16px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.viipo-calendar-settings__section { border: 1px solid #ece5f7; border-radius: 9px; padding: 14px 18px; min-width: 0; }
.viipo-calendar-settings__section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; position: relative; padding-left: 34px; }
.viipo-calendar-settings__section-heading h3 { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 700; }
.viipo-calendar-settings__section-heading p { font-size: 12px; color: #80778e; margin: 0; }
.viipo-calendar-settings__number { position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(140deg,var(--viipo-shell-purple, #9132c7),var(--viipo-shell-purple, #9132c7)); color: white; display: grid; place-items: center; font-size: 16px; }
.viipo-calendar-settings__section-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; padding-left: 34px; }
.viipo-calendar-settings__section:first-child .viipo-calendar-settings__section-body { grid-template-columns: minmax(0,1fr); gap: 12px; }
.viipo-calendar-settings--redesigned fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.viipo-calendar-settings--redesigned legend { font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__choice { font-size: 12px; margin: 5px 0; gap: 9px; }
.viipo-calendar-settings--redesigned fieldset:has(input[name='calendar-view']) .viipo-calendar-settings__choice { flex-direction: row; justify-content: center; padding: 9px 6px; margin: 0; }
.viipo-calendar-settings--redesigned fieldset:has(input[name='calendar-density']) .viipo-calendar-settings__choice { padding: 10px 4px; margin: 0; gap: 4px; }
.viipo-calendar-settings--redesigned fieldset:has(input[name='calendar-view']) input,
.viipo-calendar-settings--redesigned fieldset:has(input[name='calendar-density']) input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__choice:has(input:focus-visible) { outline: 2px solid var(--viipo-shell-purple, #9132c7); outline-offset: 2px; }
.viipo-calendar-settings__option-icon { display: inline-flex; }
.viipo-calendar-settings__option-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.viipo-calendar-settings--redesigned fieldset:has(input[name='calendar-density']) svg { width: 24px; height: 24px; stroke-width: 3; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__employee-select { width: 100%; max-width: none; min-height: 39px; border: 1px solid #e8e0f2; border-radius: 7px; background-color: white; color: #292139; font: inherit; font-size: 13px; padding: 7px 12px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__employees[hidden] { display: none; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input { appearance: none; -webkit-appearance: none; width: 34px; height: 19px; border: 0; border-radius: 20px; background: #d6cfdf; box-shadow: none; position: relative; flex-shrink: 0; margin: 0; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input:checked { background: var(--viipo-shell-purple, #9132c7); }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input::after { content: ''; position: absolute; width: 13px; height: 13px; top: 3px; left: 3px; background: white; border-radius: 50%; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input:checked::after { left: 18px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__preview { background: #fcfbff; border-radius: 9px; padding: 14px 12px; min-width: 0; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__preview h3 { font-size: 18px; margin: 0 0 3px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__preview > p { font-size: 12px; margin: 0 0 12px; color: #80778e; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__surface:not(.is-month) { display: grid; grid-template-columns: 35px repeat(2,minmax(0,1fr)); gap: 5px; overflow: visible; max-height: none; }
.viipo-calendar-settings__hours { display: flex; flex-direction: column; justify-content: space-between; color: #8a8098; font-size: 10px; padding-bottom: 22px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__day { padding: 0; border: 1px solid #efeaf5; border-radius: 5px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__day h4 { text-align: center; font-size: 11px; margin: 0; padding: 9px 2px; border-bottom: 1px solid #eee7f6; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-card { margin: 0 3px; padding: 7px 6px; border-radius: 5px; gap: 1px; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-card .viipo-calendar-detail { font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-card .viipo-calendar-detail-header { gap: 3px; flex-wrap: wrap; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-notice { background: repeating-linear-gradient(135deg,#f4f1f7,#f4f1f7 2px,#fbf9fd 2px,#fbf9fd 5px); font-size: 10px; padding: 6px 2px; margin: 0 3px; text-align: center; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__surface[data-density='compact'] .viipo-calendar-preview-card { padding-block: 3px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__surface[data-density='roomy'] .viipo-calendar-preview-card { padding-block: 11px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__surface.is-list { grid-template-columns: 1fr; }
.viipo-calendar-settings--redesigned .is-list .viipo-calendar-settings__hours { display: none; }
.viipo-calendar-settings--redesigned .is-list .viipo-calendar-settings__day { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.viipo-calendar-settings--redesigned .is-list .viipo-calendar-settings__day h4 { grid-column: 1/-1; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__footer { border-top: 1px solid #e5d7ff; margin: 14px -18px 0; padding: 14px 22px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__error:empty { display: none; }
@media (min-width: 901px) and (max-height: 800px) {
 .viipo-calendar-settings--redesigned { padding-top: 16px; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__section { padding-block: 10px; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__section-heading { margin-bottom: 8px; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__header { margin-bottom: 10px; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__footer { padding-block: 10px; margin-top: 10px; }
}
@media (max-width: 900px) {
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__layout { grid-template-columns: 1fr; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__preview { min-height: 350px; }
}
@media (max-width: 540px) {
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__section-body { grid-template-columns: 1fr; padding-left: 0; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__header { padding: 0; }
 .viipo-calendar-settings__section { padding: 12px; }
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__footer { margin-inline: -18px; }
}
.viipo-calendar-settings--redesigned .viipo-calendar-settings__day:last-child:nth-child(3) { grid-column: auto; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__section:not(:first-child) fieldset + fieldset { border-left: 1px solid #e9e1f1; padding-left: 16px; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__choice { align-items: center; }
@media (max-width: 540px) {
 .viipo-calendar-settings--redesigned .viipo-calendar-settings__section:not(:first-child) fieldset + fieldset { border-left: 0; padding-left: 0; }
}

/* Isolate switch sizing from the admin's shared checkbox rules. */
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input[type='checkbox'] {
    appearance: none; -webkit-appearance: none; flex: 0 0 34px; width: 34px; min-width: 34px; height: 19px; min-height: 19px;
    padding: 0; margin: 0; border: 0; border-radius: 20px; box-shadow: none; background: #d6cfdf; cursor: pointer;
}
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input[type='checkbox']:checked { background: var(--viipo-shell-purple, #9132c7); }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input::before { display: none !important; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__switches input::after { display: block; margin: 0; transform: none; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-state { position: relative; inset: auto; width: auto; min-height: 26px; margin: 0 3px; padding: 6px 3px; flex-shrink: 0; border-radius: 3px; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-state svg { width: 19px; height: 19px; }
.viipo-calendar-settings--redesigned .viipo-calendar-preview-state strong { font-size: 10px; }
.viipo-calendar-settings__employee-control { position: relative; --agenda-purple: var(--viipo-shell-purple, #9132c7); --agenda-surface: #fff; --agenda-border: #e8e1ef; --agenda-ink: #292332; --agenda-active: #f5eafa; }

.viipo-calendar-settings__employee-control:focus-within { outline: 2px solid var(--viipo-shell-purple, #9132c7); outline-offset: 2px; border-radius: 12px; }

.viipo-calendar-settings__employee-control { --agenda-muted: #80778e; }
.viipo-calendar-settings__employee-control .viipo-employee-filter__trigger,
.viipo-calendar-settings__employee-control .viipo-employee-filter__option { font-family: inherit; font-size: 14px; }

/* Dropdown rows must not inherit the modal's action-button styling. */
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__trigger {
    background: #fff;
    border: 1px solid #e8e1ef;
    border-radius: 8px;
    color: #292332;
    min-height: 48px;
    padding: 6px 10px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
}
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__trigger:hover,
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__trigger[aria-expanded='true'] {
    border-color: var(--viipo-shell-purple, #9132c7);
    filter: none;
}
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__menu {
    background: #fff;
    border: 1px solid #e8e1ef;
    border-radius: 12px;
    padding: 6px;
    top: calc(100% + 6px);
    box-shadow: 0 12px 30px #23192924;
    z-index: 30;
}
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__option {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #292332;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    min-height: 46px;
    padding: 7px 8px;
    margin: 0;
    box-shadow: none;
    filter: none;
}
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__option:hover,
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__option:focus-visible {
    background: #f6f4f8;
    outline: 2px solid #ddd5e5;
    outline-offset: -2px;
}
.viipo-calendar-settings .viipo-calendar-settings__employee-control .viipo-employee-filter__option[aria-selected='true'] {
    background: #f5edf9;
    color: #292332;
    font-weight: 600;
}
.viipo-calendar-settings .viipo-calendar-settings__choice,
.viipo-calendar-settings .viipo-calendar-settings__choice:has(input:checked),
.viipo-calendar-settings .viipo-employee-filter__label,
.viipo-calendar-settings .viipo-employee-filter__check,
.viipo-calendar-settings .viipo-calendar-settings__close {
    color: #292332;
}
.viipo-calendar-settings .viipo-calendar-settings__choice > span:not(.viipo-calendar-settings__option-icon) {
    color: #292332;
}
.viipo-calendar-settings .viipo-employee-filter__option > span:not(.viipo-employee-filter__group-icon) {
    color: #292332;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Preview uses the calendar's actual week-card and agenda-row classes. */
.viipo-calendar-settings--redesigned .viipo-calendar-preview-week-card {
    position: relative; inset: auto; width: auto; height: auto; min-height: 0;
    margin: 0 3px; flex-shrink: 0; cursor: default;
}
.viipo-calendar-settings--redesigned .viipo-calendar-preview-week-card:hover {
    box-shadow: none; outline: none; transform: none;
}
.viipo-calendar-settings--redesigned .viipo-calendar-settings__surface.is-list .viipo-calendar-settings__day {
    display: flex; flex-direction: column; gap: 6px;
}
.viipo-calendar-settings--redesigned [data-density='compact'] .viipo-calendar-preview-week-card { padding-block: 3px; }
.viipo-calendar-settings--redesigned [data-density='roomy'] .viipo-calendar-preview-week-card { padding-block: 9px; }

/* Agenda preview keeps the real renderer and row styling, without a custom card layout. */
.viipo-calendar-settings__surface.is-list { --agenda-border: #EAE6F0; --agenda-muted: #777184; --agenda-ink: #242033; --agenda-surface: #fff; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-day { margin: 0; min-width: 0; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-day__header { margin-bottom: 8px; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-day__header h4 { margin: 0; font-size: 14px; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-row { cursor: default; }

/* Shared screenshot-style list rows, used by the agenda and settings preview. */
.viipo-agenda-row--booking.viipo-calendar-list-booking {
    position: relative; background: #fff; border: 1px solid #e8e2ee; border-radius: 8px;
    margin-bottom: var(--viipo-list-card-gap, 10px); box-shadow: none;
    padding: var(--viipo-list-row-padding, 16px) 14px; row-gap: 2px;
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
    grid-template-rows: min-content 1fr;
}
.viipo-agenda-row--booking.viipo-calendar-list-booking:hover,
.viipo-agenda-row--booking.viipo-calendar-list-booking:focus-visible {
    background: #fcf8fe;
    border-color: #d8c5e5; box-shadow: none;
}
.viipo-calendar-list-booking .viipo-agenda-row__time { line-height: 1.25; font-weight: 700; color: #62586a; }
.viipo-calendar-list-booking .viipo-agenda-row__content { gap: 5px; }
.viipo-calendar-list-booking .viipo-agenda-row__content strong { line-height: 1.35; font-size: 14px; font-weight: 650; }
.viipo-calendar-list-booking .viipo-agenda-row__employee,
.viipo-calendar-list-booking .viipo-booking-row__customer { max-width: 260px; min-width: 0; }
.viipo-calendar-list-booking .viipo-agenda-row__employee-name,
.viipo-calendar-list-booking .viipo-booking-row__customer-name { white-space: normal; overflow-wrap: anywhere; }
.viipo-calendar-list-booking .viipo-agenda-row__status { width: fit-content; justify-self: start; }
[data-density='compact'] { --viipo-list-row-padding: 10px; --viipo-list-card-gap: 6px; }
[data-density='normal'] { --viipo-list-row-padding: 16px; --viipo-list-card-gap: 10px; }
[data-density='roomy'] { --viipo-list-row-padding: 22px; --viipo-list-card-gap: 14px; }
.viipo-calendar-settings__surface.is-list { gap: 20px; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-day__header { align-items: start; gap: 8px; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-day__shop-hours { font-size: 11px; gap: 4px; }
.viipo-calendar-settings__surface.is-list .viipo-agenda-day__count { font-size: 10px; white-space: nowrap; padding: 6px 8px; }
.viipo-preview-schedule-break { border-left: 1px solid #e5dced; margin-left: 5px; padding-left: 8px; }
@media (max-width: 500px) {
    .viipo-calendar-list-booking .viipo-agenda-row__employee,
    .viipo-calendar-list-booking .viipo-booking-row__customer { max-width: 130px; }
}

.viipo-agenda-row--break .viipo-agenda-row__employee:not(:empty) {
    display: flex; grid-column: 2; grid-row: 1 / span 2; align-self: center;
    justify-self: end; gap: 6px; max-width: 150px; min-width: 0;
}
.viipo-agenda-row--break .viipo-agenda-row__employee-name { white-space: normal; overflow-wrap: anywhere; }

.viipo-agenda-row__employee .viipo-employee-avatar--initials {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
    box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 0 0 1px #f1e9f7, 0 2px 5px rgba(65, 45, 87, .16);
    background: linear-gradient(135deg, #c76bf0 0%, #986de9 52%, #5798ec 100%); color: #fff; font-size: 11px; font-weight: 400;
    line-height: 1; text-transform: uppercase;
}

.viipo-agenda-row .viipo-list-any-employee,
.viipo-calendar-settings .viipo-agenda-row .viipo-list-any-employee {
    align-items: center; justify-content: center; display: inline-flex;
    flex: 0 0 auto; width: auto; height: auto; min-height: 0;
    border: 0; border-radius: 999px; padding: 8px 12px; margin: 0;
    background: #f4ebfa; color: #7b2ca5; cursor: pointer;
}
.viipo-agenda-row .viipo-list-any-employee svg { flex: 0 0 18px; width: 18px; height: 18px; }
.viipo-agenda-row .viipo-list-any-employee .viipo-booking-any-employee__text { display: inline; }
@media (max-width: 500px) {
    .viipo-agenda-row .viipo-list-any-employee,
    .viipo-calendar-settings .viipo-agenda-row .viipo-list-any-employee {
        border-radius: 50%; flex-basis: 32px; width: 32px; height: 32px; padding: 0;
    }
    .viipo-agenda-row .viipo-list-any-employee .viipo-booking-any-employee__text { display: none; }
    .viipo-agenda-row .viipo-list-any-employee svg { flex-basis: 15px; width: 15px; height: 15px; }
}
.viipo-agenda-row .viipo-list-any-employee:focus-visible { outline: 2px solid #9132c7; outline-offset: 3px; }
.viipo-list-any-tooltip {
    position: fixed; z-index: 1000000; width: max-content; max-width: calc(100vw - 16px);
    background: #302936; color: #fff; border-radius: 6px; padding: 7px 10px;
    font-family: var(--viipo-admin-font, Manrope, sans-serif); font-size: 12px; line-height: 1.4;
    box-shadow: 0 4px 12px #0002;
}

/* Keep view and settings controls together in the calendar hero. */
#viipo-calendar-wrap .viipo-admin-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: flex-end; gap: 24px; }
.viipo-calendar-hero__actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker {
    flex: 0 1 auto; inline-size: auto; width: auto; padding: 0; border-radius: 10px; min-height: 44px; margin: 0;
}
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__trigger {
    display: grid; grid-template-columns: 20px minmax(0, 1fr) 16px; align-items: center;
    gap: 8px; height: 42px; min-height: 42px; padding: 0 12px; color: #302936; font: inherit; font-size: 14px;
}
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__label { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; }
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__icon { width: 20px; height: 20px; background: transparent; color: #756b7d; }
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__chevron { width: 16px; height: 20px; }
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__field-label { display: none; }
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-settings-trigger {
    align-self: auto; height: 44px; min-height: 44px; padding: 0 14px; border-radius: 10px;
    color: #302936; font-size: 14px; font-weight: 600; gap: 8px; margin: 0;
}
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-settings-trigger__icon { color: #756b7d; }
@media (max-width: 900px) {
    #viipo-calendar-wrap .viipo-admin-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .viipo-calendar-hero__actions { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 380px) {
    .viipo-calendar-hero__actions { gap: 6px; }
    #viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-settings-trigger { padding-inline: 10px; }
}

.viipo-week-booking-card .viipo-calendar-detail.viipo-calendar-employee-line {
    display: flex; align-items: center; gap: 5px; min-width: 0;
}
.viipo-calendar-employee-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
    overflow: hidden; font-size: 9px; font-weight: 700; line-height: 1;
}
.viipo-calendar-employee-avatar img { width: 100%; height: 100%; object-fit: cover; }
.viipo-calendar-employee-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.viipo-week-booking-card .viipo-calendar-detail.viipo-calendar-week-any {
    display: flex; align-items: center; gap: 4px; padding-left: 27px;
    color: #655c69; margin-top: 2px; font-weight: 400;
}
.viipo-calendar-week-any .viipo-calendar-any-icon { flex-shrink: 0; }

.viipo-calendar-booking-group__avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.viipo-week-booking-card .viipo-calendar-detail.viipo-calendar-week-any {
    align-self: flex-start; width: fit-content; max-width: 100%;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 7px; margin: 5px 0 0;
    border-radius: 999px; background: #f0e2f8; color: #702a91;
    font-size: 10px; font-weight: 600; line-height: 1.3;
}
.viipo-calendar-week-any > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.viipo-calendar-week-any .viipo-calendar-any-icon,
.viipo-calendar-week-any .viipo-calendar-any-icon svg { width: 12px; height: 12px; }
.viipo-calendar-week-any .viipo-calendar-any-icon { flex-basis: 12px; }

/* Month surface shared by the calendar and settings preview. */
.viipo-month-calendar {
    box-sizing: border-box; background: #fff; border: 1px solid #ece6f1; border-radius: 14px;
    padding: 12px; gap: 6px;
}
.viipo-month-calendar__weekday { color: #514a5a; padding: 7px 4px 12px; }
.viipo-month-calendar__day {
    border: 1px solid #e9e2ef; border-radius: 9px; padding: 12px;
    min-height: 120px; gap: 7px; background: #fff;
}
.viipo-month-calendar__day > strong { font-size: 16px; line-height: 1.3; }
.viipo-month-calendar__count { font-size: 12px; }
.viipo-month-calendar__markers { align-items: center; gap: 4px; min-height: 10px; }
.viipo-month-calendar__markers i { width: 7px; height: 7px; }
.viipo-month-calendar__more { background: #f4ebfa; color: #9132c7; border-radius: 8px; padding: 1px 4px; font-size: 10px; font-weight: 600; }
.viipo-month-calendar__day.is-empty { background: #f8f7fa; border-color: transparent; color: #c4becd; }
.viipo-month-calendar__day:has(.viipo-month-calendar__status) { border: 1px solid transparent; background: var(--day-surface); }
.viipo-month-calendar__day.is-closed { background: repeating-linear-gradient(-45deg,#faf9fc 0 4px,#f0edf4 4px 5px); }
.viipo-month-calendar__day.is-exception { background: #fff5df; }
.viipo-month-calendar__status { display: grid; justify-items: center; text-align: center; gap: 5px; font-size: 12px; padding-top: 1px; }
.viipo-month-calendar__status svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.viipo-month-calendar__day.is-today,
button.viipo-month-calendar__day.is-today:hover { background: #f5ecfb; border: 2px solid #9132c7; padding: 11px; }
.viipo-month-calendar__day.is-today > strong { color: inherit; }
.viipo-month-calendar [hidden] { display: none; }
@media (max-width: 600px) {
    .viipo-month-calendar { padding: 5px; gap: 3px; }
    .viipo-month-calendar__day { padding: 5px; min-height: 85px; }
    .viipo-month-calendar__day.is-today { padding: 4px; }
    .viipo-month-calendar__day > strong { font-size: 13px; }
    .viipo-month-calendar__status { font-size: 9px; }
    .viipo-month-calendar__markers { gap: 2px; }
    .viipo-month-calendar__markers i { width: 5px; height: 5px; }
}

.viipo-week-booking-card .viipo-calendar-week-any-indicator {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 18px; width: 18px; height: 18px; margin-left: 1px;
    color: #74667d; background: transparent;
}
.viipo-calendar-week-any-indicator svg { width: 15px; height: 15px; }

.viipo-month-calendar__day.is-exception {
    --day-accent: #b86c08; --day-surface: #fff5df;
    display: grid; grid-template-rows: auto minmax(0, 1fr); align-content: stretch;
}
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status {
    align-self: center; justify-self: stretch; align-content: center;
    gap: 6px; padding: 0; color: #b86c08; line-height: 1.3;
}
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status > span { overflow-wrap: normal; }
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status svg { width: 26px; height: 26px; }
@media (max-width: 600px) {
    .viipo-month-calendar__day.is-exception .viipo-month-calendar__status { font-size: 9px; gap: 4px; }
    .viipo-month-calendar__day.is-exception .viipo-month-calendar__status svg { width: 20px; height: 20px; }
}

button.viipo-month-calendar__day.is-unavailable {
    cursor: default; opacity: 1; -webkit-text-fill-color: currentColor;
}
button.viipo-month-calendar__day.is-unavailable:hover { background: var(--day-surface); border-color: transparent; }
button.viipo-month-calendar__day.is-closed.is-unavailable:hover { background: repeating-linear-gradient(-45deg,#faf9fc 0 4px,#f0edf4 4px 5px); }

.viipo-month-calendar__markers { display: flex; flex-wrap: wrap; gap: 3px; }
.viipo-month-calendar__avatar,
.viipo-month-calendar__markers .viipo-month-calendar__more {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
    padding: 0; overflow: hidden; font-size: 9px; line-height: 1; font-weight: 600;
}
.viipo-month-calendar__avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) {
    .viipo-month-calendar__avatar,
    .viipo-month-calendar__markers .viipo-month-calendar__more { flex-basis: 18px; width: 18px; height: 18px; font-size: 7px; }
}

/* Overlapping employee avatars match the week booking groups. */
.viipo-month-calendar__markers { flex-wrap: nowrap; gap: 0; }
.viipo-month-calendar__markers > .viipo-month-calendar__avatar,
.viipo-month-calendar__markers > .viipo-month-calendar__more {
    box-sizing: border-box; border: 1px solid #fff; margin-left: -5px;
}
.viipo-month-calendar__markers > :first-child { margin-left: 0; }
@media (max-width: 600px) {
    .viipo-month-calendar__markers > :not(:first-child) { margin-left: -5px; }
}

.viipo-calendar-booking-group__dialog .viipo-calendar-detail-header { margin-bottom: 0; }

.viipo-calendar-employee-avatar-wrap {
    position: relative; display: inline-flex; flex: 0 0 22px;
    width: 22px; height: 22px; margin-right: 6px;
}
.viipo-week-booking-card .viipo-calendar-employee-avatar-wrap .viipo-calendar-week-any-indicator {
    position: absolute; right: -5px; bottom: -2px; margin: 0;
    width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%;
    background: #f3e6fa; color: var(--viipo-shell-purple, #9132c7); z-index: 1;
}
.viipo-calendar-employee-avatar-wrap .viipo-calendar-week-any-indicator svg { width: 11px; height: 11px; }

/* Exception and closed-day labels share the same vertical placement. */
.viipo-month-calendar__day.is-exception { grid-template-rows: none; align-content: start; }
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status {
    align-self: auto; align-content: normal; gap: 5px; padding-top: 1px;
}
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status svg { width: 24px; height: 24px; }
@media (max-width: 600px) {
    .viipo-month-calendar__day.is-exception .viipo-month-calendar__status { gap: 5px; }
}

/* One status layout for closed and exception cards, without inherited icon margins. */
.viipo-month-calendar__day.is-closed,
.viipo-month-calendar__day.is-exception {
    display: grid; grid-template-rows: 21px auto; align-content: start; row-gap: 12px;
}
.viipo-month-calendar__day.is-closed .viipo-month-calendar__status,
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status {
    display: grid; grid-template-rows: 26px 18px; align-items: center;
    align-content: start; align-self: start; justify-items: center;
    gap: 8px; margin: 0; padding: 0; font-size: 12px; line-height: 18px;
}
.viipo-month-calendar__day.is-closed .viipo-month-calendar__status svg,
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status svg {
    display: block; width: 26px; height: 26px; margin: 0; padding: 0; vertical-align: initial;
}
.viipo-month-calendar__day.is-closed .viipo-month-calendar__status > span,
.viipo-month-calendar__day.is-exception .viipo-month-calendar__status > span { display: block; margin: 0; padding: 0; line-height: 18px; }
@media (max-width: 600px) {
    .viipo-month-calendar__day.is-closed,
    .viipo-month-calendar__day.is-exception { row-gap: 7px; }
    .viipo-month-calendar__day.is-closed .viipo-month-calendar__status,
    .viipo-month-calendar__day.is-exception .viipo-month-calendar__status { font-size: 9px; gap: 5px; }
}

/* Keep the any-employee marker outside the face area. */
.viipo-calendar-employee-avatar-wrap { margin-right: 8px; }
.viipo-week-booking-card .viipo-calendar-employee-avatar-wrap .viipo-calendar-week-any-indicator {
    right: -7px; bottom: -2px; width: 12px; height: 12px;
    border: 1px solid #fff; background: #fff;
}
.viipo-calendar-employee-avatar-wrap .viipo-calendar-week-any-indicator svg { width: 9px; height: 9px; }

.viipo-calendar-settings__name-label { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; color: #292332; }
.viipo-calendar-settings .viipo-calendar-settings__name-select {
    width: 100%; max-width: none; min-height: 34px; border: 1px solid #e8e1ef;
    border-radius: 7px; background-color: #fff; color: #292332;
    font: inherit; padding: 5px 9px;
}

.viipo-calendar-settings--redesigned { position: fixed; }
.viipo-calendar-settings--redesigned .viipo-calendar-settings__header { padding-right: 50px; }
.viipo-calendar-settings .viipo-calendar-settings__close {
    position: absolute; top: 16px; right: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; min-height: 38px; padding: 0;
    border: 0; border-radius: 50%; background: #f6f0fa; color: #6f288f;
}
.viipo-calendar-settings__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.viipo-calendar-settings .viipo-calendar-settings__close:hover { background: #ead8f5; filter: none; }

/* Month preview scales the real calendar instead of restyling its cells. */
.viipo-calendar-settings__surface.is-month .viipo-month-calendar {
    zoom: .6; width: 100%; min-width: 0;
}
.viipo-calendar-settings__surface.is-list .viipo-calendar-list-booking .viipo-agenda-row__employee,
.viipo-calendar-settings__surface.is-list .viipo-calendar-list-booking .viipo-booking-row__customer { max-width: 125px; }

.viipo-calendar-settings__surface.is-list .viipo-agenda-row--booking.viipo-calendar-list-booking:hover,
.viipo-calendar-settings__surface.is-list .viipo-agenda-row--booking.viipo-calendar-list-booking:focus-visible {
    background: #fff; box-shadow: none; outline: none; cursor: default;
}

@media (max-width: 600px) {
    .viipo-calendar-settings--redesigned .viipo-calendar-settings__section-body > .viipo-calendar-settings__preview {
        width: 100%; min-height: 0; margin: 0;
    }
}

/* Compact, centered status labels in the month preview only. */
.viipo-calendar-settings__surface.is-month .viipo-month-calendar__day:is(.is-closed, .is-exception) {
    position: relative;
}
.viipo-calendar-settings__surface.is-month .viipo-month-calendar__day:is(.is-closed, .is-exception) .viipo-month-calendar__status {
    position: absolute; top: 50%; right: 0; bottom: auto; left: 0;
    transform: translateY(-50%); height: max-content; align-self: auto;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
    padding: 0 3px; margin: 0; font-size: 10px; line-height: 1.25;
}
.viipo-calendar-settings__surface.is-month .viipo-month-calendar__day:is(.is-closed, .is-exception) .viipo-month-calendar__status svg {
    width: 19px; height: 19px; flex: 0 0 19px; margin: 0;
}
.viipo-calendar-settings__surface.is-month .viipo-month-calendar__day:is(.is-closed, .is-exception) .viipo-month-calendar__status > span {
    line-height: 1.25; font-size: 10px; text-align: center;
}

/* View selection and settings share the same hero-button appearance. */
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker {
    border: 0; background: transparent; min-height: 44px; padding: 0;
}
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__trigger {
    box-sizing: border-box; background: #fff; border: 1px solid #e5dfee;
    border-radius: 10px; height: 44px; min-height: 44px; padding: 0 14px;
    gap: 8px; color: #302936; font-size: 14px; font-weight: 600;
}
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__trigger:hover {
    background: #f8f4ff; border-color: #cbb6ed;
}
#viipo-calendar-wrap .viipo-calendar-hero__actions .viipo-calendar-view-picker__icon svg { width: 20px; height: 20px; }

/* List status pills also work in dialogs outside the admin-shell styling scope. */
.viipo-calendar-list-booking .viipo-agenda-row__content > .viipo-booking-row__status {
    border-radius: 999px; display: inline-flex; flex: 0 0 auto;
    font-size: 10px; font-weight: 700; justify-self: start;
    line-height: 1.2; padding: 5px 7px; width: fit-content; margin-top: 5px;
}
.viipo-calendar-list-booking .viipo-agenda-row__content > .viipo-booking-row__status--cancelled { background: #fde9e8; color: #b4322b; }
.viipo-calendar-list-booking .viipo-agenda-row__content > .viipo-booking-row__status--noshow { background: #fff1d9; color: #9a5a08; }
@media (max-width: 600px) {
    .viipo-calendar-list-booking .viipo-agenda-row__content > .viipo-booking-row__status { margin-top: 4px; }
}

.viipo-week-calendar__day-heading.is-today {
    color: var(--agenda-ink); background: #f5edf9;
    box-shadow: inset 0 -3px var(--viipo-shell-purple, #9132c7);
}

.viipo-week-calendar__closed.viipo-week-calendar__exception { background: #fff5df; color: #b86c08; }
.viipo-week-calendar__exception svg { stroke: #b86c08; }
.viipo-week-calendar__exception strong { color: #b86c08; }

/* Mobile calendars: day navigation with a daily agenda and a compact month grid. */
@media (max-width: 960px) {
    #viipo-calendar-wrap,
    .viipo-calendar-wrapper,
    #viipo-bookings-agenda { min-width: 0; max-width: 100%; }
    #viipo-calendar-wrap .viipo-calendar-weekdays:not([hidden]) {
        display: grid; grid-template-columns: repeat(var(--viipo-week-days,7),minmax(0,1fr));
        grid-auto-flow: row; gap: 4px; padding: 8px 0 12px; margin: 0; overflow: visible;
    }
    #viipo-calendar-wrap .viipo-calendar-weekdays .viipo-calendar-weekdays__day {
        display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 72px; padding: 6px 2px; gap: 3px; border-radius: 12px;
        box-sizing: border-box; border-width: 1px; position: relative;
    }
    #viipo-calendar-wrap .viipo-calendar-weekdays__weekday { font-size: 11px; line-height: 16px; }
    #viipo-calendar-wrap .viipo-calendar-weekdays__date { font-size: 12px; line-height: 18px; }
    #viipo-calendar-wrap .viipo-calendar-weekdays__count { position: absolute; top: -10px; right: -10px; transform: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; font-size: 10px; line-height: 1; width: 22px; min-width: 22px; height: 22px; padding: 0; border-radius: 50%; z-index: 1; }
    #viipo-calendar-wrap .viipo-calendar-weekdays__status { position: static; width: 18px; height: 18px; }
    #viipo-calendar-wrap .viipo-calendar-weekdays__day.has-status .viipo-calendar-weekdays__count { display: none; }
    #viipo-bookings-agenda .viipo-month-calendar { gap: 4px; padding: 4px 0; }
    #viipo-bookings-agenda .viipo-month-calendar__weekday { font-size: 12px; padding: 8px 0; text-align: center; }
    #viipo-bookings-agenda .viipo-month-calendar__day {
        min-width: 0; min-height: 82px; padding: 7px 2px; gap: 5px;
        display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
        border-radius: 12px; box-sizing: border-box;
    }
    #viipo-bookings-agenda .viipo-month-calendar__day > strong {
        font-size: 14px; line-height: 26px; min-width: 26px; border-radius: 50%; text-align: center;
    }
    #viipo-bookings-agenda .viipo-month-calendar__day.is-today > strong { background: transparent; color: inherit; }
    #viipo-bookings-agenda .viipo-month-calendar__day.is-selected { box-shadow: inset 0 0 0 2px #8130b8; background: #f5edfc; }
    #viipo-bookings-agenda .viipo-month-calendar__count { font-size: 11px; color: #81778b; line-height: 20px; }
    #viipo-bookings-agenda .viipo-month-calendar__day.has-bookings .viipo-month-calendar__count {
        min-width: 22px; text-align: center; padding: 0 5px; border-radius: 7px; background: #eee1fa; color: #6b269f; font-weight: 700;
    }
    #viipo-bookings-agenda .viipo-month-calendar__unit,
    #viipo-bookings-agenda .viipo-month-calendar__markers,
    #viipo-bookings-agenda .viipo-month-calendar__status > span { display: none; }
    #viipo-bookings-agenda .viipo-month-calendar__status { margin: 0; padding: 0; gap: 0; min-height: 20px; width: 100%; display: flex; align-items: center; justify-content: center; }
    #viipo-bookings-agenda .viipo-month-calendar__status svg { width: 16px; height: 16px; }
    #viipo-bookings-agenda .viipo-month-calendar__day.is-empty { opacity: .35; }
    .viipo-calendar-booking-group__dialog {
        box-sizing: border-box; width: 100%; max-width: 100%;
        max-height: calc(100dvh - 36px); margin: auto 0 0;
        border-radius: 24px 24px 0 0; padding: 20px 16px max(20px, env(safe-area-inset-bottom));
        overscroll-behavior: contain;
    }
}
@media (max-width: 360px) {
    #viipo-bookings-agenda .viipo-month-calendar { gap: 2px; }
    #viipo-bookings-agenda .viipo-month-calendar__day { border-radius: 9px; min-height: 74px; }
}

/* Keep the view selector inside the viewport, above sidebar/overflow surfaces. */
.viipo-calendar-view-picker__menu.viipo-calendar-view-picker__menu--portal {
    position: fixed; z-index: 100100; right: auto; bottom: auto;
    box-sizing: border-box; min-width: 0; margin: 0; overflow: auto;
}
.viipo-calendar-sync-error,
.viipo-week-calendar__conflict-notice {
    padding: 8px 12px; background: #fff4df; color: #724512; border-radius: 8px;
}
.viipo-calendar-sync-error {
    align-items: flex-start; border: 1px solid #f0dfbf; box-sizing: border-box; display: flex;
    font-size: 13px; gap: 9px; line-height: 1.45; margin: 0 0 14px; max-width: 100%; padding: 10px 14px; width: 100%;
}
.viipo-calendar-sync-error::before {
    align-items: center; background: #f7e7c5; border-radius: 50%; color: #80551e; content: "!";
    display: inline-flex; flex: 0 0 19px; font-size: 12px; font-weight: 700; height: 19px; justify-content: center; margin-top: 1px;
}
.viipo-week-calendar__conflict-notice { position: relative; z-index: 4; font-size: 11px; }
.viipo-calendar-booking-modal__availability-notice {
    padding: 10px 12px; border-radius: 8px; background: #f4ecfa; color: #62238e;
}

/* Draw focus/hover inside the card so the first time row cannot clip it. */
.viipo-week-booking-card:hover,
.viipo-week-booking-card:focus-visible,
.viipo-week-group-card:hover,
.viipo-week-group-card:focus-visible { outline-offset: -2px; transform: none; }

/* Individual booking cards in both the live list and its settings preview. */
.viipo-agenda-day__rows:has(.viipo-calendar-list-booking) { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.viipo-agenda-row--booking.viipo-calendar-list-booking:last-child { margin-bottom: 0; border-bottom: 1px solid #e8e2ee; }

/* Partial-day restrictions sit below bookings and follow the same time scale. */
.viipo-week-calendar__unavailable {
    position: absolute; left: 0; right: 0; z-index: 1; box-sizing: border-box;
    background: repeating-linear-gradient(-45deg, #f5f4f7 0 6px, #eeecf1 6px 7px);
    border-block: 1px solid #e7e3eb; overflow: hidden; pointer-events: none;
    color: #7b7483; padding: 8px 6px;
}

/* Subtle rounding on desktop time-grid cards. */
@media (min-width: 961px) {
    .viipo-week-calendar .viipo-week-booking-card,
    .viipo-week-calendar .viipo-week-group-card { border-radius: 5px; }
}
@media (min-width: 961px) {
    .viipo-week-calendar .viipo-week-group-card { left: 2px; right: 2px; }
}
.viipo-calendar-employee-avatar img,
.viipo-month-calendar__avatar img,
.viipo-week-group-card__avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
