/* ==========================================
   CSS-ПЕРЕМЕННЫЕ (ДИЗАЙН-СИСТЕМА)
   ========================================== */
:root {
	--artcly-cc-banner-bg: #ffffff;
	--artcly-cc-banner-color: #333333;
	--artcly-cc-modal-bg: #ffffff;
	--artcly-cc-modal-color: #222222;
	--artcly-cc-backdrop: rgba(0, 0, 0, 0.45);
	--artcly-cc-container-width: 1220px;
	--artcly-cc-modal-width: 600px;
	--artcly-cc-modal-radius: 10px;
	--artcly-cc-btn-radius: 6px;
	--artcly-cc-btn-bg: #f2f2f2;
	--artcly-cc-btn-color: #222222;
	--artcly-cc-btn-border: #cccccc;
	--artcly-cc-btn-hover-opacity: 0.8;
	--artcly-cc-btn-link-color: #555555;
	--artcly-cc-btn-link-hover-color: #555555;
	--artcly-cc-close-color: #777777;
	--artcly-cc-close-hover-color: #777;
	--artcly-cc-close-size: 32px;
	--artcly-cc-close-font-size: 24px;
	--artcly-cc-chk-size: 18px;
	--artcly-cc-chk-radius: 4px;
	--artcly-cc-chk-border: #999999;
	--artcly-cc-chk-border-hover: #555555;
	--artcly-cc-chk-bg: #ffffff;
	--artcly-cc-chk-bg-active: #2271b1;
	--artcly-cc-chk-border-active: #2271b1;
	--artcly-cc-chk-mark-color: #ffffff;
	--artcly-cc-chk-disabled-bg: #e0e0e0;
	--artcly-cc-chk-disabled-border: #cccccc;
	--artcly-cc-chk-disabled-mark: #777777;
}

.artcly-submit-locked {
	opacity: 0.55;
	cursor: not-allowed !important;
	filter: grayscale(0.3);
	transition:
		opacity 0.25s ease,
		filter 0.25s ease;
}

.cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--artcly-cc-banner-bg);
	color: var(--artcly-cc-banner-color);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
	padding: 22px 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	opacity: 0;
	visibility: hidden;
	transform: translateY(100%);
	transition:
		opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
		visibility 0.35s ease;
	will-change: transform, opacity;
}

.cookie-banner.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.cookie-banner-content {
	max-width: var(--artcly-cc-container-width);
	width: 100%;
	padding-inline: 10px;
	margin: 0 auto;
}
.cookie-modal-dialog-title,
.cookie-banner-title {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 600;
	color: inherit;
}
.cookie-actions,
.cookie-modal-actions {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	flex-wrap: wrap;
	align-items: center;
}
.cookie-banner-description > *:last-child {
	margin-bottom: 0;
}
.cookie-banner-description > *:first-child {
	margin-top: 0;
}
.cookie-banner-description a {
	color: var(--artcly-cc-btn-link-color);
	text-decoration: underline;
}

.cookie-btn-equal {
	background-color: var(--artcly-cc-btn-bg);
	color: var(--artcly-cc-btn-color);
	border: 1px solid var(--artcly-cc-btn-border);
	font-size: 14px;
	font-weight: 500;
	padding: 10px 22px;
	border-radius: var(--artcly-cc-btn-radius);
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		opacity 0.2s ease,
		transform 0.1s ease;
}
.cookie-btn-equal:hover {
	opacity: var(--artcly-cc-btn-hover-opacity);
}
.cookie-btn-equal:active {
	transform: scale(0.98);
}
.cookie-btn-link {
	background: none;
	border: none;
	text-decoration: underline;
	cursor: pointer;
	padding: 10px 14px;
	color: var(--artcly-cc-btn-link-color);
	font-size: 14px;
	transition:
		color 0.2s ease,
		opacity 0.2s ease;
}
.cookie-btn-link:hover {
	color: var(--artcly-cc-btn-link-hover-color);
	opacity: var(--artcly-cc-btn-hover-opacity);
}

@media (max-width: 48.0613em) {
	.cookie-actions,
	.cookie-modal-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.cookie-btn:not(.cookie-btn-link) {
		width: 100%;
	}
}

