/*
 * SI Tips 1.0.2 color contrast (WCAG relative luminance):
 * - Ko-fi logo card: #ffffff on #0b6a99 = 5.94:1
 * - Caption text #1f2937 on #f5f7fa = 13.68:1
 * - Hint text #5f6b7a on #f5f7fa = 5.06:1
 * - Focus ring #1f2937 against tips background #f5f7fa = 13.68:1 (needs >= 3:1)
 */

.si-tips {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 2rem 0 0;
	padding: 1.25rem 1.35rem;
	border: 1px solid #e3e8ee;
	border-radius: 12px;
	background: #f5f7fa;
	color: #1f2937;
	container-type: inline-size;
}

.si-tips *,
.si-tips *::before,
.si-tips *::after {
	box-sizing: border-box;
}

.si-tips__text {
	margin: 0 0 1rem;
	font-size: 1rem;
	line-height: 1.65;
}

.si-tips__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 1.25rem;
}

.si-tips__tile {
	display: flex;
	flex: 0 0 200px;
	flex-direction: column;
	align-items: center;
	width: 200px;
	min-width: 0;
}

.si-tips a.si-tips__kofi,
.si-tips a.si-tips__kofi:link,
.si-tips a.si-tips__kofi:visited {
	display: block;
	overflow: hidden;
	border: 0;
	border-radius: 12px;
	color: inherit !important;
	line-height: 0;
	text-decoration: none !important;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.si-tips a.si-tips__kofi:hover,
.si-tips a.si-tips__kofi:active,
.si-tips a.si-tips__kofi:focus {
	color: inherit !important;
	text-decoration: none !important;
}

.si-tips a.si-tips__kofi:hover {
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
	transform: translateY(-1px);
}

.si-tips a.si-tips__kofi:focus-visible {
	outline: 3px solid #1f2937;
	outline-offset: 3px;
}

.si-tips a.si-tips__kofi:focus:not(:focus-visible) {
	outline: none;
}

.si-tips__kofi-logo {
	display: block;
	width: 100%;
	height: 100%;
}

.si-tips__qr {
	width: 200px;
	max-width: 100%;
	margin: 0;
	padding: 0;
	text-align: center;
}

.si-tips figure.si-tips__qr {
	margin: 0;
	padding: 0;
}

.si-tips__qr img {
	display: block;
	margin: 0 auto;
	border: 1px solid #e3e8ee;
	border-radius: 12px;
	background: #ffffff;
	object-fit: contain;
}

.si-tips a.si-tips__kofi,
.si-tips__qr img {
	width: 200px;
	height: 200px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
}

.si-tips .si-tips__caption {
	display: block;
	width: 100%;
	margin: 0.75rem 0 0;
	padding: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #1f2937;
	text-align: center;
}

.si-tips__hint {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.8rem;
	line-height: 1.55;
	color: #5f6b7a;
	text-align: center;
}

@media ( max-width: 480px ) {
	.si-tips {
		padding: 1.1rem;
	}

	.si-tips__actions {
		gap: 0.75rem;
	}

	.si-tips__text {
		text-align: center;
	}

	.si-tips__tile {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}

	.si-tips__qr {
		width: 100%;
		max-width: none;
	}

	.si-tips a.si-tips__kofi,
	.si-tips__qr img {
		width: 100%;
		height: auto;
		max-width: 200px;
		aspect-ratio: 1 / 1;
	}
}

@container ( max-width: 239px ) {
	.si-tips__actions {
		flex-direction: column;
		align-items: center;
	}

	.si-tips__tile {
		flex: 0 0 auto;
		width: 100%;
		max-width: 200px;
		margin: 0 auto;
	}

	.si-tips__qr {
		width: 100%;
		max-width: 200px;
		margin: 0 auto;
	}

	.si-tips a.si-tips__kofi,
	.si-tips__qr img {
		width: 100%;
		height: auto;
		max-width: 200px;
		aspect-ratio: 1 / 1;
	}
}
