/* Gemeinsame Layoutkorrektur fuer alle waehlbaren Designs. */
#body > main.row > section.column {
    box-sizing: border-box;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(1rem, 3vw, 2rem) !important;
    padding-right: clamp(1rem, 3vw, 2rem) !important;
}

#body > main.row > section.column > .row {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media screen and (max-width: 48em) {
    #body > main.row > section.column {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Filter erzeugen sonst einen eigenen Bezugskasten fuer fixed-Elemente. */
    #body {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        filter: none !important;
        transform: none !important;
        perspective: none !important;
        contain: none !important;
    }

    /* Die Buchungsaktionen bleiben Teil des normalen Dokumentflusses. */
    #step-5 {
        overflow: visible !important;
    }

    #step-5 .summary-calendar {
        display: none;
    }

    #step-5 .callout.secondary {
        padding: 0.75rem;
    }

    #step-5 .summary-appointment .lead {
        margin-bottom: 0.3rem;
        font-size: 0.95rem;
        line-height: 1.35;
    }

    #step-5 .booking-actions {
        position: static !important;
        z-index: auto !important;
        float: none !important;
        display: block;
        width: 100% !important;
        margin: 0 !important;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        transform: none !important;
    }

    #step-5 .booking-actions > .medium-centered {
        position: static !important;
        float: none !important;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    #step-5 .booking-actions .row {
        margin: 0;
    }

    #step-5 .booking-actions .small-6:first-child {
        width: 34%;
    }

    #step-5 .booking-actions .small-6:last-child {
        width: 66%;
    }

    #step-5 .booking-actions .button {
        margin-bottom: 0;
    }
}

.booking-pending-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    color: var(--text, #222);
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: center;
}

.booking-pending-row {
    margin-bottom: 1rem !important;
}

.booking-pending-note i {
    color: var(--primary, #b00000);
}

#step-6 .calendar-download-row {
    margin-bottom: 1.5rem !important;
}

/* Mitarbeiter-Detailtext analog zur aufgeklappten Terminarten-Information. */
#mitarbeiterliste .employee-detail-info {
    box-sizing: border-box;
    width: auto;
    margin: 0.5rem 0.5rem 0.25rem 2rem;
    padding: 0.75rem 1rem;
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    border-left: 5px solid currentColor;
    border-radius: 0.625rem;
    color: inherit;
    background: color-mix(in srgb, currentColor 8%, transparent);
    gap: 0.75rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

#mitarbeiterliste .employee-detail-info > span {
    display: block;
    min-width: 0;
}

#mitarbeiterliste .employee-info-image {
    display: block;
    width: 9rem;
    height: 9rem;
    max-width: none;
    border: 2px solid color-mix(in srgb, currentColor 32%, transparent);
    border-radius: 0.75rem;
    object-fit: cover;
}

@supports not (background: color-mix(in srgb, black, white)) {
    #mitarbeiterliste .employee-detail-info {
        border-color: rgba(90, 104, 120, 0.35);
        border-left-color: currentColor;
        background: rgba(127, 127, 127, 0.1);
    }
}

@media screen and (max-width: 39.9375em) {
    #mitarbeiterliste .employee-detail-info {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Ohne Firmenfeld nutzt die Mitarbeiterauswahl die volle Breite zweispaltig. */
@media screen and (min-width: 40em) {
    #mitarbeiter.employee-layout-wide #mitarbeiterliste {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 0.75rem 1rem;
        width: 100%;
    }

    #mitarbeiter.employee-layout-wide #mitarbeiterliste > .mitarbeiter {
        box-sizing: border-box;
        width: auto !important;
        min-width: 0;
        margin: 0 !important;
    }

    #mitarbeiter.employee-layout-wide .mitarbeiterselect {
        width: 100% !important;
    }
}

/* Suche und Gruppierung der Terminarten. */
#step-1 {
    position: relative;
}

.todo-search {
    width: min(100%, 18rem);
    margin: -0.35rem 0 1rem auto;
}

