/* Ko-fi support page */
.kofi-page { max-width: 740px; margin: 0 auto; padding: 24px 0 24px; }

.kofi-card {
	background: #ffffff;
	background-image: url("./images/kofi_logo.png");
	background-repeat: no-repeat;
	background-position: 50% 50%;
	border: 1px solid #e7e7e7;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

/* Card header */
.kofi-card-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 4px 22px;
	background: linear-gradient(135deg, #29abe0 0%, #1f8fc0 100%);
	color: #ffffff;
}
.kofi-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 80px;
	height: 80px;
	background-image: url('./images/kofi_symbol.png');
	background-repeat: no-repeat;
	background-position: center;
	background-size: 60px auto;
}
.kofi-card-icon i { color: #ffffff; }
h2.kofi-h2 { margin: 0; padding: 0; border: 0; font-size: 2.3em; line-height: 2; color: #ffffff; }

/* Card body */
.kofi-card-body { padding: 22px 22px 2px 22px; }
.kofi-text { font-size: 1.3em; line-height: 1.7; }
.kofi-text.kofi-disabled { font-size: 1.5em; text-align: center; padding: 12px 0; color: #888888; }

/* Support button */
.kofi-button-wrap { margin-top: 24px; text-align: center; }
.kofi-btn { display: inline-block; cursor: pointer; padding: 0; border: 0; background: none; line-height: 0; }
.kofi-btn img {
	display: block;
	border-radius: 16px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.40);
}
.kofi-btn:hover img { filter: brightness(0.9);box-shadow: 0 2px 6px rgba(0, 0, 0, 0.50); }
.kofi-btn:active img { filter: brightness(0.9); }
.kofi-btn:focus { outline: none; }
.kofi-btn:focus-visible img { outline: none; }

/* Footer support button */
.kofi-footer-button { text-align: center; margin: 14px 0; }

/* Ko-fi popup modal */
.kofi-modal {
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.kofi-modal[hidden] { display: none; }
.kofi-backdrop {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
}
.kofi-dialog {
	position: relative;
	background: #ffffff;
	border-radius: 14px;
	padding: 10px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
.kofi-dialog iframe {
	display: block;
	border: none;
	border-radius: 8px;
	width: 360px;
	max-width: 90vw;
	height: 712px;
	max-height: 80vh;
}
.kofi-close {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: #ffffff;
	color: #333333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	transition: transform .12s ease, background .12s ease;
}
.kofi-close:hover { transform: scale(1.08); background: #f2f2f2; }
.kofi-close:focus-visible { outline: 2px solid #29abe0; outline-offset: 2px; }

/* Dark mode (phpBB 4.0 / styles that set html.phpbb-dark-mode) */
html.phpbb-dark-mode .kofi-card { background: #1f1f23; border-color: #34343a; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5); }
html.phpbb-dark-mode .kofi-card-header { background: linear-gradient(135deg, #1f8fc0 0%, #176f96 100%); }
html.phpbb-dark-mode .kofi-text { color: #d8d8dc; }
html.phpbb-dark-mode .kofi-text.kofi-disabled { color: #9a9aa0; }
html.phpbb-dark-mode .kofi-dialog { background: #1f1f23; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7); }
html.phpbb-dark-mode .kofi-close { background: #2c2c31; color: #e6e6e6; }
html.phpbb-dark-mode .kofi-close:hover { background: #3a3a40; }

/* Mobile */
@media (max-width: 700px) {
	.kofi-card-header { padding: 14px 16px; }
	.kofi-card-body { padding: 16px; }
	.kofi-card-icon { width: 50px; height: 50px; background-size: 34px auto; }
	h2.kofi-h2 { font-size: 1.8em; }
}