.cookie-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
	pointer-events: none;
	color: var(--artcly-cc-modal-color);
}
.cookie-modal.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.cookie-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--artcly-cc-backdrop);
	backdrop-filter: blur(2px);
	transition: opacity 0.3s ease;
}
.cookie-modal-dialog {
	position: relative;
	background: var(--artcly-cc-modal-bg);
	padding: 28px 26px;
	border-radius: var(--artcly-cc-modal-radius);
	max-width: var(--artcly-cc-modal-width);
	width: 90%;
	max-height: 88vh;
	overflow-y: auto;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
	transform: scale(0.94) translateY(12px);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.cookie-modal.is-visible .cookie-modal-dialog {
	transform: scale(1) translateY(0);
}
.cookie-modal-dialog-close-btn {
	position: absolute;
	top: 16px;
	right: 18px;
	width: var(--artcly-cc-close-size);
	height: var(--artcly-cc-close-size);
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--artcly-cc-close-color);
	font-size: var(--artcly-cc-close-font-size);
	border-radius: 50%;
	transition:
		color 0.2s ease,
		background-color 0.2s ease,
		transform 0.15s ease;
}
.cookie-modal-dialog-close-btn:hover {
	color: var(--artcly-cc-close-hover-color);
	background-color: rgba(0, 0, 0, 0.05);
}
.cookie-modal-dialog-close-btn:active {
	transform: scale(0.9);
}

.cookie-setting-row,
.form-consent {
	margin: 16px 0;
	font-size: 14px;
	line-height: 1.45;
}
.cookie-setting-row label,
.form-consent {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}
.cookie-setting-row input[type="checkbox"],
.form-consent input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
	pointer-events: none;
}
.cookie-setting-row label span,
.form-consent span {
	position: relative;
	padding-left: calc(var(--artcly-cc-chk-size) + 12px);
	min-height: var(--artcly-cc-chk-size);
	display: block;
}
.cookie-setting-row label span::before,
.form-consent span::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: var(--artcly-cc-chk-size);
	height: var(--artcly-cc-chk-size);
	border: 1.5px solid var(--artcly-cc-chk-border);
	background-color: var(--artcly-cc-chk-bg);
	border-radius: var(--artcly-cc-chk-radius);
	box-sizing: border-box;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease;
}
.cookie-setting-row label span::after,
.form-consent span::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 5px;
	width: 5px;
	height: 10px;
	border: solid var(--artcly-cc-chk-mark-color);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	opacity: 0;
	box-sizing: border-box;
	transition:
		transform 0.15s ease,
		opacity 0.15s ease;
}
.cookie-setting-row label:hover input[type="checkbox"]:not(:disabled) ~ span::before,
.form-consent:hover input[type="checkbox"]:not(:disabled) ~ span::before {
	border-color: var(--artcly-cc-chk-border-hover);
}
.cookie-setting-row input[type="checkbox"]:checked ~ span::before,
.form-consent input[type="checkbox"]:checked ~ span::before {
	background-color: var(--artcly-cc-chk-bg-active);
	border-color: var(--artcly-cc-chk-border-active);
}
.cookie-setting-row input[type="checkbox"]:checked ~ span::after,
.form-consent input[type="checkbox"]:checked ~ span::after {
	opacity: 1;
	transform: rotate(45deg) scale(1);
}
.cookie-setting-row label:has(input[type="checkbox"]:disabled) {
	cursor: not-allowed;
}
.cookie-setting-row input[type="checkbox"]:disabled ~ span::before {
	background-color: var(--artcly-cc-chk-disabled-bg);
	border-color: var(--artcly-cc-chk-disabled-border);
}
.cookie-setting-row input[type="checkbox"]:disabled:checked ~ span::after {
	border-color: var(--artcly-cc-chk-disabled-mark);
}
.cookie-setting-row input[type="checkbox"]:focus-visible ~ span::before,
.form-consent input[type="checkbox"]:focus-visible ~ span::before {
	outline: 2px solid var(--artcly-cc-chk-bg-active);
	outline-offset: 2px;
}
.form-consent a {
	color: var(--artcly-cc-chk-bg-active);
	text-decoration: underline;
}
.site-privacy-footer {
	font-size: 13px;
	line-height: 1.6;
	color: #666666;
	margin: 20px 0;
	font-family: inherit;
}
.site-privacy-footer a {
	color: inherit;
	text-decoration: underline;
}
.site-privacy-footer a:hover {
	color: var(--artcly-cc-chk-bg-active);
}

/* ==========================================
   ЗАГЛУШКИ ДЛЯ BLOCKED IFRAME
   ========================================== */
.artcly-iframe-placeholder {
	width: 100%;
	height: 100%;
	min-height: 250px;
	background-color: #f7f9fa;
	border: 1px dashed #ccd0d4;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	box-sizing: border-box;
	border-radius: 8px;
	margin-bottom: 15px;
}
.artcly-iframe-msg {
	font-size: 14px;
	color: #50575e;
	line-height: 1.5;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.artcly-iframe-msg .cookie-btn {
	background-color: var(--artcly-cc-btn-bg);
	border: 1px solid var(--artcly-cc-btn-border);
	color: var(--artcly-cc-btn-color);
}