.todo-search input {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.todo-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.todo-search-empty {
    width: 100%;
    margin: 0.75rem 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(90, 104, 120, 0.35);
    border-radius: 0.65rem;
    text-align: center;
}

#todos .todo-group {
    width: 100%;
    margin: 0.5rem 0;
    overflow: hidden;
    border: 2px solid rgba(90, 104, 120, 0.42);
    border-radius: 0.85rem;
    background: rgba(90, 104, 120, 0.08);
}

#todos .todo-group-toggle {
    position: relative;
    width: 100%;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0.7rem;
    box-shadow: none;
    text-align: left;
}

#todos .todo-group-toggle[aria-expanded="true"] {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

#todos .todo-group-toggle::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 1rem;
    font-size: 1.35em;
    line-height: 1;
    transform: translateY(-50%);
}

#todos .todo-group-toggle[aria-expanded="true"]::after {
    content: "\2212";
}

#todos .todo-group-items {
    position: relative;
    padding: 0.7rem 0.7rem 0.7rem 1.15rem;
    border-top: 2px solid rgba(90, 104, 120, 0.32);
    background: rgba(255, 255, 255, 0.72);
}

#todos .todo-group-items::before {
    content: "";
    position: absolute;
    top: 0.65rem;
    bottom: 0.65rem;
    left: 0.55rem;
    width: 0.25rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.34;
}

#todos .todo-group-items > .todotemplate {
    width: calc(100% - 0.65rem) !important;
    margin: 0.4rem 0 0.4rem 0.65rem !important;
    border-left-width: 0.3rem !important;
}

#todos .todo-group-items[hidden] {
    display: none !important;
}

@supports (background: color-mix(in srgb, black, white)) {
    #todos .todo-group {
        border-color: color-mix(in srgb, var(--primary, currentColor) 48%, transparent);
        background: color-mix(in srgb, var(--primary, currentColor) 8%, white);
    }

    #todos .todo-group-items {
        border-top-color: color-mix(in srgb, var(--primary, currentColor) 35%, transparent);
        background: color-mix(in srgb, var(--primary, currentColor) 5%, white);
    }

}

@media screen and (min-width: 64em) {
    #step-1 > h2 {
        padding-right: 19rem;
        padding-left: 19rem;
    }

    .todo-search {
        position: absolute;
        top: 1.1rem;
        right: 1.1rem;
        margin: 0;
    }
}

@media screen and (max-width: 39.9375em) {
    .todo-search {
        width: 100%;
    }

    #todos .todo-group {
        max-width: 100%;
    }

    #todos .todo-group-toggle {
        max-width: 100%;
        padding-right: 2.75rem;
    }

    #todos .todo-group-items {
        width: 100%;
        padding: 0.45rem;
    }

    #todos .todo-group-items::before {
        display: none;
    }

    #todos .todo-group-items > .todotemplate {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        margin: 0.4rem 0 !important;
    }

    #todos .todo-group-items > .todotemplate > .todo,
    #todos .todo-group-items > .todotemplate label {
        min-width: 0;
        max-width: 100%;
    }

    #todos .todo-group-items > .todotemplate label {
        overflow-wrap: anywhere;
    }
}

/* Dauer einer Terminart rechts unterhalb des Info-Buttons. */
#todos .form-item--radionew.has-todo-duration {
    position: relative;
    min-height: 4.75rem;
}

#todos .form-item--radionew.has-todo-duration > label {
    position: relative !important;
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 4.25rem !important;
    padding-right: 6.25rem !important;
    padding-bottom: 1.75rem !important;
}

#todos .form-item--radionew.has-todo-duration > .info-inline-todo {
    position: absolute;
    top: 27px;
    right: 0.65rem;
    float: none;
    margin-right: 0;
    transform: translateY(-50%);
}

#todos .form-item--radionew.has-todo-duration > label > .todo-duration {
    position: absolute;
    top: auto;
    right: 0.65rem;
    bottom: 0.4rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 6rem;
    padding: 0.16rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--primary, currentColor) 28%, transparent);
    border-radius: 999px;
    color: var(--text, currentColor);
    background: color-mix(in srgb, var(--primary, currentColor) 8%, white);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

#todos .form-item--radionew.has-todo-duration > label > .todo-duration--borderless {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

