/**
 * Estilos do pop-up de cookies - Wp Cookies Max
 * Utiliza CSS Custom Properties para permitir customização via painel admin,
 * garantindo precedência sobre estilos do tema.
 */

:root {
	--wpcm-bg-color: rgba(17, 17, 27, 0.95);
	--wpcm-text-color: #e4e4f0;
	--wpcm-accept-bg: #6c5ce7;
	--wpcm-accept-text: #ffffff;
	--wpcm-close-bg: transparent;
	--wpcm-close-text: #a0a0b8;
	--wpcm-link-color: #00cec9;
	--wpcm-border-radius: 12px;
	--wpcm-overlay-color: rgba(0, 0, 0, 0.5);
	--wpcm-desktop-width: 420px;
	--wpcm-desktop-height: auto;
	--wpcm-mobile-width: 100%;
	--wpcm-mobile-height: auto;
}

.wpcm-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: var(--wpcm-overlay-color);
	z-index: 999998;
}

.wpcm-popup {
	position: fixed;
	z-index: 999999;
	width: var(--wpcm-desktop-width);
	height: var(--wpcm-desktop-height);
	max-width: calc(100vw - 32px);
	background: var(--wpcm-bg-color);
	color: var(--wpcm-text-color);
	border-radius: var(--wpcm-border-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.wpcm-popup.wpcm-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Posicionamento */
.wpcm-position-bottom {
	left: 50%;
	bottom: 20px;
	transform: translate(-50%, 16px);
}
.wpcm-position-bottom.wpcm-visible {
	transform: translate(-50%, 0);
}

.wpcm-position-top {
	left: 50%;
	top: 20px;
	transform: translate(-50%, -16px);
}
.wpcm-position-top.wpcm-visible {
	transform: translate(-50%, 0);
}

.wpcm-position-bottom-left {
	left: 20px;
	bottom: 20px;
}

.wpcm-position-bottom-right {
	right: 20px;
	bottom: 20px;
}

.wpcm-position-center {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.96);
}
.wpcm-position-center.wpcm-visible {
	transform: translate(-50%, -50%) scale(1);
}

.wpcm-popup-content {
	position: relative;
	padding: 24px 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	height: 100%;
	box-sizing: border-box;
}

.wpcm-close-icon {
	position: absolute;
	top: 10px;
	right: 12px;
	background: transparent;
	border: none;
	color: var(--wpcm-close-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
	opacity: 0.7;
	transition: opacity 0.2s ease;
}
.wpcm-close-icon:hover {
	opacity: 1;
}

.wpcm-message {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	padding-right: 16px;
}

.wpcm-policy-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wpcm-policy-link {
	color: var(--wpcm-link-color);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: opacity 0.2s ease;
}
.wpcm-policy-link:hover {
	opacity: 0.8;
	color: var(--wpcm-link-color);
}

.wpcm-actions {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}

.wpcm-btn {
	flex: 1;
	padding: 10px 18px;
	border: none;
	border-radius: calc(var(--wpcm-border-radius) / 2);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.15s ease;
	letter-spacing: 0.02em;
}
.wpcm-btn:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}
.wpcm-btn:active {
	transform: translateY(0);
}

.wpcm-btn-accept {
	background: var(--wpcm-accept-bg);
	color: var(--wpcm-accept-text);
	box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
}

.wpcm-btn-close {
	background: var(--wpcm-close-bg);
	color: var(--wpcm-close-text);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Responsivo - Mobile */
@media (max-width: 782px) {
	.wpcm-popup {
		width: var(--wpcm-mobile-width);
		height: var(--wpcm-mobile-height);
		max-width: calc(100vw - 20px);
		left: 50% !important;
		right: auto !important;
		transform: translateX(-50%) translateY(16px);
		bottom: 10px;
		top: auto;
	}
	.wpcm-popup.wpcm-visible {
		transform: translateX(-50%) translateY(0);
	}
	.wpcm-actions {
		flex-direction: column;
	}
}
