/*
 * Sponsor Tab — front-end styles.
 *
 * Colours arrive as custom properties from the active campaign; the values here
 * are only fallbacks.
 *
 * The geometry below reproduces the Elementor tab it replaces. Before release,
 * sample the live button and confirm these six values against production:
 * background/text colours, hover colours, --sponsor-tab-top, the font stack and
 * size, the padding/border-radius, and the label's rotation direction.
 */

.sponsor-tab {
	--sponsor-tab-bg: #2a72b5;
	--sponsor-tab-fg: #ffffff;
	--sponsor-tab-bg-hover: #1f5f99;
	--sponsor-tab-fg-hover: #ffffff;
	--sponsor-tab-top: 26%;

	position: fixed;
	top: var(--sponsor-tab-top);
	right: 0;
	z-index: 99990;

	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;

	box-sizing: border-box;
	margin: 0;
	padding: 18px 10px;
	border: 0;
	border-radius: 6px 0 0 6px;

	background-color: var(--sponsor-tab-bg);
	color: var(--sponsor-tab-fg);

	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-decoration: none;

	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	transition: background-color 0.18s ease, color 0.18s ease;
}

.sponsor-tab:hover,
.sponsor-tab:focus {
	background-color: var(--sponsor-tab-bg-hover);
	color: var(--sponsor-tab-fg-hover);
	text-decoration: none;
}

.sponsor-tab:focus-visible {
	outline: 2px solid var(--sponsor-tab-fg);
	outline-offset: 2px;
}

.sponsor-tab__label {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	white-space: nowrap;
}

.sponsor-tab__icon {
	display: flex;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}

/*
 * Scoped to the svg element only, never to its descendants: children that carry
 * their own fill (a multi-colour advertiser logo) keep it, while a monochrome
 * icon inherits the tab's text colour.
 */
.sponsor-tab__icon svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

@media (max-width: 782px) {
	.sponsor-tab {
		gap: 6px;
		padding: 14px 8px;
		font-size: 12px;
	}

	.sponsor-tab__icon {
		width: 14px;
		height: 14px;
	}
}

@media print {
	.sponsor-tab {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sponsor-tab {
		transition: none;
	}
}
