/* AB Cookie Consent — неутрален стил, без външни библиотеки. */

#ab-cookie-consent-root,
#ab-cookie-consent-root * {
	box-sizing: border-box;
}

.ab-cc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	background: #ffffff;
	color: #1f2430;
	border-top: 1px solid #dadde3;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
	padding: 16px 20px;
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transform: translateY(100%);
	opacity: 0;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.ab-cc-bar.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.ab-cc-bar[hidden],
.ab-cc-modal[hidden] {
	display: none !important;
}

.ab-cc-bar__inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.ab-cc-bar__text {
	flex: 1 1 320px;
	min-width: 0;
}

.ab-cc-bar__title {
	font-weight: 600;
	margin: 0 0 4px;
	font-size: 16px;
}

.ab-cc-bar__body {
	margin: 0;
	color: #4a4f5a;
}

.ab-cc-bar__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
}

.ab-cc-btn {
	appearance: none;
	border: 1px solid #c9ccd3;
	background: #f4f5f7;
	color: #1f2430;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
	white-space: nowrap;
}

.ab-cc-btn:hover {
	background: #e9eaed;
}

.ab-cc-btn:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Трите основни бутона са с равна тежест по дизайн — никой не е "primary". */
.ab-cc-btn--accept,
.ab-cc-btn--necessary,
.ab-cc-btn--settings {
	background: #f4f5f7;
	border-color: #c9ccd3;
}

.ab-cc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 17, 21, 0.45);
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.ab-cc-modal-overlay[hidden] {
	display: none !important;
}

.ab-cc-modal {
	background: #ffffff;
	color: #1f2430;
	border-radius: 10px;
	max-width: 560px;
	width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ab-cc-modal__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
}

.ab-cc-category {
	border: 1px solid #e1e3e8;
	border-radius: 8px;
	padding: 12px 14px;
	margin-bottom: 10px;
}

.ab-cc-category__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ab-cc-category__label {
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ab-cc-category__desc {
	margin: 6px 0 0;
	color: #4a4f5a;
	font-size: 13px;
}

.ab-cc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}

.ab-cc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.ab-cc-switch input:disabled {
	cursor: not-allowed;
}

.ab-cc-switch__track {
	position: absolute;
	inset: 0;
	background: #c9ccd3;
	border-radius: 999px;
	transition: background 0.15s ease;
}

.ab-cc-switch__track::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 0.15s ease;
}

.ab-cc-switch input:checked + .ab-cc-switch__track {
	background: #2c7a4b;
}

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

.ab-cc-switch input:focus-visible + .ab-cc-switch__track {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.ab-cc-modal__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 16px;
}

.ab-cc-link {
	color: #2271b1;
	text-decoration: underline;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.ab-cookie-consent-reopen-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 640px) {
	.ab-cc-bar {
		padding: 12px 16px;
		font-size: 14px;
	}

	.ab-cc-bar__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	/* В колона flex-basis 320px става височина: празно място под текста. От 1.0.5. */
	.ab-cc-bar__text {
		flex: 0 0 auto;
	}

	.ab-cc-bar__actions {
		gap: 8px;
	}

	.ab-cc-bar__actions {
		flex-direction: column;
	}

	.ab-cc-btn {
		width: 100%;
		text-align: center;
	}
}

@media (prefers-color-scheme: dark) {
	.ab-cc-bar,
	.ab-cc-modal {
		background: #1b1d22;
		color: #eceef2;
		border-color: #2d303a;
	}

	.ab-cc-bar__body,
	.ab-cc-category__desc {
		color: #b7bac3;
	}

	.ab-cc-btn {
		background: #262930;
		border-color: #3a3e48;
		color: #eceef2;
	}

	.ab-cc-btn:hover {
		background: #2f333c;
	}

	.ab-cc-category {
		border-color: #2d303a;
	}
}
