/**
 * Fullscreen Beskid services hub — square icon tiles.
 */

/* Host is a layout-transparent wrapper when used as <beskid-hub>. */
beskid-hub {
	display: contents;
}

.beskid-hub-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 1px solid var(--platform-spec-card-border, var(--border));
	border-radius: 0.5rem;
	background: color-mix(
		in srgb,
		var(--platform-spec-surface-strong, var(--card)) 88%,
		transparent
	);
	color: var(--beskid-primary, var(--foreground));
	cursor: pointer;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease;
}

.beskid-hub-trigger:hover,
.beskid-hub-trigger:focus-visible {
	border-color: color-mix(in srgb, var(--beskid-primary) 40%, var(--border));
	box-shadow: 0 2px 8px
		color-mix(in srgb, var(--beskid-primary-container) 22%, transparent);
}

.beskid-hub-trigger:focus-visible {
	outline: 2px solid var(--beskid-primary);
	outline-offset: 2px;
}

.beskid-hub-trigger__icon {
	display: block;
	width: 1.15rem;
	height: 1.15rem;
}

.beskid-hub::backdrop {
	background: var(--platform-spec-overlay-scrim, rgb(0 0 0 / 0.55));
	backdrop-filter: blur(4px);
}

.beskid-hub {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--platform-spec-surface, var(--background));
	color: var(--foreground);
	overflow: hidden;
}

.beskid-hub[open] {
	display: flex;
	flex-direction: column;
}

.beskid-hub__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-shrink: 0;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--platform-spec-divider, var(--border));
}

.beskid-hub__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.beskid-hub__subtitle {
	margin: 0.2rem 0 0;
	font-size: 0.8125rem;
	color: var(--muted-foreground, var(--platform-spec-tab-text));
}

.beskid-hub__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--platform-spec-card-border, var(--border));
	border-radius: 0.5rem;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.beskid-hub__close:hover,
.beskid-hub__close:focus-visible {
	background: color-mix(in srgb, var(--muted) 50%, transparent);
}

.beskid-hub__body {
	flex: 1;
	min-height: 0;
	overflow: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1.5rem;
}

.beskid-hub__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(7.5rem, 9.5rem));
	gap: 1rem;
	justify-content: center;
}

@media (max-width: 420px) {
	.beskid-hub__grid {
		grid-template-columns: repeat(2, minmax(7.5rem, 9.5rem));
	}
}

.beskid-hub__tile {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	aspect-ratio: 1;
	width: 100%;
	padding: 1rem 0.75rem;
	border: 1px solid var(--platform-spec-card-border, var(--border));
	border-radius: 1rem;
	background: var(--platform-spec-card-bg, var(--card));
	color: inherit;
	text-align: center;
	text-decoration: none;
	transition:
		border-color 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease,
		background-color 160ms ease;
}

.beskid-hub__tile:hover,
.beskid-hub__tile:focus-visible {
	border-color: color-mix(in srgb, var(--beskid-primary) 40%, var(--border));
	background: color-mix(
		in srgb,
		var(--beskid-primary-container, var(--accent)) 18%,
		var(--platform-spec-card-bg, var(--card))
	);
	box-shadow: 0 6px 18px
		color-mix(in srgb, var(--beskid-primary-container) 22%, transparent);
	transform: translateY(-2px);
}

.beskid-hub__tile-icon {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	color: var(--beskid-primary, var(--primary));
}

.beskid-hub__tile-label {
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.01em;
}

.beskid-hub-root .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
