:root {
	--rst-cc-accent: #e2001a;
	--rst-cc-text: #1a1a1a;
	--rst-cc-border: #e5e5e5;
	--rst-cc-bg: #ffffff;
	--rst-cc-radius: 6px;
}

#rst-cc-root, #rst-cc-root * {
	box-sizing: border-box;
}

/* KRYTYCZNE: wymusza poszanowanie atrybutu [hidden] mimo że niżej w arkuszu
   ustawiamy display:flex/block na tych samych elementach. Bez tej reguły
   przeglądarka ignorowałaby [hidden] i element byłby zawsze widoczny. */
#rst-cc-bar[hidden],
#rst-cc-overlay[hidden],
#rst-cc-modal[hidden] {
	display: none !important;
}

#rst-cc-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--rst-cc-text);
}

/* ---------- PASEK DOLNY ---------- */
.rst-cc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999998;
	background: var(--rst-cc-bg);
	border-top: 1px solid var(--rst-cc-border);
	box-shadow: 0 -2px 16px rgba(0,0,0,.12);
	padding: 16px 24px;
	animation: rst-cc-slide-up .25s ease-out;
}

@keyframes rst-cc-slide-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

.rst-cc-bar-inner {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	max-width: 1600px;
	margin: 0 auto;
}

.rst-cc-logo {
	max-height: 32px;
	width: auto;
	flex-shrink: 0;
}

.rst-cc-text {
	flex: 1 1 320px;
	min-width: 240px;
}

.rst-cc-text strong {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
}

.rst-cc-text p {
	margin: 0;
	color: #444;
	font-size: 12.5px;
}

.rst-cc-toggles {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.rst-cc-toggles-modal {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--rst-cc-border);
}

.rst-cc-toggle-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 12.5px;
	white-space: nowrap;
}

/* Toggle switch */
.rst-cc-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
}

.rst-cc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.rst-cc-slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background-color: #c7c7c7;
	border-radius: 22px;
	transition: background-color .15s ease;
}

.rst-cc-slider::before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: transform .15s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.rst-cc-switch input:checked + .rst-cc-slider {
	background-color: var(--rst-cc-accent);
}

.rst-cc-switch input:checked + .rst-cc-slider::before {
	transform: translateX(18px);
}

.rst-cc-slider.disabled {
	opacity: .6;
	cursor: not-allowed;
}

.rst-cc-switch-right {
	margin-left: auto;
}

/* Details link + action buttons */
.rst-cc-details-link {
	background: none;
	border: none;
	color: var(--rst-cc-accent);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	padding: 8px 4px;
	white-space: nowrap;
}

.rst-cc-bar-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.rst-cc-btn {
	border: none;
	border-radius: var(--rst-cc-radius);
	padding: 12px 26px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity .15s ease;
}

.rst-cc-btn:hover {
	opacity: .88;
}

.rst-cc-btn-accept {
	background: var(--rst-cc-accent);
	color: #fff;
}

.rst-cc-btn-ghost {
	background: #fff;
	color: var(--rst-cc-text);
	border: 1.5px solid #ccc;
}

.rst-cc-btn-link {
	background: none;
	border: none;
	color: var(--rst-cc-accent);
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	font-size: 13px;
}

/* ---------- OVERLAY + MODAL ---------- */
.rst-cc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.5);
	z-index: 999998;
}

.rst-cc-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(920px, 92vw);
	max-height: 88vh;
	background: var(--rst-cc-bg);
	border-radius: 8px;
	box-shadow: 0 12px 48px rgba(0,0,0,.3);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.rst-cc-modal-header {
	padding: 20px 28px 0;
	flex-shrink: 0;
}

.rst-cc-modal-header .rst-cc-logo {
	max-height: 34px;
	margin-bottom: 16px;
}

.rst-cc-tabs {
	display: flex;
	gap: 32px;
	border-bottom: 1px solid var(--rst-cc-border);
}

