/* SWIPE STUFF */
/* Button states */
.btn-swipe-actions:hover,
.btn-swipe-actions:active,
.btn-swipe-actions:focus,
.btn-swipe-actions:target {
    background-color: #282828;
    border-color: #000000;
}

.btn-swipe-actions.active:hover,
.btn-swipe-actions.active:active,
.btn-swipe-actions.active:focus,
.btn-swipe-actions.active:target {
    background-color: #2A9D8F;
    border-color: #000000;
}

.swipeArea {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

    .swipeArea::-webkit-scrollbar {
        display: none;
    }

.swipe-content.swiped {
    transform: translateX(-75vw);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.swipe-content {
    width: 100%;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.bg-episode-list-item {
    flex: 2 0 100%;
    max-width: calc(680px - 3rem);
}

.input-group {
    flex-wrap: nowrap;
}

.swipe-actions {
    position: absolute;
    right: 2em;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.swipe-items {
    margin-left: 1.5rem;
}

.swipe-items-container {
    display: flex;
    align-items: center;
}


.study-texts-list {
    overflow-y: auto;
}

/* Web header: keep layout in global CSS so production is not dependent on RCL scoped CSS hashes */
.learning-portal-header__left,
.learning-portal-header__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.learning-portal-header__right {
    gap: 0.25rem;
}

/* Margin is applied by contentBackVisibility.js so header back tracks the content/main gutter left edge. */
.learning-portal-header__back {
    flex-shrink: 0;
}

.learning-portal-header__play-pack,
.learning-portal-header__play-square {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learning-portal-header__play-pack {
    max-width: 14rem;
    margin-left: 0.35rem;
}

.learning-portal-header__play-square {
    max-width: 18rem;
    opacity: 0.92;
}

.learning-portal-header__title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    pointer-events: none;
}

.ypq-header-mark {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 8px;
}

.ypq-header-wordmark {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}

.ypq-mark {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
    background-color: #fff;
    border-radius: 8px;
}

/* Login card: loads after MudBlazor so these beat default h1 sizing. */
.ypq-login-mark-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

h1.ypq-login-title {
    text-align: center;
    white-space: nowrap;
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 0.35rem 0 0;
}

.ypq-login-actions {
    display: flex;
    justify-content: center;
}

.learning-portal-header__user-name {
    max-width: 16rem;
    margin-bottom: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learning-portal-header__logout {
    min-width: auto;
}

@media (max-width: 800px) {
    .ypq-header-wordmark {
        display: none;
    }
}

@media (max-width: 700px) {
    .learning-portal-header__user-name {
        max-width: 8rem;
    }

    .learning-portal-header__play-pack {
        max-width: 7rem;
    }

    .learning-portal-header__play-square {
        max-width: 9rem;
    }
}

/* Distinctive MudTable header row (used across Razor pages) */
.mud-table-distinct-header .mud-table-header-cell-distinct {
    font-weight: 700;
    background-color: var(--mud-palette-table-lines, #E8EDE9) !important;
    border-bottom: 2px solid var(--mud-palette-primary, #2A9D8F);
    color: var(--mud-palette-primary-darken, #218176);
}

/* Lesson set expansion well: sage-tinted contrast behind lesson cards */
.lesson-set-expansion .mud-expand-panel-content {
    background-color: var(--mud-palette-table-lines, #E8EDE9);
}

/* Lesson set expansion header (TitleContent area) */
.lesson-set-expansion .mud-expand-panel-header {
    background-color: var(--mud-palette-table-lines, #E8EDE9); /* or whatever color you want */
}

/* Nav menu drawer: keep utility links anchored while primary links scroll */
.nav-drawer-scroll {
    overflow: hidden;
    height: calc(100vh - 64px);
    min-height: 0;
}

.nav-menu-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.nav-menu-primary {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-menu-footer {
    flex: 0 0 auto;
}

/* Fantasy occupant editor: square model preview fills right column */
.occupant-editor-preview-canvas {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto !important;
}

.gltf-asset-preview-viewport {
    width: 100%;
    background: #e5e7eb;
    border-radius: 4px;
}

.gltf-asset-editor-grid {
    align-items: stretch;
}

.gltf-asset-editor-grid > .mud-grid-item {
    display: flex;
    flex-direction: column;
}

.gltf-asset-editor-preview-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100%;
}

.gltf-asset-editor-preview-canvas {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 360px;
}

.gltf-asset-preview-viewport--fill {
    flex: 1 1 auto;
    min-height: 320px;
    height: auto !important;
}

/* Main content is full-width; pages that want a narrow column use their own .container. */
.app-main-container.mud-container {
    max-width: none !important;
    width: 100% !important;
}

/* Default layout back button: upper-left of main content (hidden when WebBackButton renders nothing). */
.app-main-back {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.app-main-back-button {
    margin-bottom: 0.5rem;
}

/* Immersive pages: pull into the main-content padding so left/right gutters disappear. */
.mud-main-content:has(.app-full-bleed-page) {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.app-main-container:has(.app-full-bleed-page) {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

.app-full-bleed-page {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
}