@supports not (background: color-mix(in srgb, black, white)) {
    #todos .form-item--radionew.has-todo-duration > label > .todo-duration {
        border-color: rgba(90, 104, 120, 0.3);
        background: rgba(255, 255, 255, 0.94);
    }

    #todos .form-item--radionew.has-todo-duration > label > .todo-duration--borderless {
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }
}

/* CI-basierter Ladezustand fuer Mitarbeiter und freie Termine. */
.weekly-time-navigation {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    font-family: inherit;
}

.weekly-time-navigation #weekly-time-range {
    text-align: center;
    font-family: inherit !important;
}

.weekly-time-nav-button {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--primary, currentColor) 38%, transparent);
    border-radius: 50%;
    color: var(--text, currentColor);
    background: color-mix(in srgb, var(--primary, currentColor) 10%, white);
    font-size: 1.2rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
}

.weekly-time-view {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    font-family: inherit;
}

.weekly-time-day {
    display: grid;
    grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem 1rem;
    margin: 0.4rem 0 !important;
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--primary, currentColor) 22%, transparent);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--primary, currentColor) 5%, white);
    font-family: inherit;
}

.weekly-time-day__date {
    margin: 0;
    font-weight: 800;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.3 !important;
    color: inherit !important;
}

.weekly-time-day__date small {
    display: block;
    margin: 0 0 0.35rem;
    opacity: 0.72;
    font-family: inherit !important;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
}

.weekly-time-day__times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.weekly-time-view .terminecontainer {
    float: none !important;
    width: auto !important;
    min-width: 7rem;
    padding: 0 !important;
}

.weekly-time-view .datetime--time {
    margin: 0;
}

.weekly-time-view .datetime--time label {
    margin: 0 !important;
    font-family: inherit !important;
    white-space: nowrap;
}

.weekly-time-day__empty {
    margin: 0;
    opacity: 0.65;
    font-size: 0.9rem;
}

@supports not (background: color-mix(in srgb, black, white)) {
    .weekly-time-nav-button,
    .weekly-time-day {
        border-color: rgba(90, 104, 120, 0.3);
        background: rgba(255, 255, 255, 0.94);
    }
}

@media screen and (max-width: 39.9375em) {
    .weekly-time-day {
        grid-template-columns: 1fr;
    }
}

.loading-state {
    --loader-primary: var(--primary, #2563eb);
    --loader-accent: var(--accent, #14b8a6);
    box-sizing: border-box;
    max-width: 100%;
    margin: 1rem auto !important;
    color: var(--text, currentColor);
}

.loading-state__inner {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border: 1px solid color-mix(in srgb, var(--loader-primary) 28%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--loader-primary) 8%, white);
    box-shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--loader-primary) 14%, transparent);
}

.ci-loader {
    position: relative;
    display: block;
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
}

.ci-loader__ring {
    position: absolute;
    inset: 0.2rem;
    box-sizing: border-box;
    border: 0.28rem solid color-mix(in srgb, var(--loader-primary) 18%, transparent);
    border-top-color: var(--loader-primary);
    border-right-color: var(--loader-accent);
    border-radius: 50%;
    animation: ci-loader-spin 0.9s linear infinite;
}

.ci-loader__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--loader-accent);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--loader-accent) 18%, transparent);
    transform: translate(-50%, -50%);
    animation: ci-loader-pulse 1.2s ease-in-out infinite;
}

.loading-state__text {
    min-width: 0;
    font: inherit;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

@keyframes ci-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ci-loader-pulse {
    0%, 100% {
        opacity: 0.55;
        transform: translate(-50%, -50%) scale(0.75);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@supports not (background: color-mix(in srgb, black, white)) {
    .loading-state__inner {
        border-color: rgba(90, 104, 120, 0.3);
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 0.5rem 1.5rem rgba(20, 30, 40, 0.12);
    }

    .ci-loader__ring {
        border-color: rgba(90, 104, 120, 0.2);
        border-top-color: var(--loader-primary);
        border-right-color: var(--loader-accent);
    }

    .ci-loader__dot {
        box-shadow: 0 0 0 0.25rem rgba(90, 104, 120, 0.16);
    }
}

@media screen and (max-width: 39.9375em) {
    .loading-state__inner {
        width: 100%;
        border-radius: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ci-loader__ring,
    .ci-loader__dot {
        animation: none;
    }
}
