/**
 * BioBoo.st — cookie banner & privacy modal (Scientific Luxury, local fonts only).
 * Paths: this file is in assets/css/ → fonts at ../../fonts/consent-ui/
 */

/* --- IBM Plex Mono 400 (subset files from self-hosted bundle) --- */
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../fonts/consent-ui/ibm-plex-mono-400-cyrillic-ext.woff2") format("woff2");
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../fonts/consent-ui/ibm-plex-mono-400-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../fonts/consent-ui/ibm-plex-mono-400-vietnamese.woff2") format("woff2");
	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../fonts/consent-ui/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../fonts/consent-ui/ibm-plex-mono-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Manrope 500 / 600 (shared per-unicode files) --- */
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-cyrillic-ext.woff2") format("woff2");
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-greek.woff2") format("woff2");
	unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-vietnamese.woff2") format("woff2");
	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-cyrillic-ext.woff2") format("woff2");
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-greek.woff2") format("woff2");
	unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-vietnamese.woff2") format("woff2");
	unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/consent-ui/manrope-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.bb-consent {
	--bio-white: #f4f6f7;
	--bio-grey: #2c333a;
	--bio-green: #00ff41;
	--bio-glass: #e0fff4;
	--text-secondary: rgba(44, 51, 58, 0.72);
	--glass-bg: rgba(255, 255, 255, 0.72);
	--glass-border: 1px solid rgba(255, 255, 255, 0.85);
	--radius-toast: 12px;
	--radius-modal: 16px;
	--radius-btn: 12px;
	--font-ui: Manrope, system-ui, -apple-system, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, monospace;
	--shadow-soft: 0 8px 32px rgba(5, 10, 24, 0.12);
	color: var(--bio-grey);
	font-family: var(--font-ui);
	font-size: 0.9375rem;
	line-height: 1.45;
	box-sizing: border-box;
}

.bb-consent *,
.bb-consent *::before,
.bb-consent *::after {
	box-sizing: border-box;
}

#bb-consent-root[hidden] {
	display: none !important;
}

.bb-consent__toast {
	position: fixed;
	z-index: 99990;
	left: max(1rem, env(safe-area-inset-left));
	right: max(1rem, env(safe-area-inset-right));
	bottom: max(1rem, env(safe-area-inset-bottom));
	max-width: min(100% - 2rem, 52rem);
	margin-inline: auto;
	padding: 1rem 1.125rem;
	background: var(--glass-bg);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border: var(--glass-border);
	border-radius: var(--radius-toast);
	box-shadow: var(--shadow-soft);
}

.bb-consent__text {
	margin: 0 0 0.875rem;
	font-weight: 500;
	color: var(--bio-grey);
}

.bb-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: stretch;
}

.bb-consent__btn {
	min-height: 44px;
	padding: 0.5rem 1rem;
	font-family: var(--font-ui);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	border-radius: var(--radius-btn);
	cursor: pointer;
	border: 2px solid transparent;
	transition: opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.bb-consent__btn:focus-visible {
	outline: 2px solid var(--bio-grey);
	outline-offset: 2px;
}

.bb-consent__btn--accept {
	background: var(--bio-glass);
	color: var(--bio-grey);
	border-color: var(--bio-green);
	box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.25), 0 0 20px rgba(0, 255, 65, 0.15);
}

.bb-consent__btn--accept:hover {
	box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.45), 0 0 24px rgba(0, 255, 65, 0.22);
}

.bb-consent__btn--reject {
	background: var(--bio-white);
	color: var(--bio-grey);
	border-color: var(--bio-grey);
}

.bb-consent__btn--reject:hover {
	background: rgba(44, 51, 58, 0.04);
}

.bb-consent__btn--settings {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 44px;
	background: transparent;
	color: var(--bio-grey);
	border-color: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
	box-shadow: none;
}

.bb-consent__btn--settings:hover {
	opacity: 0.85;
}

.bb-consent__btn--settings svg {
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
}