.rst-cc-tab {
	background: none;
	border: none;
	padding: 12px 2px;
	font-weight: 700;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.rst-cc-tab.active {
	color: var(--rst-cc-accent);
	border-bottom-color: var(--rst-cc-accent);
}

.rst-cc-modal-body {
	padding: 24px 28px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.rst-cc-panel {
	display: none;
}

.rst-cc-panel.active {
	display: block;
}

.rst-cc-panel-title {
	display: block;
	font-size: 15px;
	margin-bottom: 10px;
}

.rst-cc-panel p {
	margin: 0 0 12px;
	color: #333;
}

.rst-cc-modal-footer {
	padding: 16px 28px;
	border-top: 1px solid var(--rst-cc-border);
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-shrink: 0;
}

/* Accordion (zakładka Szczegóły) */
.rst-cc-accordion-group {
	border-bottom: 1px solid var(--rst-cc-border);
}

.rst-cc-accordion-header {
	width: 100%;
	background: none;
	border: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 0;
	cursor: pointer;
	text-align: left;
}

.rst-cc-accordion-arrow {
	transition: transform .15s ease;
	color: #666;
}

.rst-cc-accordion-header.open .rst-cc-accordion-arrow {
	transform: rotate(180deg);
}

.rst-cc-accordion-title {
	font-weight: 700;
	font-size: 14.5px;
}

.rst-cc-count-badge {
	background: #eee;
	color: #444;
	border-radius: 10px;
	padding: 1px 8px;
	font-size: 11.5px;
	font-weight: 600;
}

.rst-cc-accordion-body {
	display: none;
	padding: 0 0 18px 26px;
}

.rst-cc-accordion-body.open {
	display: block;
}

.rst-cc-cat-desc {
	color: #444;
	font-size: 13px;
	margin-bottom: 14px;
}

.rst-cc-provider-block {
	background: #fafafa;
	border: 1px solid var(--rst-cc-border);
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 12px;
}

.rst-cc-provider-name {
	font-weight: 700;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.rst-cc-cookie-entry {
	padding: 8px 0;
	border-top: 1px solid #eee;
}

.rst-cc-cookie-entry:first-of-type {
	border-top: none;
}

.rst-cc-cookie-name {
	font-weight: 700;
	font-size: 13px;
}

.rst-cc-cookie-purpose {
	font-size: 12.5px;
	color: #444;
	margin: 4px 0;
}

.rst-cc-cookie-meta {
	display: flex;
	gap: 20px;
	font-size: 11.5px;
	color: #888;
	flex-wrap: wrap;
}

.rst-cc-empty {
	color: #888;
	font-size: 13px;
	font-style: italic;
}

.rst-cc-consent-meta {
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid var(--rst-cc-border);
	font-size: 12px;
	color: #777;
}

/* Iframe blocking placeholder */
.rst-cc-iframe-wrap {
	position: relative;
	width: 100%;
	height: 0;
	overflow: hidden;
	background: #f2f2f2;
	border-radius: 6px;
}

.rst-cc-iframe-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.rst-cc-iframe-blocked {
	display: flex;
}

.rst-cc-iframe-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	gap: 14px;
}

.rst-cc-iframe-placeholder p {
	max-width: 420px;
	color: #444;
	font-size: 13.5px;
	margin: 0;
}

/* Policy table (shortcode) */
.rst-cc-policy-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.rst-cc-policy-table th, .rst-cc-policy-table td {
	border: 1px solid var(--rst-cc-border);
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.rst-cc-policy-table th {
	background: #f7f7f7;
}

/* Responsywność */
@media (max-width: 782px) {
	.rst-cc-bar-inner {
		flex-direction: column;
		align-items: stretch;
	}
	.rst-cc-toggles {
		justify-content: space-between;
	}
	.rst-cc-bar-actions {
		justify-content: stretch;
	}
	.rst-cc-bar-actions .rst-cc-btn {
		flex: 1;
	}
	.rst-cc-modal {
		width: 94vw;
		max-height: 92vh;
	}
	.rst-cc-modal-body {
		padding: 18px;
	}
}
