/* VELYON Theme — bottom sheets for the mobile tab bar (v1.9.0)
   Workspace + Materials choosers. Markup: inc/bottom-menu.php.
   Phones only (<=782px) like the tab bar itself. z-index 400, the same layer as
   the search popup (above the tab bar at 90 and the drawer at 300/301). */

.vsheet {
	position: fixed;
	inset: 0;
	z-index: 400;
	opacity: 0;
	transition: opacity .2s ease;
}
.vsheet[hidden] { display: none; }
.vsheet.is-open { opacity: 1; }

.vsheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 7, 6, .8);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.vsheet-backdrop {
		background: rgba(4, 7, 6, .58);
		-webkit-backdrop-filter: blur(10px) saturate(120%);
		backdrop-filter: blur(10px) saturate(120%);
	}
}

.vsheet-panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 86vh;
	max-height: 86dvh;
	display: flex;
	flex-direction: column;
	background: var(--velyon-surface);
	border: 1px solid var(--velyon-border);
	border-bottom: 0;
	border-radius: 22px 22px 0 0;
	box-shadow: 0 -18px 50px rgba(0, 0, 0, .4);
	padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	transform: translateY(100%);
	transition: transform .26s cubic-bezier(.2, .8, .2, 1);
	will-change: transform;
}
.vsheet.is-open .vsheet-panel { transform: none; }
.vsheet-panel.is-dragging { transition: none; }

.vsheet-grab {
	flex: none;
	width: 40px;
	height: 4px;
	margin: 10px auto 2px;
	border-radius: 4px;
	background: var(--velyon-border);
}
.vsheet-head {
	flex: none;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 18px 12px;
	touch-action: none; /* the head is the swipe-down handle */
}
.vsheet-head h2 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.vsheet-head p { margin: 3px 0 0; font-size: 13px; color: var(--velyon-text-muted); }
.vsheet-x {
	flex: none;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--velyon-border);
	background: var(--velyon-surface-alt);
	color: var(--velyon-text-muted);
}
.vsheet-x svg { width: 18px; height: 18px; }
.vsheet-x:focus-visible { outline: 2px solid var(--velyon-accent); outline-offset: 2px; }

.vsheet-list {
	list-style: none;
	margin: 0;
	padding: 4px 12px 6px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.vsheet-item {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 64px;
	padding: 10px 12px;
	border-radius: var(--velyon-radius-m);
	color: var(--velyon-text);
}
.vsheet-item:active,
.vsheet-item:hover { background: var(--velyon-surface-alt); }
.vsheet-item:focus-visible { outline: 2px solid var(--velyon-accent); outline-offset: -2px; }
.vsheet-item.is-active { background: color-mix(in srgb, var(--velyon-accent) 10%, var(--velyon-surface)); }
.vsheet-ico {
	flex: none;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: color-mix(in srgb, var(--velyon-accent) 14%, var(--velyon-surface-alt));
	color: var(--velyon-accent-deep);
}
.vsheet-ico svg { width: 22px; height: 22px; }
.vsheet-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vsheet-t { font-family: var(--velyon-font-heading); font-size: 15px; font-weight: 700; line-height: 1.3; }
.vsheet-s { font-size: 12.5px; color: var(--velyon-text-muted); line-height: 1.35; }
.vsheet-go { flex: none; color: var(--velyon-text-muted); }
.vsheet-go svg { width: 18px; height: 18px; }

/* The page behind must not scroll while a sheet is open. */
body.has-sheet-open { overflow: hidden; }

/* Sheets belong to the phone tab bar only. */
@media (min-width: 783px) {
	.vsheet { display: none !important; }
}
