

.cm-topbar__menu,
.cm-topbar__searchbtn,
.cm-drawer,
.cm-drawer-scrim,
.cm-bottomnav {
    display: none;
}

@media (max-width: 720px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .cm-topbar {
        flex-wrap: nowrap;
        gap: var(--cm-space-2);
        height: 52px;
        min-height: 52px;
        padding: 0 var(--cm-space-2);
    }

    .cm-topbar__logo {
        height: 26px;
    }

    .cm-modules,
    .cm-oncall,
    .cm-notify-btn,
    .cm-topbar__right,
    .cm-weekend,
    .cm-gsearch {
        display: none !important;
    }

    .cm-topbar__menu,
    .cm-topbar__searchbtn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--cm-topbar-fg);
        font-size: var(--cm-font-size-h1);
        cursor: pointer;
    }

    .cm-topbar__menu {
        order: -1;
    }

    body.cm-search-open .cm-gsearch {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        height: 52px;
        margin: 0;
        padding: 0 var(--cm-space-3);
        border-radius: 0;
        background: var(--cm-brand);
    }

    body.cm-search-open .cm-gsearch__input {
        flex: 1;
        min-width: 0;
        font-size: 16px;
    }

    body.cm-search-open .cm-gsearch__key {
        display: none;
    }

    .cm-drawer-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1300;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }

    .cm-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1310;
        width: min(82%, 320px);
        overflow-y: auto;
        background: var(--surface-card);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
        transform: translateX(-105%);
        transition: transform 0.2s;
    }

    body.cm-drawer-open .cm-drawer {
        transform: none;
    }

    body.cm-drawer-open .cm-drawer-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .cm-drawer__head {
        display: flex;
        flex-direction: column;
        padding: var(--cm-space-4);
        background: var(--cm-brand);
        color: var(--cm-topbar-fg);
    }

    .cm-drawer__head small {
        opacity: 0.8;
    }

    .cm-drawer__item {
        display: flex;
        align-items: center;
        gap: var(--cm-space-3);
        min-height: 48px;
        padding: 0 var(--cm-space-4);
        border: 0;
        border-bottom: 1px solid var(--surface-border);
        background: transparent;
        color: var(--text-color);
        font-size: 1rem;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
    }

    .cm-drawer__item.is-active {
        background: var(--cm-brand-tint);
        font-weight: 700;
    }

    .cm-drawer__item .pi {
        width: 1.4rem;
        text-align: center;
        color: var(--text-color-secondary);
    }

    .cm-drawer__sep {
        height: var(--cm-space-3);
        background: var(--surface-ground);
    }

    .cm-bottomnav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        height: 60px;
        padding-bottom: env(safe-area-inset-bottom);
        border-top: 1px solid var(--surface-border);
        background: var(--surface-card);
    }

    .cm-bottomnav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: 0;
        background: transparent;
        color: var(--text-color-secondary);
        font-size: var(--cm-font-size-xs);
        text-decoration: none;
        cursor: pointer;
    }

    .cm-bottomnav__item .pi {
        font-size: var(--cm-font-size-h1);
    }

    .cm-bottomnav__item.is-active {
        color: var(--cm-brand);
        font-weight: 700;
    }

    .cm-main {
        padding-bottom: 72px;
    }

    .cm-footer {
        display: none;
    }

    .cm-layout,
    .cm-main,
    .cm-container {
        min-width: 0;
        max-width: 100%;
    }

    .cm-page-header,
    .cm-container {
        padding-left: var(--cm-space-3);
        padding-right: var(--cm-space-3);
    }

    .cm-page-header__module {
        display: none;
    }

    .cm-page-header__title {
        font-size: var(--cm-font-size-h1);
    }

    .cm-sidebar__toggle {
        display: none;
    }

    .cm-sidebar {
        padding: 0 var(--cm-space-2);
    }

    .cm-card,
    .cm-list,
    .ui-datatable,
    .ui-datatable-tablewrapper {
        max-width: 100%;
        min-width: 0;
    }

    .cm-card {
        padding-left: var(--cm-space-3);
        padding-right: var(--cm-space-3);
    }

    .cm-list__table.ui-datatable table,
    .cm-list__table.ui-datatable tbody,
    .cm-list__table.ui-datatable tr,
    .cm-list__table.ui-datatable td {
        display: block;
        width: 100% !important;
    }

    .cm-list__table.ui-datatable thead {
        display: none;
    }

    .cm-list__table.ui-datatable tr {
        margin: 0 0 var(--cm-space-2);
        padding: var(--cm-space-2) var(--cm-space-3);
        border: 1px solid var(--surface-border);
        border-radius: var(--cm-radius);
        background: var(--surface-card);
    }

    .cm-list__table.ui-datatable td {
        display: flex;
        align-items: baseline;
        gap: var(--cm-space-2);
        padding: 2px 0;
        border: 0;
        text-align: left !important;
        overflow-wrap: anywhere;
    }

    .cm-list__table.ui-datatable td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 34%;
        color: var(--text-color-secondary);
        font-size: var(--cm-font-size-xs);
    }

    .cm-list__table.ui-datatable td:first-child::before {
        display: none;
    }

    .cm-list__table.ui-datatable td:first-child {
        font-weight: 700;
    }

    .cm-list__table.ui-datatable td:empty,
    .cm-list__table.ui-datatable td.cm-cell-empty {
        display: none;
    }

    .cm-list__table.ui-datatable .ui-paginator {
        flex-wrap: wrap;
    }

    .cm-filters-toggle {
        display: inline-flex;
        align-items: center;
        gap: var(--cm-space-2);
        margin: 0 0 var(--cm-space-2);
        padding: 0 var(--cm-space-3);
        height: 38px;
        border: 1px solid var(--surface-border);
        border-radius: var(--cm-radius);
        background: var(--surface-card);
        color: var(--text-color);
        font-size: var(--cm-font-size-sm);
        cursor: pointer;
    }

    .cm-filters-collapsible:not(.cm-filters-open) > :not(.cm-search):not(.cm-btn-primary):not(.cm-filters-keep) {
        display: none !important;
    }

    .cm-filters-collapsible .cm-search {
        flex: 1 1 100%;
    }

    .ui-dialog {
        width: 96vw !important;
        max-width: 96vw !important;
        left: 2vw !important;
        max-height: 92vh;
    }

    .ui-dialog .ui-dialog-content {
        overflow-y: auto;
        max-height: 80vh;
    }

    .cm-form-grid {
        grid-template-columns: 1fr !important;
    }

    .cm-form-grid__control {
        min-width: 0;
    }

    .cm-list__table.ui-datatable td.cm-more {
        display: none;
    }

    .cm-list__table.ui-datatable tr.cm-open td.cm-more:not(.cm-cell-empty) {
        display: flex;
    }

    .cm-list__table.ui-datatable tr.cm-has-more:not(.cm-open)::after {
        content: "mehr anzeigen \25BE";
        display: block;
        padding-top: var(--cm-space-1);
        color: var(--cm-link);
        font-size: var(--cm-font-size-xs);
    }

    .cm-list__table.ui-datatable tr.cm-has-more.cm-open::after {
        content: "weniger \25B4";
        display: block;
        padding-top: var(--cm-space-1);
        color: var(--cm-link);
        font-size: var(--cm-font-size-xs);
    }

    .cm-list__table.ui-datatable td {
        font-size: var(--cm-font-size-sm);
    }

    .cm-cal .fc-list-event-title,
    .cm-cal .fc-list-event-time {
        text-align: left;
    }

    .cm-cal .fc-list-event-title {
        width: 100%;
    }

    .cm-cal .fc-list-event td {
        padding: 6px 8px;
    }

    .cm-cal .cm-day-empty__row td {
        color: var(--text-color-secondary);
        font-style: normal;
    }

    .cm-cal .fc-list-day.fc-day-today th {
        font-weight: 700;
    }

    .cm-cal .fc-list-table {
        table-layout: auto;
        width: 100%;
    }

    .cm-cal .fc-list-event-time {
        width: 6.2rem;
        min-width: 6.2rem;
        white-space: nowrap;
        font-size: var(--cm-font-size-xs);
    }

    .cm-cal .fc-list-event-graphic {
        width: 1rem;
        padding-left: 0;
        padding-right: 0;
    }

    .cm-cal .fc-list-event-title {
        width: auto;
        text-align: left;
        font-size: var(--cm-font-size-sm);
    }

    .cm-start-grid {
        gap: var(--cm-space-3);
    }

    .cm-start-cell,
    .cm-start-cell .ui-panel,
    .cm-start-cell .ui-panel-content {
        min-width: 0;
        max-width: 100%;
    }

    .cm-start .cm-home-table,
    .cm-start .cm-home-table tbody {
        display: block;
        width: 100%;
    }

    .cm-start .cm-home-table thead {
        display: none;
    }

    .cm-start .cm-home-table tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 2px var(--cm-space-2);
        padding: var(--cm-space-2) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .cm-start .cm-home-table td {
        display: block;
        width: auto;
        max-width: 100%;
        padding: 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .cm-start .cm-home-table td:nth-child(4) {
        flex: 1 1 100%;
        order: 5;
    }

    .cm-start .ui-datatable table,
    .cm-start .ui-datatable tbody,
    .cm-start .ui-datatable tr,
    .cm-start .ui-datatable td {
        display: block;
        width: 100% !important;
        height: auto !important;
    }

    .cm-start .ui-datatable thead {
        display: none;
    }

    .cm-start .ui-datatable tr {
        padding: var(--cm-space-2) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .cm-start .ui-datatable td {
        padding: 2px 0;
        border: 0;
        text-align: left !important;
        overflow-wrap: anywhere;
    }

    .cm-start .ui-datatable td[data-label]::before {
        content: attr(data-label) ": ";
        color: var(--cm-topbar-fg);
        opacity: 0.7;
        font-size: var(--cm-font-size-xs);
    }

    .cm-start .ui-datatable td:first-child::before {
        display: none;
    }

    .cm-start .ui-datatable td:first-child {
        font-weight: 700;
    }

    .cm-start .ui-datatable .ui-datatable-tablewrapper {
        overflow-x: visible;
    }

    .cm-record__main {
        flex-direction: column;
        gap: var(--cm-space-3);
        padding: var(--cm-space-3);
    }

    .cm-record__icon {
        display: none;
    }

    .cm-record__body {
        width: 100%;
    }

    .cm-record__logorow {
        position: relative;
    }

    .cm-record__logo {
        width: auto;
        max-width: 100%;
        height: 3.5rem;
    }

    .cm-record__links {
        flex-direction: column;
        align-items: stretch;
    }

    .cm-record__links li {
        display: flex;
        flex-wrap: wrap;
        gap: 2px var(--cm-space-2);
        max-width: 100%;
    }

    .cm-record__links a {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .cm-record__meta {
        flex-direction: column;
        gap: var(--cm-space-1);
    }

    .cm-mapbox {
        width: 100%;
    }

    .cm-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cm-facts > div {
        padding: var(--cm-space-2) var(--cm-space-3);
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .cm-facts > div:nth-child(even) {
        border-left: 1px solid var(--surface-border);
    }

    .cm-facts > div:nth-child(odd) {
        border-left: 0;
    }

    .cm-facts dt {
        letter-spacing: 0;
    }

    .cm-facts dd {
        font-size: 1rem;
    }
}
