/**
 * Canonical bottom sheet layout (dock-style, full width).
 * Reference: #createInvoiceModal in motorica-create-document-sheet.css
 * Apply class bottom-sheet--standard on the .bottom-sheet wrapper.
 *
 * FORBIDDEN on --standard sheets:
 * - height: auto on .bottom-sheet-card (collapses flex body)
 * - bottom: 1.5rem / centered floating card on desktop
 */

.bottom-sheet.bottom-sheet--standard {
	position: fixed;
	inset: 0;
	z-index: 1050;
	visibility: hidden;
	pointer-events: none;
}

.bottom-sheet.bottom-sheet--standard.bottom-sheet--open {
	visibility: visible;
	pointer-events: auto;
}

.bottom-sheet.bottom-sheet--standard .bottom-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.bottom-sheet.bottom-sheet--standard.bottom-sheet--open .bottom-sheet-backdrop {
	opacity: 1;
	pointer-events: auto;
}

.bottom-sheet.bottom-sheet--standard .bottom-sheet-card {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 92vh;
	max-height: 92vh;
	background: #fff;
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
	transform: translateY(100%);
	transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.bottom-sheet.bottom-sheet--standard.bottom-sheet--open .bottom-sheet-card {
	transform: translateY(0);
}

.bottom-sheet.bottom-sheet--standard .bottom-sheet-card > form {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-height: 0;
	overflow: hidden;
}

.bottom-sheet.bottom-sheet--standard .bottom-sheet-body {
	overflow-y: auto;
	flex: 1 1 0;
	min-height: 0;
	padding: 1.25rem;
	-webkit-overflow-scrolling: touch;
}

.bottom-sheet.bottom-sheet--standard .bottom-sheet-footer {
	padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid #e2e8f0;
	flex-shrink: 0;
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	flex-wrap: wrap;
}

@media (max-width: 576px) {
	.bottom-sheet.bottom-sheet--standard .bottom-sheet-card {
		height: 95vh;
		max-height: 95vh;
	}

	.bottom-sheet.bottom-sheet--standard .bottom-sheet-body {
		padding: 1rem;
	}
}
