.t-rental-page {
    container-type: inline-size;
    width: 100%;
    min-height: 0;
    padding: 0 0 16px;
}

.t-rental-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    min-height: 0;
}

.t-rental-page__main {
    min-width: 0;
}

.t-rental-page__editor {
    min-width: 0;
}

.t-rental-toolbar {
    margin-bottom: 12px;
}

.t-rental-toolbar .t-testdrive-toolbar__control {
    flex: 0 1 190px;
    min-width: 190px;
}

.t-rental-scheduler {
    display: block;
}

.t-rental-maintenance-bar {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.t-rental-maintenance-button {
    min-height: 32px;
    font-weight: 800;
}

.t-rental-scheduler > .t-scheduler__main {
    width: 100%;
    max-height: calc(100dvh - var(--t-appbar-height) - 150px);
}

.t-rental-week__grid {
    position: relative;
}

.t-rental-week__cell {
    min-height: 100%;
}

.t-rental-week.is-year .t-rental-week__grid {
    min-width: 1220px;
}

.t-rental-week.is-month .t-rental-week__grid {
    min-width: 900px;
}

.t-rental-week.is-month .t-rental-week__day-header,
.t-rental-week.is-year .t-rental-week__day-header {
    height: 52px;
    min-height: 52px;
    padding: 5px 3px;
}

.t-rental-week.is-month .t-rental-week__day-header .mud-typography-body2,
.t-rental-week.is-year .t-rental-week__day-header .mud-typography-body2 {
    font-size: .76rem;
    line-height: 1;
}

.t-rental-week.is-year .t-rental-week__month-name,
.t-rental-week.is-month .t-rental-week__week-name {
    font-weight: 800;
}

.t-rental-week__week-range {
    margin-top: 4px;
    font-size: .66rem;
    font-weight: 700;
    line-height: 1;
    color: var(--mud-palette-text-secondary);
}

.t-rental-week__day-header.is-clickable {
    cursor: pointer;
}

.t-testdrive-week__resource-label.t-rental-week__resource-label {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.t-rental-resource-label__title,
.t-rental-resource-label__subtitle {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t-rental-resource-label__title {
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.15;
}

.t-rental-resource-label__subtitle {
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--mud-palette-text-secondary);
}

.t-rental-week__span {
    z-index: 3;
    align-self: start;
    min-width: 0;
    padding: 0 8px;
    pointer-events: none;
}

.t-rental-week__span .t-rental-card {
    pointer-events: auto;
}

.t-rental-week.is-month .t-rental-week__span,
.t-rental-week.is-year .t-rental-week__span {
    padding: 0 4px;
}

.t-rental-card {
    --t-rental-accent: var(--mud-palette-primary);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 26px;
    max-height: 30px;
    padding: 3px 10px;
    border: 1px solid color-mix(in srgb, var(--t-rental-accent), white 16%);
    border-left: 4px solid var(--t-rental-accent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--t-rental-accent), transparent 78%);
    color: var(--mud-palette-text-primary);
    cursor: grab;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
}

.t-rental-card:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--t-rental-accent), transparent 70%);
}

.t-rental-card:active {
    cursor: grabbing;
}

.t-rental-card.is-dummy {
    border-style: dashed;
}

.t-rental-card.is-dragging {
    opacity: 0.45;
}

.t-rental-card.is-ghost-shadow {
    opacity: 1 !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .24);
}

.t-rental-card__title,
.t-rental-card__subtitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t-rental-card__title {
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.1;
}

.t-rental-card__subtitle {
    font-size: .64rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    line-height: 1.05;
}

.t-rental-week.is-month .t-rental-card,
.t-rental-week.is-year .t-rental-card {
    min-height: 22px;
    max-height: 24px;
    padding: 2px 7px;
    border-radius: 5px;
}

.t-rental-week.is-month .t-rental-card__title,
.t-rental-week.is-year .t-rental-card__title {
    font-size: .66rem;
}

.t-rental-week.is-month .t-rental-card__subtitle,
.t-rental-week.is-year .t-rental-card__subtitle {
    display: none;
}

.t-rental-week.is-dragging-active .t-rental-card {
    pointer-events: none !important;
    opacity: .75;
}

.t-rental-week.is-dragging-active .t-rental-card.is-ghost-shadow {
    opacity: 1 !important;
}

@media (max-width: 900px) {
    .t-rental-toolbar .t-testdrive-toolbar__control {
        flex-basis: 100%;
    }
}

@container (min-width: 1540px) {
    .t-rental-page__layout.is-editor-open {
        grid-template-columns: minmax(730px, 1fr) minmax(760px, 900px);
    }

    .t-rental-page__layout.is-editor-open .t-rental-scheduler > .t-scheduler__main {
        max-height: calc(100dvh - var(--t-appbar-height) - 150px);
    }

    .t-rental-page__editor {
        position: sticky;
        top: 0;
    }
}
