/*
 * PowerBI Dashboard template.
 *
 * Colours follow the dashboards themselves: a black band for the tabs, a pale
 * blue-grey canvas, white bordered cards.
 *
 * The embed runs edge to edge between the theme's header and footer, with no
 * margin or padding. Its height is set by script from its width, so the 16:9
 * report fills the full width (--tf-powerbi-height); the fallback is used
 * without JavaScript.
 *
 * Optional override from a theme: --tf-powerbi-crop (default 0px) crops that
 * many pixels from the bottom of each embed, which hides Power BI's own footer
 * bar (page arrows, zoom, share). Leave it alone unless that is wanted.
 */

.tf-powerbi {
	--tf-powerbi-ink: #000;
	--tf-powerbi-canvas: #e9eef1;
	--tf-powerbi-focus: #1a5fb4;

	box-sizing: border-box;
	margin: 0;
	padding: 0;
	color: #1a1a1a;
}

/* Author display rules would otherwise override the hidden attribute. */
.tf-powerbi [hidden] {
	display: none !important;
}

/* Visible to screen readers, not on screen (used for the page title). */
.tf-powerbi__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Password form (and the "no dashboards" message) ------------------------ */

.tf-powerbi__gate {
	box-sizing: border-box;
	width: 100%;
	max-width: 36rem;
	margin: 0 auto;
	padding: 3rem 1rem;
}

.tf-powerbi__intro {
	margin: 0 0 1rem;
	font-size: 1.1rem;
}

.tf-powerbi .post-password-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.tf-powerbi .post-password-form input[type="password"] {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 22rem;
	margin-top: 0.25rem;
	padding: 0.6rem 0.75rem;
	font: inherit;
	border: 2px solid var(--tf-powerbi-ink);
}

.tf-powerbi .post-password-form input[type="submit"] {
	padding: 0.6rem 1.25rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--tf-powerbi-ink);
	border: 2px solid var(--tf-powerbi-ink);
	cursor: pointer;
}

.tf-powerbi__tab:focus-visible,
.tf-powerbi .post-password-form input:focus-visible {
	outline: 3px solid var(--tf-powerbi-focus);
	outline-offset: 2px;
}

/* Tabs ------------------------------------------------------------------- */

.tf-powerbi__tabs {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	gap: 0.25rem;
	padding: 0.4rem 0.5rem 0;
	background: var(--tf-powerbi-ink);
}

.tf-powerbi__tab {
	padding: 0.6rem 1.1rem;
	font: inherit;
	color: #d6d6d6;
	background: transparent;
	border: 0;
	border-radius: 0.4rem 0.4rem 0 0;
	cursor: pointer;
}

.tf-powerbi__tab:hover {
	color: #fff;
}

.tf-powerbi__tab[aria-selected="true"] {
	font-weight: 600;
	color: var(--tf-powerbi-ink);
	background: var(--tf-powerbi-canvas);
}

/* Embed ------------------------------------------------------------------ */

.tf-powerbi__panel {
	position: relative;
	height: var(--tf-powerbi-height, 56.25vw);
	min-height: 30rem;
	overflow: hidden;
	background: #fff;
}

.tf-powerbi__iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: calc(100% + var(--tf-powerbi-crop, 0px));
	border: 0;
	background: #fff;
}

/* Authenticated embed: the Power BI library draws its own iframe in here. */
.tf-powerbi__report {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #fff;
}

.tf-powerbi__report iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Shown instead of an embed that cannot be drawn. Never a link to the public dashboard. */
.tf-powerbi__notice {
	box-sizing: border-box;
	max-width: 36rem;
	margin: 0 auto;
	padding: 3rem 1rem;
	font-size: 1.1rem;
}
