/**
 * CookieZee — stylistyka RT Accounting (jasny baner)
 */

.cookiezee {
	--cz-bg: #ffffff;
	--cz-surface: #f7f8fa;
	--cz-border: #e5e7eb;
	--cz-text: #1a1a1a;
	--cz-text-muted: #6b7280;
	--cz-purple: #002d72;
	--cz-glow: rgba(0, 45, 114, 0.18);
	--cz-glow-soft: rgba(0, 45, 114, 0.1);
	--cz-btn-bg: #002d72;
	--cz-btn-text: #ffffff;
	--cz-btn-radius: 0;
	--cz-btn-hover-bg: #001a48;
	--cz-btn-hover-text: #ffffff;
	--cz-link: #002d72;
	--cz-accent: #7e2845;
	--cz-font: "Montserrat", sans-serif;
	--cz-z: 999990;
}

html.cookiezee-open {
	overflow: hidden;
}

.cookiezee[hidden] {
	display: none !important;
}

.cookiezee:not([hidden]) {
	display: block;
}

.cookiezee__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 26, 72, 0.72);
	backdrop-filter: blur(2px);
	z-index: var(--cz-z);
}

.cookiezee__dialog {
	position: fixed;
	z-index: calc(var(--cz-z) + 1);
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: var(--cz-bg);
	border: 1px solid var(--cz-border);
	border-radius: 4px;
	box-shadow: 0 20px 56px rgba(0, 26, 72, 0.18);
	color: var(--cz-text);
	font-family: var(--cz-font);
	padding: 28px 32px 24px;
}

.cookiezee__dialog[hidden] {
	display: none !important;
}

.cookiezee__dialog--banner {
	width: min(640px, calc(100vw - 32px));
	text-align: center;
	padding-top: 32px;
}

.cookiezee__dialog--settings {
	width: min(560px, calc(100vw - 32px));
	height: min(640px, calc(100vh - 32px));
	max-height: min(640px, calc(100vh - 32px));
	padding: 24px 22px 20px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.cookiezee__dialog--settings .cookiezee__title {
	flex-shrink: 0;
	margin-bottom: 12px;
}

.cookiezee__settings-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	margin-bottom: 8px;
	padding-right: 6px;
	scrollbar-width: thin;
	scrollbar-color: var(--cz-btn-bg) transparent;
}

.cookiezee__settings-scroll::-webkit-scrollbar,
.cookiezee__dialog--banner::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

.cookiezee__settings-scroll::-webkit-scrollbar-track,
.cookiezee__dialog--banner::-webkit-scrollbar-track {
	background: #f0f0f0;
	border-radius: 999px;
}

.cookiezee__settings-scroll::-webkit-scrollbar-thumb,
.cookiezee__dialog--banner::-webkit-scrollbar-thumb {
	background: var(--cz-btn-bg);
	border-radius: 999px;
}

.cookiezee__dialog--settings .cookiezee__actions--stack {
	flex-shrink: 0;
}

.cookiezee__banner-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}

.cookiezee__icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 45, 114, 0.08);
	color: #002d72;
}

.cookiezee__icon-svg {
	display: block;
	flex-shrink: 0;
}

.cookiezee__title {
	margin: 0 0 16px;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--cz-text);
}

.cookiezee__title--center {
	font-size: 1.4rem;
	margin-bottom: 14px;
	color: #002d72;
}

.cookiezee__text {
	margin: 0 0 24px;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--cz-text-muted);
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.cookiezee__text--center {
	text-align: center;
}

.cookiezee__link {
	color: var(--cz-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}

.cookiezee__link:hover {
	color: #001a48;
}

.cookiezee__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin-bottom: 0;
}

.cookiezee__actions--row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	width: 100%;
	gap: 10px;
}

