/* Dashboard shell (my-dashboard.php) — one page scrollbar only (viewport) */

.dashboard-shell {
	--dashboard-shell-header-height: 3.625rem;
}

body.dashboard-body.dashboard-shell {
	overflow-x: hidden;
	overflow-y: auto;
}

.dashboard-shell .dashboard-layout {
	min-height: 100vh;
	min-height: 100svh;
	height: auto;
	overflow: visible;
	align-items: flex-start;
}

.dashboard-shell .dashboard-sidebar {
	position: sticky;
	top: 0;
	align-self: flex-start;
	height: 100vh;
	height: 100svh;
	max-height: 100vh;
	max-height: 100svh;
	overflow: hidden;
}

.dashboard-shell.dashboard-with-sidebar .dashboard-content {
	height: auto;
	min-height: 0;
	overflow: visible;
}

.dashboard-shell.dashboard-with-sidebar .dashboard-sidebar:not(.collapsed) .sidebar-header,
.dashboard-shell .dashboard-fy-bar {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--dashboard-shell-header-height);
	height: var(--dashboard-shell-header-height);
}

.dashboard-shell.dashboard-with-sidebar .dashboard-sidebar:not(.collapsed) .sidebar-header {
	padding-block: 0;
	padding-inline: 0.9rem;
}

.dashboard-shell .dashboard-fy-bar {
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	padding-block: 0;
	padding-inline: 1rem;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	position: sticky;
	top: 0;
	z-index: 3;
}

.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
}

.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar__select.form-select {
	max-width: 18rem;
}

.dashboard-shell .dashboard-content.dashboard-content--with-fy {
	display: flex;
	flex-direction: column;
	overflow: visible;
	min-height: 0;
	height: 100%;
}

.dashboard-shell .dashboard-fy-bar[hidden] {
	display: none !important;
}

.dashboard-shell .dashboard-iframe-wrap {
	flex: 1 1 auto;
	min-height: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 0;
	background: var(--sidebar-bg);
	overflow: visible;
}

.dashboard-shell .dashboard-iframe-wrap:has(iframe[src*="payment/checkout"]),
.dashboard-shell .dashboard-iframe-wrap:has(iframe[src*="subscription-expired"]) {
	background: #fff;
}

.dashboard-shell.dashboard-shell--embed-light,
.dashboard-shell.dashboard-shell--embed-light.dashboard-body {
	background: #fff !important;
}

.dashboard-shell.dashboard-shell--embed-light .dashboard-content,
.dashboard-shell.dashboard-shell--embed-light .dashboard-iframe-wrap {
	background: #fff !important;
}

.dashboard-shell.dashboard-shell--embed-light .dashboard-iframe-wrap iframe {
	background: #fff;
}

.dashboard-shell.dashboard-shell--razorpay-active .dashboard-sidebar {
	z-index: 1;
}

.dashboard-shell.dashboard-shell--razorpay-active .dashboard-iframe-wrap {
	position: fixed;
	inset: 0;
	z-index: 10050;
	background: #fff;
	padding: 0;
	margin: 0;
}

.dashboard-shell.dashboard-shell--razorpay-active .dashboard-iframe-wrap iframe {
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height: none !important;
}

.dashboard-shell.dashboard-shell--razorpay-active .dashboard-fy-bar {
	visibility: hidden;
	pointer-events: none;
}

.dashboard-shell .dashboard-iframe-wrap iframe {
	flex: 1 1 auto;
	min-height: 200px;
	width: 100%;
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	display: block;
	overflow: visible;
}

@media (max-width: 991.98px) {
	.dashboard-shell .dashboard-iframe-wrap {
		padding: 0;
	}

	.dashboard-shell .dashboard-iframe-wrap iframe {
		border-radius: 0;
		box-shadow: none;
	}

	.dashboard-shell .dashboard-fy-bar {
		flex-wrap: nowrap;
		align-items: center;
		min-height: var(--dashboard-shell-header-height);
		height: auto;
		padding-block: 0.625rem;
		padding-inline: 0.75rem;
	}

	.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		flex-wrap: nowrap;
		gap: 0.5rem 0.65rem;
		width: 100%;
	}

	.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar__label {
		align-self: center;
		margin: 0;
		line-height: 1.25;
	}

	.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar__select.form-select,
	.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar select.fiscal-year-toolbar__select.form-select-sm {
		grid-column: 2;
		align-self: center;
		width: 100%;
		max-width: none;
		min-width: 0;
		margin: 0;
	}

	.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar__past-badge,
	.dashboard-shell .dashboard-fy-bar .fiscal-year-toolbar__current-badge {
		grid-column: 3;
		align-self: center;
		flex-shrink: 0;
		margin: 0;
		white-space: nowrap;
	}
}