@media (min-width: 540px) {
	.bb-consent__actions {
		flex-wrap: nowrap;
		align-items: center;
	}

	.bb-consent__btn--accept,
	.bb-consent__btn--reject {
		flex: 1 1 0;
		min-width: 0;
	}

	.bb-consent__btn--settings {
		flex: 0 0 auto;
		padding-inline: 0.75rem;
	}
}

@media (max-width: 539px) {
	.bb-consent__btn--accept,
	.bb-consent__btn--reject,
	.bb-consent__btn--settings {
		width: 100%;
	}
}

/* --- Modal --- */
.bb-consent__dialog {
	max-width: min(100vw - 2rem, 28rem);
	width: 100%;
	padding: 0;
	border: none;
	border-radius: var(--radius-modal);
	background: var(--bio-white);
	color: var(--bio-grey);
	font-family: var(--font-ui);
	box-shadow: var(--shadow-soft), 0 0 0 1px rgba(44, 51, 58, 0.08);
}

.bb-consent__dialog::backdrop {
	background: rgba(5, 10, 24, 0.35);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.bb-consent__dialog::backdrop {
		background: rgba(5, 10, 24, 0.45);
	}
}

.bb-consent__dialog-inner {
	padding: 1.25rem 1.25rem 1rem;
	position: relative;
}

.bb-consent__dialog-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--bio-grey);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 8px;
}

.bb-consent__dialog-close:hover {
	background: rgba(44, 51, 58, 0.06);
}

.bb-consent__dialog-title {
	margin: 0 2rem 1rem 0;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.bb-consent__category {
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(44, 51, 58, 0.1);
}

.bb-consent__category:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.bb-consent__category-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
}

.bb-consent__category-title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
}

.bb-consent__category-desc {
	margin: 0.45rem 0 0;
	font-size: 0.8125rem;
	color: var(--text-secondary);
	line-height: 1.4;
}

/* Toggle */
.bb-consent__switch {
	position: relative;
	width: 3rem;
	height: 1.75rem;
	flex-shrink: 0;
}

.bb-consent__switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.bb-consent__switch-track {
	position: absolute;
	inset: 0;
	display: block;
	background: rgba(44, 51, 58, 0.2);
	border-radius: 999px;
	transition: background 0.15s ease;
}

.bb-consent__switch-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: calc(1.75rem - 6px);
	height: calc(1.75rem - 6px);
	background: var(--bio-white);
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(5, 10, 24, 0.2);
	transition: transform 0.15s ease, background 0.15s ease;
}

.bb-consent__switch input:checked + .bb-consent__switch-track {
	background: rgba(0, 255, 65, 0.45);
}

.bb-consent__switch input:checked + .bb-consent__switch-track .bb-consent__switch-thumb {
	transform: translateX(1.25rem);
	background: var(--bio-grey);
}

.bb-consent__switch input:disabled + .bb-consent__switch-track {
	opacity: 0.55;
	cursor: not-allowed;
}

.bb-consent__switch input:focus-visible + .bb-consent__switch-track {
	outline: 2px solid var(--bio-grey);
	outline-offset: 2px;
}

.bb-consent__dialog-footer {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.25rem 1.25rem;
	border-top: 1px solid rgba(44, 51, 58, 0.08);
	background: rgba(244, 246, 247, 0.6);
	border-radius: 0 0 var(--radius-modal) var(--radius-modal);
}

@media (min-width: 400px) {
	.bb-consent__dialog-footer {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

.bb-consent__dialog-footer .bb-consent__btn {
	flex: 1 1 auto;
	min-width: min(100%, 8rem);
}

.bb-consent__dialog-footer .bb-consent__btn--accept {
	flex: 1 1 auto;
}

/* Footer reopen link */
.bb-consent-footer {
	margin: 0.5rem 0 0;
	text-align: center;
}

.bb-consent-footer__btn {
	background: none;
	border: none;
	padding: 0.35rem 0.5rem;
	font-family: var(--font-ui);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--bio-grey);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	opacity: 0.85;
}

.bb-consent-footer__btn:hover {
	opacity: 1;
}

.bb-consent-footer__btn:focus-visible {
	outline: 2px solid var(--bio-grey);
	outline-offset: 2px;
	border-radius: 4px;
}
