/* Q3D Site Toolkit — cookie banner */
.q3dst-cb, .q3dst-cb-modal, .q3dst-cb-icon {
	--q3dst-bg: #0b1130;
	--q3dst-fg: #ffffff;
	--q3dst-accent: #ff8a1f;
	--q3dst-ink: #0b1130;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
}
.q3dst-cb *, .q3dst-cb-modal * { box-sizing: border-box; }
.q3dst-cb[hidden], .q3dst-cb-modal[hidden], .q3dst-cb-icon[hidden] { display: none !important; }

.q3dst-cb {
	position: fixed;
	z-index: 2147483000;
	bottom: 16px;
	left: 16px;
	width: min(400px, calc(100vw - 32px));
	padding: 18px 18px 16px;
	border-radius: 14px;
	background: var(--q3dst-bg);
	color: var(--q3dst-fg);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .08);
	border-top: 3px solid var(--q3dst-accent);
	animation: q3dst-in .25s ease-out;
}
.q3dst-cb--bottom-right { left: auto; right: 16px; }
.q3dst-cb--bottom { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; padding: 16px max(16px, calc((100vw - 1200px) / 2)); }
.q3dst-cb--bottom .q3dst-cb-title { grid-column: 1; }
.q3dst-cb--bottom .q3dst-cb-text { grid-column: 1; margin-bottom: 0; }
.q3dst-cb--bottom .q3dst-cb-buttons { grid-column: 2; grid-row: 1 / span 2; }
@keyframes q3dst-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q3dst-cb { animation: none; } }

.q3dst-cb-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: inherit; }
.q3dst-cb-text { margin: 0 0 14px; color: inherit; opacity: .9; }
.q3dst-cb-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.q3dst-cb-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.q3dst-cb-buttons .q3dst-cb-btn { flex: 1 1 auto; }

.q3dst-cb-btn {
	min-height: 40px;
	padding: 8px 14px;
	border: 2px solid var(--q3dst-accent);
	border-radius: 8px;
	background: var(--q3dst-accent);
	color: var(--q3dst-ink);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: filter .15s, background .15s;
}
.q3dst-cb-btn:hover { filter: brightness(1.08); }
.q3dst-cb-btn:focus-visible, .q3dst-cb-icon:focus-visible, .q3dst-cb-close:focus-visible { outline: 3px solid #33e1ff; outline-offset: 2px; }
.q3dst-cb-btn.is-ghost { background: transparent; color: var(--q3dst-fg); border-color: rgba(255, 255, 255, .45); }
.q3dst-cb-btn.is-ghost:hover { border-color: var(--q3dst-fg); }

/* Preferences dialog */
.q3dst-cb-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(5, 8, 25, .6);
}
.q3dst-cb-panel {
	position: relative;
	width: min(520px, 100%);
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 22px 22px 18px;
	border-radius: 14px;
	background: var(--q3dst-bg);
	color: var(--q3dst-fg);
	border-top: 3px solid var(--q3dst-accent);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.q3dst-cb-panel .q3dst-cb-title { margin-bottom: 12px; font-size: 18px; }
.q3dst-cb-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.q3dst-cb-close:hover { background: rgba(255, 255, 255, .1); }
.q3dst-cb-cat {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-top: 1px solid rgba(255, 255, 255, .12);
	cursor: pointer;
}
.q3dst-cb-cat > span { flex: 1; }
.q3dst-cb-cat strong { display: block; }
.q3dst-cb-cat small { display: block; opacity: .8; font-size: 13px; }
.q3dst-cb-cat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q3dst-cb-cat i { position: relative; flex: 0 0 auto; width: 44px; height: 26px; border-radius: 26px; background: rgba(255, 255, 255, .25); transition: background .15s; }
.q3dst-cb-cat i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.q3dst-cb-cat input:checked + i { background: var(--q3dst-accent); }
.q3dst-cb-cat input:checked + i::after { transform: translateX(18px); }
.q3dst-cb-cat input:disabled + i { opacity: .6; }
.q3dst-cb-cat input:focus-visible + i { outline: 3px solid #33e1ff; outline-offset: 2px; }
.q3dst-cb-panel .q3dst-cb-buttons { margin-top: 14px; }

/* Corner button */
.q3dst-cb-icon {
	position: fixed;
	z-index: 2147482999;
	bottom: 16px;
	left: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2px solid var(--q3dst-accent);
	border-radius: 50%;
	background: var(--q3dst-bg);
	color: var(--q3dst-accent);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	cursor: pointer;
	opacity: .85;
	transition: opacity .15s, transform .15s;
}
.q3dst-cb-icon:hover { opacity: 1; transform: scale(1.05); }
.q3dst-cb-icon--right { left: auto; right: 16px; }

/* Blocked embed placeholder */
.q3dst-embed-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 200px;
	aspect-ratio: 16 / 9;
	padding: 20px;
	border-radius: 10px;
	background: #0b1130;
	color: #fff;
	text-align: center;
	font-size: 14px;
	--q3dst-accent: #ff8a1f;
	--q3dst-ink: #0b1130;
}
.q3dst-embed-ph p { margin: 0; max-width: 34em; }

/* Public cookie table */
.q3dst-cookie-table table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: .9em; }
.q3dst-cookie-table th, .q3dst-cookie-table td { padding: .5em .6em; border-bottom: 1px solid rgba(127, 127, 127, .25); text-align: left; vertical-align: top; }
.q3dst-cookie-table code { white-space: nowrap; }

@media (max-width: 600px) {
	.q3dst-cb { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 14px; }
	.q3dst-cb--bottom { left: 0; right: 0; bottom: 0; display: block; padding: 14px; }
	.q3dst-cb-buttons .q3dst-cb-btn { flex: 1 1 30%; padding: 8px 10px; }
	.q3dst-cb-icon { bottom: 10px; left: 10px; width: 40px; height: 40px; }
	.q3dst-cb-icon--right { left: auto; right: 10px; }
	.q3dst-cookie-table table, .q3dst-cookie-table tbody, .q3dst-cookie-table tr, .q3dst-cookie-table td { display: block; }
	.q3dst-cookie-table thead { display: none; }
	.q3dst-cookie-table tr { padding: .5em 0; border-bottom: 1px solid rgba(127, 127, 127, .25); }
	.q3dst-cookie-table td { border: 0; padding: .1em 0; }
}
.q3dst-cb-cat strong { font-weight: 700; }
