/* Block "Link area" (blocks/link-area): the link area B of the RUB web
   components (design/README.md) – a RUB Blau square with a white icon, next
   to it a light box with title and button. The button's link stretches over
   the whole area; it stays one link for keyboards and screen readers.
   Part of the RUB Chair theme. */

.rub-link-area {
	background-color: var(--rub-light);
	border-radius: var(--rub-radius-bar);
	display: flex;
	/* 200px high as the library's link area B (square 309 × 200). */
	min-height: 12.5rem;
	position: relative;
	transition: box-shadow var(--rub-transition);
}

.rub-link-area:hover {
	box-shadow: var(--rub-shadow-hover);
}

.rub-link-area:focus-within {
	/* The library's focus: 2px RUB Blau, 4px outside the area. */
	outline: 2px solid var(--rub-accent-text);
	outline-offset: 4px;
}

.rub-link-area__icon {
	align-items: center;
	background-color: var(--rub-blue);
	border-radius: var(--rub-radius-bar);
	color: #fff;
	display: flex;
	flex: 0 0 min(19.3rem, 30%);
	justify-content: center;
}

/* 48 px with a 3 px line, as in the library (Lucide draws on a 24 px grid). */
.rub-link-area__icon .rub-icon {
	height: 3rem;
	stroke-width: 1.5;
	width: 3rem;
}

.rub-link-area__box {
	align-items: center;
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 1.5rem;
	justify-content: center;
	padding: 3rem 2.5rem;
	text-align: center;
}

.rub-link-area__title {
	color: var(--rub-blue);
	/* UI H2 26/32 extra-bold. */
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	line-height: 2rem;
	margin: 0;
}

/* Outlined, as the buttons “All members” and the like: WordPress gives that
   look only to button blocks, not to this server-made button. */
.rub-link-area .wp-block-button__link {
	border: 2px solid currentColor;
	padding: 0.667em 1.333em;
}

.rub-link-area .wp-block-button__link:not(:hover, :focus, :active) {
	background-color: transparent;
	color: var(--rub-blue);
}

.rub-link-area .wp-block-button__link::after {
	content: "";
	inset: 0;
	position: absolute;
}

.rub-link-area .wp-block-button__link:focus-visible {
	outline: none;
}

.rub-link-area__hint {
	color: var(--rub-blue);
	font-style: italic;
}

@media (max-width: 599.98px) {
	.rub-link-area {
		flex-direction: column;
	}

	.rub-link-area__icon {
		flex-basis: 6rem;
	}

	.rub-link-area__box {
		padding: var(--wp--preset--spacing--30);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rub-link-area {
		transition: none;
	}
}
