/* --------------------------------------------- */
/*  NO-JS GRID FALLBACK FOR OFF-CANVAS CONTENT   */
/*  Only when layout JS has NOT run              */
/* --------------------------------------------- */
body:not(.rsl-layout-ready) .off-canvas .slot-layout,
body:not(.rsl-layout-ready) .off-canvas .nested-slot-layout {
    grid-template-columns: repeat(1, 1fr);
}

/* Lock body scroll when a panel is open */
body.scroll-lock {
    overflow: hidden;
}

/* Overlay behind the panel */
.off-canvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65); /* slate-ish */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
    z-index: 10100;
}

.off-canvas-overlay.off-canvas-overlay-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Base off-canvas panel */
.off-canvas {
    position: fixed;
    background: var(--off-canvas-bg, #020617);
    color: var(--off-canvas-text, #e5e7eb);
    display: flex;
    flex-direction: column;
    z-index: 10200;
    transition: transform 0.25s ease-out;
}

/* Left / Right variants (vertical drawers) */
.off-canvas[data-off-canvas="right"],
.off-canvas.off-canvas-right {
    top: 0;
    bottom: 0;
    right: 0;
    width: var(--off-canvas-size, min(420px, 100%));
    box-shadow: none;
    transform: translateX(100%);
}

.off-canvas[data-off-canvas="left"],
.off-canvas.off-canvas-left {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--off-canvas-size, min(420px, 100%));
    box-shadow: none;
    transform: translateX(-100%);
}

/* Top / Bottom variants (horizontal drawers) */
.off-canvas[data-off-canvas="top"],
.off-canvas.off-canvas-top {
    left: 0;
    right: 0;
    top: 0;
    height: var(--off-canvas-size, min(340px, 100%));
    box-shadow: none;
    transform: translateY(-100%);
}

.off-canvas[data-off-canvas="bottom"],
.off-canvas.off-canvas-bottom {
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--off-canvas-size, min(340px, 100%));
    box-shadow: none;
    transform: translateY(100%);
}

/* Open states - shadow only shows when panel is open */
.off-canvas.off-canvas-open[data-off-canvas="left"],
.off-canvas.off-canvas-open.off-canvas-left {
    transform: translateX(0);
    box-shadow: 24px 0 60px var(--off-canvas-shadow-color, rgba(15, 23, 42, 0.7));
}

.off-canvas.off-canvas-open[data-off-canvas="right"],
.off-canvas.off-canvas-open.off-canvas-right {
    transform: translateX(0);
    box-shadow: -24px 0 60px var(--off-canvas-shadow-color, rgba(15, 23, 42, 0.7));
}

.off-canvas.off-canvas-open[data-off-canvas="top"],
.off-canvas.off-canvas-open.off-canvas-top {
    transform: translateY(0);
    box-shadow: 0 24px 60px var(--off-canvas-shadow-color, rgba(15, 23, 42, 0.7));
}

.off-canvas.off-canvas-open[data-off-canvas="bottom"],
.off-canvas.off-canvas-open.off-canvas-bottom {
    transform: translateY(0);
    box-shadow: 0 -24px 60px var(--off-canvas-shadow-color, rgba(15, 23, 42, 0.7));
}

/* Panel header */
.off-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.off-canvas-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Close button */
.off-canvas-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
}

.off-canvas-close:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

/* Body */
.off-canvas-body {
    padding: 1.1rem 1.25rem 1.4rem;
    overflow-y: auto;
    font-size: 0.9rem;
    flex: 1;
    color: var(--off-canvas-paragraph, #cbd5f5);
}

/* Typography theming */
.off-canvas h1,
.off-canvas h2,
.off-canvas h3,
.off-canvas h4 {
    color: var(--off-canvas-heading, #e5e7eb);
}

/* Small captions & list */
.off-canvas-caption {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.off-canvas-list {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0;
}

.off-canvas-list li + li {
    margin-top: 0.25rem;
}

.off-canvas-list a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.85rem;
}

.off-canvas-list a:hover,
.off-canvas-list a:focus-visible {
    text-decoration: underline;
}

