/* MCP CookieCarl — banner styling (theme-neutral, first-party). */

.mcp-cc,
.mcp-cc *,
.mcp-cc *::before,
.mcp-cc *::after { box-sizing: border-box; }

.mcp-cc[hidden] { display: none; }

.mcp-cc {
	position: fixed;
	z-index: 99999;
	font-size: 14.5px;
	line-height: 1.5;
	color: #1d2327;
	-webkit-font-smoothing: antialiased;
}

/* ---- Positioning variants ---- */

/* Default: floating card, bottom-right corner. */
.mcp-cc--corner {
	right: 1.25rem;
	bottom: 1.25rem;
	width: 360px;
	max-width: calc(100vw - 2rem);
}

/* Slim full-width bar at the bottom. */
.mcp-cc--bottom {
	left: 0;
	right: 0;
	bottom: 0;
}
.mcp-cc--bottom .mcp-cc__dialog {
	max-width: 900px;
	margin: 0 auto;
	border-radius: 12px 12px 0 0;
}

/* Centered dialog with dimmed overlay. */
.mcp-cc--center {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(15, 23, 32, 0.55);
}
.mcp-cc--center .mcp-cc__dialog { max-width: 460px; }

/* ---- Card ---- */

.mcp-cc__dialog {
	position: relative;
	background: #fff;
	border-radius: 14px;
	padding: 1.15rem 1.25rem 1.2rem;
	box-shadow: 0 12px 44px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
	border-top: 3px solid var(--mcp-cc-accent, #1a5276);
	animation: mcp-cc-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes mcp-cc-in {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mcp-cc__heading {
	margin: 0 0 .5rem;
	font-size: 1.02rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: .5rem;
	color: #101517;
}
.mcp-cc__heading::before {
	content: "🍪";
	font-size: 1.15rem;
	line-height: 1;
}

.mcp-cc__msg { margin: 0 0 .9rem; color: #3c434a; }

.mcp-cc__link {
	color: var(--mcp-cc-accent, #1a5276);
	text-decoration: none;
	font-weight: 600;
	margin-right: .75rem;
	white-space: nowrap;
}
.mcp-cc__link:hover { text-decoration: underline; }

/* ---- Categories ---- */

.mcp-cc__cats[hidden] { display: none; }
.mcp-cc__cats {
	margin: 0 0 .9rem;
	padding-top: .85rem;
	border-top: 1px solid #e6e7e9;
	max-height: 40vh;
	overflow-y: auto;
}
.mcp-cc__cat {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .15rem .55rem;
	align-items: start;
	margin-bottom: .7rem;
}
.mcp-cc__cat input { margin-top: .2rem; width: 16px; height: 16px; accent-color: var(--mcp-cc-accent, #1a5276); }
.mcp-cc__cat-label { font-weight: 600; }
.mcp-cc__cat-desc { grid-column: 2; font-size: 12.5px; color: #6b7177; }

/* ---- Actions ---- */

.mcp-cc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem;
}

.mcp-cc__btn {
	appearance: none;
	border: 1.5px solid var(--mcp-cc-accent, #1a5276);
	border-radius: 8px;
	padding: .6rem .9rem;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	background: #fff;
	color: var(--mcp-cc-accent, #1a5276);
	transition: filter .15s, background .15s, transform .05s;
}
.mcp-cc__btn:hover { filter: brightness(0.97); }
.mcp-cc__btn:active { transform: translateY(1px); }
.mcp-cc__btn:focus-visible { outline: 2px solid var(--mcp-cc-accent, #1a5276); outline-offset: 2px; }
.mcp-cc__btn[hidden] { display: none; }

/* Reject + Accept share prominence (equal-weight, no dark pattern) and fill one row. */
.mcp-cc__btn--secondary:not(.mcp-cc__btn--settings) { order: 2; flex: 1 1 40%; }
.mcp-cc__btn--primary {
	order: 3;
	flex: 1 1 40%;
	background: var(--mcp-cc-accent, #1a5276);
	color: #fff;
}

/* "Einstellungen" is a subtle full-width ghost link above the decision row. */
.mcp-cc__btn--settings {
	order: 1;
	flex: 1 1 100%;
	border-color: transparent;
	background: transparent;
	color: #6b7177;
	font-weight: 600;
	padding: .35rem;
	text-decoration: underline;
}
.mcp-cc__btn--settings:hover { color: var(--mcp-cc-accent, #1a5276); filter: none; }

/* "Auswahl speichern" spans full width when the category panel is open. */
.mcp-cc__btn--save { order: 4; flex: 1 1 100%; }

/* ---- Reopen pill ---- */

.mcp-cc-reopen {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	z-index: 99998;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: rgba(255, 255, 255, 0.45);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	font-size: 17px;
	line-height: 1;
	opacity: 0.6;
	transition: transform .12s, opacity .15s, background .15s;
}
.mcp-cc-reopen:hover { transform: scale(1.08); opacity: 1; background: rgba(255, 255, 255, 0.9); }
.mcp-cc-reopen[hidden] { display: none; }

/* ---- Mobile: corner card becomes a full-width bottom sheet ---- */
@media (max-width: 600px) {
	.mcp-cc--corner {
		right: 0;
		left: 0;
		bottom: 0;
		width: auto;
		max-width: none;
	}
	.mcp-cc--corner .mcp-cc__dialog {
		border-radius: 14px 14px 0 0;
		margin: 0;
	}
}

/* ---- Dark mode ---- */
@media (prefers-color-scheme: dark) {
	.mcp-cc__dialog { background: #23282d; }
	.mcp-cc__heading { color: #f6f7f7; }
	.mcp-cc__msg { color: #c9cdd1; }
	.mcp-cc__cats { border-top-color: #3c434a; }
	.mcp-cc__cat-desc { color: #a7acb1; }
	.mcp-cc__btn { background: #2c3338; }
	.mcp-cc__btn--settings { background: transparent; color: #a7acb1; }
	.mcp-cc-reopen { background: rgba(40, 44, 48, 0.5); border-color: rgba(255, 255, 255, 0.12); }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.mcp-cc__dialog { animation: none; }
	.mcp-cc-reopen { transition: none; }
}
