/* STAB Consent Banner - matches stabmag.com (Noto Sans JP, #111 buttons, 1px letter-spacing) */
.stab-cc-banner,
.stab-cc-modal {
	--stab-cc-bg: #ffffff;
	--stab-cc-text: #111111;
	--stab-cc-muted: #444444;
	--stab-cc-border: #111111;
	--stab-cc-divider: #e5e5e5;
	--stab-cc-font: "Noto Sans JP", Arial, sans-serif;
	box-sizing: border-box;
	color: var(--stab-cc-text);
	font-family: var(--stab-cc-font);
	font-size: 14px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.stab-cc-banner *,
.stab-cc-modal * {
	box-sizing: border-box;
}

.stab-cc-banner[hidden],
.stab-cc-modal[hidden] {
	display: none !important;
}

/* Layout helpers (see "layout" in the plugin config). */
.stab-cc-banner--suspended {
	visibility: hidden !important;
}

[data-stab-cc-deferred] {
	display: none !important;
}

/* "Cookie Settings" link next to "Privacy" in the theme footer (below it on mobile). */
a[data-stab-consent-open].back-to-top {
	display: inline-block;
	margin-left: 24px;
	white-space: nowrap;
}

@media (max-width: 767px) {
	a[data-stab-consent-open].back-to-top {
		display: block;
		margin: 8px 0 0;
	}
}

.stab-cc-banner p,
.stab-cc-modal p {
	margin: 0 0 8px;
	font-family: var(--stab-cc-font);
	font-size: 13px;
	line-height: 1.6;
	color: var(--stab-cc-muted);
}

.stab-cc-title {
	margin: 0 0 4px !important;
	font-family: var(--stab-cc-font);
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--stab-cc-text) !important;
}

.stab-cc-banner a,
.stab-cc-modal a {
	color: var(--stab-cc-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.stab-cc-logo {
	display: block;
	flex: 0 0 auto;
	width: auto;
	height: 25px;
	max-width: none;
}

/* Banner */
.stab-cc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483600;
	padding: 20px 24px;
	background: var(--stab-cc-bg);
	border-top: 1px solid var(--stab-cc-border);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
}

.stab-cc-banner__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
}

.stab-cc-banner__text {
	flex: 1 1 auto;
}

.stab-cc-banner__text p:last-child {
	margin-bottom: 0;
}

.stab-cc-actions,
.stab-cc-modal__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	flex: 0 0 auto;
}

/* Buttons: same look as the site's Sign In / Subscribe / Load More.
   Accept and Reject share the primary style on purpose (equal weight). */
.stab-cc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	height: 48px;
	margin: 0;
	padding: 0 24px;
	border: 1px solid #111111;
	border-radius: 1px;
	background-color: #111111;
	color: #ffffff;
	font-family: var(--stab-cc-font);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: 0.2s;
}

.stab-cc-btn:hover {
	background-color: #ffffff;
	color: #111111;
}

.stab-cc-btn--ghost {
	background-color: #ffffff;
	color: #111111;
}

.stab-cc-btn--ghost:hover {
	background-color: #111111;
	color: #ffffff;
}

.stab-cc-btn:focus-visible,
.stab-cc-close:focus-visible,
.stab-cc-switch:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 3px;
}

/* Modal */
.stab-cc-locked,
.stab-cc-locked body {
	overflow: hidden !important;
}

.stab-cc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483601;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.stab-cc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.6);
}

.stab-cc-modal__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 600px;
	max-height: 100%;
	background: var(--stab-cc-bg);
	border: 1px solid var(--stab-cc-border);
	border-radius: 1px;
	outline: none;
}

.stab-cc-modal__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--stab-cc-divider);
}

.stab-cc-modal__head .stab-cc-title {
	order: 3;
	width: 100%;
	margin: 16px 0 0 !important;
}

.stab-cc-close {
	appearance: none;
	width: 36px;
	height: 36px;
	margin: 0 -8px 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--stab-cc-text);
	font-family: Arial, sans-serif;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.stab-cc-modal__body {
	padding: 16px 24px;
	overflow-y: auto;
}

.stab-cc-modal__foot {
	justify-content: flex-end;
	padding: 16px 24px 20px;
	border-top: 1px solid var(--stab-cc-divider);
}

.stab-cc-cat {
	padding: 14px 0;
	border-top: 1px solid var(--stab-cc-divider);
}

.stab-cc-cat p {
	margin: 4px 0 0;
}

.stab-cc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.stab-cc-cat__title {
	font-family: var(--stab-cc-font);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--stab-cc-text);
	cursor: pointer;
}

.stab-cc-cat__always {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--stab-cc-muted);
}

/* Switch */
.stab-cc-switch {
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 24px;
	margin: 0;
	border: 1px solid #111111;
	border-radius: 12px;
	background: #ffffff;
	cursor: pointer;
	transition: background 0.2s;
}

.stab-cc-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #111111;
	transition: transform 0.2s, background 0.2s;
}

.stab-cc-switch:checked {
	background: #111111;
}

.stab-cc-switch:checked::after {
	background: #ffffff;
	transform: translateX(20px);
}

/* Mobile */
@media (max-width: 900px) {
	.stab-cc-banner {
		padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
	}

	.stab-cc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.stab-cc-logo {
		align-self: flex-start;
		height: 20px;
	}

	.stab-cc-actions,
	.stab-cc-modal__foot {
		flex-direction: column-reverse;
		gap: 8px;
	}

	.stab-cc-btn {
		width: 100%;
		height: 44px;
	}

	.stab-cc-modal {
		align-items: flex-end;
		padding: 0;
	}

	.stab-cc-modal__box {
		max-width: none;
		max-height: 90%;
		border-width: 1px 0 0;
	}

	.stab-cc-modal__head,
	.stab-cc-modal__body,
	.stab-cc-modal__foot {
		padding-left: 16px;
		padding-right: 16px;
	}
}