.cookiezee__actions--row .cookiezee__btn {
	width: 100%;
	min-width: 0;
	white-space: nowrap;
	text-align: center;
	padding-left: 12px;
	padding-right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.cookiezee__btn-icon {
	font-size: 0.85em;
	line-height: 1;
	opacity: 0.95;
}

.cookiezee__actions--stack {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
	margin-bottom: 0;
}

.cookiezee__btn {
	appearance: none;
	border: 1px solid var(--cz-btn-bg);
	border-radius: var(--cz-btn-radius);
	background: var(--cz-btn-bg);
	color: var(--cz-btn-text);
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	padding: 12px 18px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}

.cookiezee__btn:hover,
.cookiezee__btn:focus-visible {
	background: var(--cz-btn-hover-bg);
	border-color: var(--cz-btn-hover-bg);
	color: var(--cz-btn-hover-text);
	outline: none;
}

.cookiezee__btn--ghost {
	background: #fff;
	color: #002d72;
	border-color: #e5e7eb;
}

.cookiezee__btn--ghost:hover,
.cookiezee__btn--ghost:focus-visible {
	background: #f4f4f4;
	color: #001a48;
	border-color: #d1d5db;
}

.cookiezee__btn--block {
	flex: 1 1 0;
	min-width: 0;
	padding: 12px 18px;
	font-size: 0.82rem;
	white-space: normal;
	text-align: center;
}

.cookiezee__categories {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 4px;
}

.cookiezee__category {
	background: var(--cz-surface);
	border: 1px solid var(--cz-border);
	border-radius: 4px;
	overflow: hidden;
}

.cookiezee__category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
}

.cookiezee__category-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	background: none;
	border: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	font-size: 0.9rem;
	text-align: left;
	cursor: pointer;
	padding: 0;
}

.cookiezee__chevron {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-top: -2px;
	color: #002d72;
}

.cookiezee__category.is-expanded .cookiezee__chevron {
	transform: rotate(-135deg);
	margin-top: 2px;
}

.cookiezee__category-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #1a1a1a;
}

.cookiezee__switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.cookiezee__switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.cookiezee__switch-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #d1d5db;
	border-radius: 24px;
	transition: background 0.2s ease;
}

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

.cookiezee__switch input:checked + .cookiezee__switch-slider {
	background: var(--cz-btn-bg);
}

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

.cookiezee__switch input:disabled + .cookiezee__switch-slider {
	opacity: 0.95;
	cursor: not-allowed;
	background: #002d72;
}

.cookiezee__category-body {
	display: none;
	padding: 0 14px 14px 32px;
}

.cookiezee__category.is-expanded .cookiezee__category-body {
	display: block;
}

.cookiezee__category-desc {
	margin: 0 0 12px;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--cz-text-muted);
}

.cookiezee__category-detail {
	border-top: 1px solid var(--cz-border);
	padding-top: 12px;
}

.cookiezee__cookies-placeholder {
	margin: 0;
	font-size: 0.78rem;
	color: #9ca3af;
	line-height: 1.45;
}

.cookiezee__cookies-empty {
	margin: 0;
	font-size: 0.78rem;
	color: #9ca3af;
	line-height: 1.45;
}

.cookiezee__cookie-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cookiezee__cookie-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 8px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 4px;
	font-size: 0.76rem;
}

.cookiezee__cookie-name {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	color: #374151;
	word-break: break-all;
}

.cookiezee__cookie-status {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.cookiezee__cookie-status.is-active {
	color: #002d72;
}

.cookiezee__cookie-status.is-inactive {
	color: #9ca3af;
}

.cookiezee__cookies-note {
	margin: 8px 0 0;
	font-size: 0.68rem;
	color: #9ca3af;
	line-height: 1.4;
}

/* FAB — lewy dolny róg (po przeciwnej stronie niż help widget) */
.cookiezee-fab {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: calc(var(--cz-z, 999990) + 2);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background: #002d72;
	color: #fff;
	box-shadow: 0 6px 20px rgba(0, 45, 114, 0.3);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.cookiezee-fab[hidden] {
	display: none !important;
}

.cookiezee-fab:hover,
.cookiezee-fab:focus-visible {
	background: #001a48;
	outline: none;
	transform: scale(1.05);
}

@media (max-width: 720px) {
	.cookiezee__dialog--banner {
		padding: 24px 18px 20px;
	}

	.cookiezee__actions--row {
		grid-template-columns: 1fr;
	}

	.cookiezee__actions--stack {
		flex-direction: column;
		width: 100%;
	}

	.cookiezee__btn,
	.cookiezee__btn--block {
		width: 100%;
		flex: 1 1 auto;
		min-width: 0;
	}
}

@media (min-width: 721px) {
	.cookiezee__actions--stack {
		display: grid;
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}
}
