/* The signed-in web workspace. Element owns room-list row heights, scrolling,
   pane resizing, and the composer. */
.mozz-home .mozz-home__inner {
    --workspace-hero: #e3ecfb;
    --workspace-hero-end: #f6f8ff;
    --workspace-art-fade: to right;
    width: min(100%, 1140px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "hero" "actions" "recent";
    gap: clamp(18px, 2.35cqi, 28px);
    padding: clamp(20px, 4.1cqi, 48px);
}
.mozz-home__inner:dir(rtl) { --workspace-art-fade: to left; }
:is(.cpd-theme-dark, .cpd-theme-dark-custom, .cpd-theme-dark-hc) .mozz-home__inner {
    --workspace-hero: #172644;
    --workspace-hero-end: #1c2a46;
}
.mozz-home .mozz-home__hero {
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    min-height: clamp(170px, 21cqi, 228px);
    border-color: color-mix(in srgb, var(--home-blue) 20%, var(--home-line));
    background: linear-gradient(var(--workspace-art-fade), var(--workspace-hero-end), var(--workspace-hero) 63%);
}
.mozz-home .mozz-home__intro {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: clamp(19px, 3.35cqi, 38px);
}
.mozz-home .mozz-home__title {
    margin-block: clamp(10px, 1.45cqi, 16px) 4px;
    font-size: clamp(1.65rem, 4cqi, 2.95rem);
}
.mozz-home .mozz-home__subtitle { max-inline-size: 44ch; }
.mozz-home .mozz-home__art {
    position: absolute;
    z-index: 0;
    inset-block: 0;
    inset-inline-end: 0;
    inline-size: 47%;
    block-size: 100%;
    max-height: none;
    object-position: 63% 49%;
    /* Fade the last paper fold before the boundary of the image itself. */
    mask-image: linear-gradient(var(--workspace-art-fade), transparent 13%, rgb(0 0 0 / 16%) 23%, #000 49%);
    pointer-events: none;
}
:is(.cpd-theme-dark, .cpd-theme-dark-custom, .cpd-theme-dark-hc) .mozz-home__art {
    content: url("./assets/prism-portal.webp");
}

.mozz-home .mozz-home__actions {
    display: flex;
    align-items: stretch;
    gap: clamp(8px, 1.1cqi, 13px);
    padding: 0;
}
.mx_MatrixChat .mozz-home__actions > .mozz-home__action {
    flex: 1 1 0;
    box-sizing: border-box;
    min-inline-size: 0;
    min-block-size: 72px;
    gap: 10px;
    justify-content: flex-start;
    padding: 12px clamp(10px, 1.45cqi, 18px);
    border: 1px solid var(--home-line);
    border-radius: var(--mz-radius-card);
    color: var(--home-ink);
    background: var(--home-paper);
    text-align: start;
    overflow-wrap: anywhere;
    font: 600 clamp(.85rem, 1.6cqi, 1rem)/1.5 var(--mz-font);
}
.mx_MatrixChat .mozz-home__actions > .mozz-home__action > svg {
    box-sizing: content-box;
    inline-size: 19px;
    block-size: 19px;
    color: var(--home-blue);
}
.mozz-home .mozz-home__actions > [hidden] { display: none; }
.mozz-home .mozz-home__section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-block: 3px 12px;
    font-size: clamp(1.02rem, 2.3cqi, 1.45rem);
}
.mozz-home .mozz-home__section-title::after {
    content: "";
    flex: 1;
    block-size: 1px;
    background: var(--home-line);
}
.mozz-home .mozz-home__list { padding: 4px 8px; }
.mozz-home .mozz-home__row {
    min-height: 57px;
    padding-inline: clamp(8px, 1.55cqi, 18px);
    gap: clamp(8px, 1.1cqi, 13px);
    border-radius: var(--mz-radius-control);
}
.mozz-home .mozz-home__empty {
    flex-direction: row;
    align-items: center;
    padding: clamp(16px, 2.25cqi, 27px);
    border-style: solid;
}
.mozz-home .mozz-home__empty::before { flex: none; inline-size: 44px; block-size: 36px; }
.mozz-home .mozz-home__time { color: var(--home-dim); }
@container mozz-home (max-width: 760px) {
    .mozz-home .mozz-home__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mx_MatrixChat .mozz-home__actions > .mozz-home__action { min-block-size: 56px; }

}
@container mozz-home (max-width: 480px) {
    .mozz-home .mozz-home__inner {
        padding: 14px;
        gap: 15px;
    }
    .mozz-home .mozz-home__hero {
        min-height: 146px;
        grid-template-columns: minmax(0, 1.8fr) minmax(0, .8fr);
    }
    .mozz-home .mozz-home__intro { padding: 14px; }
    .mozz-home .mozz-home__art { inline-size: 36%; }
    .mozz-home .mozz-home__title { font-size: clamp(1.35rem, 5.8cqi, 1.7rem); }
    .mx_MatrixChat .mozz-home__actions > .mozz-home__action { gap: 7px; min-block-size: 48px; padding: 8px 10px; }
}
@media (max-width: 700px) {
    .mozz-home .mozz-home__inner:has(> .mozz-room-nav-toggle) { grid-template-areas: "back" "hero" "actions" "recent"; }
}

/* Keep these styles inside Element's existing virtualized items. */
.mx_MatrixChat .mx_RoomListPanel [data-testid="room-list-header"] h1 { font-size: 1.22rem; line-height: 1.45; }
.mx_MatrixChat .mx_RoomListPanel .mx_RoomListItemView > div { margin-inline: 7px; }
.mx_MatrixChat .mx_RoomHeader .mx_RoomHeader_heading { font-weight: 700; }
@media (forced-colors: none) {
    :is(.cpd-theme-light, .cpd-theme-dark) .mx_MatrixChat .mx_RoomListPanel [data-testid="room-list-search"] {
        min-height: 58px;
        padding: 8px 12px;
        background: var(--mozz-sidebar);
    }
    :is(.cpd-theme-light, .cpd-theme-dark) .mx_RoomListPanel #room-list-search-button {
        min-inline-size: 0;
        background: var(--mozz-panel);
        border-color: var(--mozz-strong-line);
    }
    :is(.cpd-theme-light, .cpd-theme-dark) .mx_MatrixChat .mx_RoomListItemView_selected > div {
        background: var(--mozz-active);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mozz-accent) 38%, var(--mozz-active));
    }
    :is(.cpd-theme-light, .cpd-theme-dark) .mx_RoomView .mx_MessageComposer_wrapper:focus-within {
        border-color: var(--mz-focus);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--mz-focus) 28%, transparent);
    }
}
@media (hover: hover) and (forced-colors: none) {
    .mx_MatrixChat .mozz-home__actions > .mozz-home__action:hover {
        border-color: var(--home-blue);
        background: var(--home-tint);
        color: var(--mz-tint-ink);
    }
    .mozz-home .mozz-home__row:hover { background: var(--mz-hover); }
}
@media (forced-colors: active) {
    .mozz-home .mozz-home__hero { background: Canvas; border-color: CanvasText; }
    .mozz-home .mozz-home__art { display: none; }
    .mozz-home .mozz-home__intro { grid-column: 1 / -1; }
    .mx_MatrixChat .mozz-home__actions > .mozz-home__action { border-color: ButtonText; color: ButtonText; background: ButtonFace; }
    .mx_MatrixChat .mozz-home__actions > .mozz-home__action:focus-visible { outline: 3px solid Highlight; }
}
