/**
 * WP Cookie Notice - Style Frontend
 */

:root {
	--wpcn-bg-color: #1e293b;
	--wpcn-text-color: #f8fafc;
	--wpcn-primary-btn-bg: #2563eb;
	--wpcn-primary-btn-text: #ffffff;
	--wpcn-secondary-btn-bg: #334155;
	--wpcn-secondary-btn-text: #ffffff;
	--wpcn-accent-color: #38bdf8;
	--wpcn-border-radius: 12px;
	--wpcn-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--wpcn-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* GŁÓWNY BANER */
.wpcn-banner {
	position: fixed;
	z-index: 999990;
	box-sizing: border-box;
	font-family: var(--wpcn-font-family);
	background-color: var(--wpcn-bg-color);
	color: var(--wpcn-text-color);
	box-shadow: var(--wpcn-shadow);
	padding: 18px 24px;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
	line-height: 1.5;
	font-size: 14px;
}

.wpcn-banner *,
.wpcn-modal * {
	box-sizing: border-box;
}

/* POZYCJE BANERA */
.wpcn-banner.wpcn-pos-bottom-bar {
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wpcn-banner.wpcn-pos-top-bar {
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wpcn-banner.wpcn-pos-bottom-right {
	bottom: 24px;
	right: 24px;
	max-width: 460px;
	width: calc(100% - 48px);
	border-radius: var(--wpcn-border-radius);
}

.wpcn-banner.wpcn-pos-bottom-left {
	bottom: 24px;
	left: 24px;
	max-width: 460px;
	width: calc(100% - 48px);
	border-radius: var(--wpcn-border-radius);
}

.wpcn-banner.wpcn-pos-modal-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 520px;
	width: calc(100% - 32px);
	border-radius: var(--wpcn-border-radius);
}

/* UKŁAD I ELEMENTY BANERA */
.wpcn-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.wpcn-pos-bottom-right .wpcn-container,
.wpcn-pos-bottom-left .wpcn-container,
.wpcn-pos-modal-center .wpcn-container {
	flex-direction: column;
	align-items: stretch;
}

.wpcn-content {
	flex: 1 1 500px;
}

.wpcn-title {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--wpcn-text-color);
	line-height: 1.3;
}

.wpcn-text {
	margin: 0;
	font-size: 13.5px;
	opacity: 0.95;
}

.wpcn-privacy-link {
	display: inline-block;
	margin-left: 6px;
	color: var(--wpcn-accent-color);
	text-decoration: underline;
	font-weight: 600;
	transition: opacity 0.2s;
}

.wpcn-privacy-link:hover {
	opacity: 0.8;
}

/* PRZYCISKI */
.wpcn-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.wpcn-pos-bottom-right .wpcn-actions,
.wpcn-pos-bottom-left .wpcn-actions,
.wpcn-pos-modal-center .wpcn-actions {
	justify-content: flex-end;
	margin-top: 12px;
}

.wpcn-btn {
	cursor: pointer;
	border: none;
	outline: none;
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 600;
	border-radius: calc(var(--wpcn-border-radius) / 1.5);
	transition: filter 0.2s ease, transform 0.1s ease;
	white-space: nowrap;
	font-family: inherit;
}

.wpcn-btn:active {
	transform: scale(0.98);
}

.wpcn-btn-primary {
	background-color: var(--wpcn-primary-btn-bg);
	color: var(--wpcn-primary-btn-text);
}

.wpcn-btn-primary:hover {
	filter: brightness(1.1);
}

.wpcn-btn-secondary {
	background-color: var(--wpcn-secondary-btn-bg);
	color: var(--wpcn-secondary-btn-text);
}

.wpcn-btn-secondary:hover {
	filter: brightness(1.15);
}

.wpcn-btn-outline {
	background: transparent;
	color: var(--wpcn-text-color);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.wpcn-btn-outline:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* MODAL PREFERENCJI */
.wpcn-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: var(--wpcn-font-family);
}

.wpcn-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(2px);
}

.wpcn-modal-dialog {
	position: relative;
	background: var(--wpcn-bg-color);
	color: var(--wpcn-text-color);
	border-radius: var(--wpcn-border-radius);
	max-width: 580px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
}

.wpcn-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wpcn-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--wpcn-text-color);
}

.wpcn-modal-close {
	background: transparent;
	border: none;
	color: var(--wpcn-text-color);
	font-size: 26px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.wpcn-modal-close:hover {
	opacity: 1;
}

.wpcn-modal-body {
	padding: 20px 24px;
	font-size: 14px;
}

.wpcn-modal-desc {
	margin: 0 0 20px 0;
	font-size: 13px;
	opacity: 0.85;
	line-height: 1.5;
}

.wpcn-category-item {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: calc(var(--wpcn-border-radius) / 1.5);
	padding: 14px 16px;
	margin-bottom: 12px;
}

.wpcn-category-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.wpcn-category-title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.wpcn-category-title-wrap h4 {
	margin: 0;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--wpcn-text-color);
}

.wpcn-badge-always-active {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	background: rgba(34, 197, 94, 0.2);
	color: #4ade80;
	border-radius: 999px;
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.wpcn-category-desc {
	margin: 0;
	font-size: 12.5px;
	opacity: 0.8;
	line-height: 1.45;
}

.wpcn-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	justify-content: flex-end;
}

/* PRZEŁĄCZNIKI (SWITCH) */
.wpcn-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

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

.wpcn-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.2);
	transition: 0.3s;
	border-radius: 24px;
}

.wpcn-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
}

.wpcn-switch input:checked + .wpcn-slider {
	background-color: var(--wpcn-primary-btn-bg);
}

.wpcn-switch input:checked + .wpcn-slider:before {
	transform: translateX(20px);
}

.wpcn-switch.disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.wpcn-switch.disabled .wpcn-slider {
	cursor: not-allowed;
	background-color: #22c55e;
}

/* PŁYWAJĄCY PRZYCISK (BADGE) */
.wpcn-badge {
	position: fixed;
	bottom: 20px;
	z-index: 999980;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: var(--wpcn-primary-btn-bg);
	color: var(--wpcn-primary-btn-text);
	border: 2px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, filter 0.2s ease;
	outline: none;
}

.wpcn-badge:hover {
	transform: scale(1.1);
	filter: brightness(1.1);
}

.wpcn-badge-bottom-left {
	left: 20px;
}

.wpcn-badge-bottom-right {
	right: 20px;
}

/* RESPONSYWNOŚĆ MOBILNA */
@media (max-width: 640px) {
	.wpcn-container {
		flex-direction: column;
		align-items: stretch;
	}

	.wpcn-actions {
		flex-direction: column;
		width: 100%;
	}

	.wpcn-btn {
		width: 100%;
		text-align: center;
		padding: 11px 16px;
	}

	.wpcn-banner.wpcn-pos-bottom-right,
	.wpcn-banner.wpcn-pos-bottom-left {
		bottom: 12px;
		left: 12px;
		right: 12px;
		width: calc(100% - 24px);
		max-width: none;
	}
}
