/*
 * Mrvica Cookie Consent — banner styles.
 * Defensive defaults: every panel is hidden by default with [hidden] attr.
 * Only JS-controlled state flips visibility. This avoids the FAZ-style "modal
 * content leaks onto the page" bug.
 */

.mcc-root,
.mcc-root *,
.mcc-root *::before,
.mcc-root *::after {
	box-sizing: border-box;
}

.mcc-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--mcc-text, #222);
	line-height: 1.45;
	font-size: 14px;
}

/* Critical: hidden attr must remove from layout. */
.mcc-root[hidden],
.mcc-root [hidden] {
	display: none !important;
}

/* ---------- Banner ---------- */
.mcc-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 2147483600;
	background: var(--mcc-bg, #fff);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	padding: 18px 20px;
	max-height: 80vh;
	overflow: auto;
}

.mcc-root.mcc-pos-bottom .mcc-banner { bottom: 0; }
.mcc-root.mcc-pos-top .mcc-banner    { top: 0; box-shadow: 0 4px 24px rgba(0,0,0,0.12); }
.mcc-root.mcc-pos-center .mcc-banner {
	top: 50%;
	left: 50%;
	right: auto;
	transform: translate(-50%, -50%);
	max-width: 560px;
	width: calc(100% - 32px);
	border-radius: 10px;
	max-height: 90vh;
}

.mcc-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

.mcc-banner-text { flex: 1 1 360px; min-width: 0; }
.mcc-title       { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.mcc-message     { margin: 0; font-size: 14px; color: var(--mcc-text, #222); }
.mcc-policy-link {
	margin-left: 6px;
	color: var(--mcc-primary, #0056a7);
	text-decoration: underline;
}

.mcc-banner-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.mcc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	border-radius: 6px;
	border: 1px solid transparent;
	background: #f3f4f6;
	color: var(--mcc-text, #222);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
	transition: filter .12s ease;
	min-height: 40px;
}
.mcc-btn:hover  { filter: brightness(0.95); }
.mcc-btn:focus  { outline: 2px solid var(--mcc-primary, #0056a7); outline-offset: 2px; }

.mcc-btn-customize { background: #f3f4f6; color: var(--mcc-text); }
.mcc-btn-reject    { background: var(--mcc-reject, #dc3545); color: #fff; }
.mcc-btn-accept    { background: var(--mcc-accept, #28a745); color: #fff; }
.mcc-btn-save      { background: var(--mcc-primary, #0056a7); color: #fff; }

/* ---------- Modal ---------- */
.mcc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483601;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mcc-modal-overlay {
	position: absolute;
	inset: 0;
	background: var(--mcc-overlay, rgba(0,0,0,0.5));
}
.mcc-modal-box {
	position: relative;
	background: var(--mcc-bg, #fff);
	border-radius: 10px;
	max-width: 560px;
	width: calc(100% - 32px);
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.mcc-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
}
.mcc-modal-header h2 { margin: 0; font-size: 18px; }
.mcc-modal-close {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0 4px;
}
.mcc-modal-body {
	padding: 16px 20px;
	overflow-y: auto;
	flex: 1 1 auto;
}
.mcc-modal-footer {
	display: flex;
	gap: 8px;
	padding: 14px 20px;
	border-top: 1px solid #eee;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* ---------- Category rows ---------- */
.mcc-category {
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}
.mcc-category:last-child { border-bottom: none; }
.mcc-cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	font-weight: 600;
	cursor: pointer;
}
.mcc-cat-label { font-size: 15px; }
.mcc-cat-desc {
	margin: 6px 0 0;
	font-size: 13px;
	color: #555;
	font-weight: 400;
}

/* Toggle switch */
.mcc-toggle {
	position: relative;
	width: 44px;
	height: 24px;
	display: inline-block;
	flex-shrink: 0;
}
.mcc-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}
.mcc-slider {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 24px;
	transition: background .15s ease;
}
.mcc-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s ease;
}
.mcc-toggle input:checked + .mcc-slider { background: var(--mcc-accept, #28a745); }
.mcc-toggle input:checked + .mcc-slider::before { transform: translateX(20px); }
.mcc-toggle input:disabled + .mcc-slider { opacity: 0.6; cursor: not-allowed; }

/* ---------- Revisit button ---------- */
.mcc-revisit {
	position: fixed;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: var(--mcc-primary, #0056a7);
	color: #fff;
	cursor: pointer;
	z-index: 2147483599;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: transform .15s ease;
}
.mcc-revisit:hover { transform: scale(1.06); }
.mcc-revisit.mcc-revisit-bottom-left  { bottom: 16px; left: 16px; }
.mcc-revisit.mcc-revisit-bottom-right { bottom: 16px; right: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.mcc-banner-inner { flex-direction: column; align-items: stretch; }
	.mcc-banner-actions { justify-content: stretch; }
	.mcc-btn { flex: 1 1 auto; }
}
