/* Cookie Consent LGPD */
.ccl, .ccl-modal {
	--ccl-bg: #fff;
	--ccl-text: #111827;
	--ccl-muted: #374151;
	--ccl-border: #e5e7eb;
	font: 400 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ccl-text);
	-webkit-font-smoothing: antialiased;
}
.ccl *, .ccl-modal * { box-sizing: border-box; }
.ccl[hidden], .ccl-modal[hidden] { display: none !important; }

/* ---------- Banner ---------- */
.ccl { position: fixed; z-index: 99998; left: 0; right: 0; bottom: 0; padding: 16px; animation: ccl-up .35s ease-out; }
.ccl .ccl-box {
	display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
	max-width: 1080px; margin: 0 auto; padding: 20px 24px;
	background: var(--ccl-bg); border: 1px solid var(--ccl-border); border-radius: 16px;
	border-top: 4px solid var(--ccl-color, #0b5ed7);
	box-shadow: 0 12px 40px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .06);
}
.ccl .ccl-main { flex: 1 1 380px; min-width: 0; }
.ccl .ccl-main strong { display: block; margin: 0 0 4px; font-size: 16px; line-height: 1.3; color: var(--ccl-text); }
.ccl .ccl-main p { margin: 0; color: var(--ccl-muted); }
.ccl .ccl-main a { color: var(--ccl-color, #0b5ed7); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ccl .ccl-main a:hover { text-decoration-thickness: 2px; }

.ccl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- Botões ---------- */
.ccl .ccl-btn, .ccl-modal .ccl-btn {
	appearance: none; -webkit-appearance: none; cursor: pointer; margin: 0;
	padding: 11px 20px; border: 2px solid var(--ccl-color, #0b5ed7); border-radius: 10px;
	font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; white-space: nowrap;
	transition: background-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.ccl .ccl-btn:active, .ccl-modal .ccl-btn:active { transform: translateY(1px); }
.ccl .ccl-btn:focus-visible, .ccl-modal .ccl-btn:focus-visible,
.ccl-modal .ccl-close:focus-visible, .ccl-toggle input:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.ccl .ccl-primary, .ccl-modal .ccl-primary { background: var(--ccl-color, #0b5ed7); color: #fff; }
.ccl .ccl-primary:hover, .ccl-modal .ccl-primary:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .22); filter: brightness(1.08); }
.ccl .ccl-secondary, .ccl-modal .ccl-secondary { background: #fff; color: var(--ccl-color, #0b5ed7); }
.ccl .ccl-secondary:hover, .ccl-modal .ccl-secondary:hover { background: color-mix(in srgb, var(--ccl-color, #0b5ed7) 8%, #fff); }
.ccl .ccl-link { background: transparent; border-color: transparent; color: var(--ccl-muted); padding-left: 10px; padding-right: 10px; text-decoration: underline; text-underline-offset: 3px; }
.ccl .ccl-link:hover { color: var(--ccl-text); }

/* ---------- Posições ---------- */
.ccl.ccl-bottom-left, .ccl.ccl-bottom-right { right: auto; max-width: 460px; }
.ccl.ccl-bottom-right { right: 0; left: auto; }
.ccl-bottom-left .ccl-box, .ccl-bottom-right .ccl-box { flex-direction: column; align-items: stretch; gap: 14px; margin: 0; }
.ccl-bottom-left .ccl-main, .ccl-bottom-right .ccl-main { flex: 0 0 auto; }
.ccl-bottom-left .ccl-actions .ccl-btn:not(.ccl-link), .ccl-bottom-right .ccl-actions .ccl-btn:not(.ccl-link) { flex: 1 1 auto; }
.ccl-bottom-left .ccl-link, .ccl-bottom-right .ccl-link { flex: 1 1 100%; }

/* ---------- Modal de preferências ---------- */
.ccl-modal {
	position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center;
	padding: 16px; background: rgba(15, 23, 42, .6); backdrop-filter: blur(3px); animation: ccl-fade .2s ease-out;
}
.ccl-modal .ccl-modal-box {
	position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow: auto;
	padding: 28px; background: var(--ccl-bg); border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
	border-top: 4px solid var(--ccl-color, #0b5ed7); animation: ccl-pop .25s ease-out;
}
.ccl-modal .ccl-modal-box h2 { margin: 0 32px 6px 0; padding: 0; font-size: 22px; line-height: 1.25; color: var(--ccl-text); }
.ccl-modal .ccl-intro { margin: 0 0 12px; color: var(--ccl-muted); }
.ccl-modal .ccl-close {
	position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; padding: 0; cursor: pointer;
	border: 0; border-radius: 50%; background: #f3f4f6; color: var(--ccl-text); font: 400 22px/34px Arial, sans-serif; text-align: center;
}
.ccl-modal .ccl-close:hover { background: #e5e7eb; }

.ccl-modal .ccl-row {
	display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0;
	padding: 16px 0; border-bottom: 1px solid var(--ccl-border); cursor: pointer;
}
.ccl-modal .ccl-row:last-of-type { border-bottom: 0; }
.ccl-modal .ccl-row span { flex: 1; }
.ccl-modal .ccl-row strong { display: block; font-size: 15px; color: var(--ccl-text); }
.ccl-modal .ccl-row small { display: block; margin-top: 2px; font-size: 13px; color: var(--ccl-muted); }

/* Interruptor */
.ccl-modal .ccl-row input[type="checkbox"] {
	appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto; width: 44px; height: 26px; margin: 0;
	border: 0; border-radius: 26px; background: #cbd5e1; cursor: pointer; transition: background-color .2s;
}
.ccl-modal .ccl-row input[type="checkbox"]::before {
	content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s;
}
.ccl-modal .ccl-row input[type="checkbox"]:checked { background: var(--ccl-color, #0b5ed7); }
.ccl-modal .ccl-row input[type="checkbox"]:checked::before { transform: translateX(18px); }
.ccl-modal .ccl-row input[type="checkbox"]:disabled { opacity: .55; cursor: not-allowed; }
.ccl-modal .ccl-row input[type="checkbox"]:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

.ccl-modal .ccl-actions { margin-top: 20px; padding-top: 4px; }
.ccl-modal .ccl-actions .ccl-btn { flex: 1 1 auto; }

/* Link [ccl_preferences] */
a.ccl-open { cursor: pointer; }

/* ---------- Animações ---------- */
@keyframes ccl-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ccl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccl-pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ccl, .ccl-modal, .ccl-modal-box { animation: none !important; } .ccl *, .ccl-modal * { transition: none !important; } }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.ccl, .ccl.ccl-bottom-left, .ccl.ccl-bottom-right { max-width: none; left: 0; right: 0; padding: 10px; }
	.ccl .ccl-box { padding: 18px; gap: 14px; border-radius: 14px; max-height: calc(100vh - 20px); overflow: auto; }
	.ccl .ccl-actions { flex-direction: column; align-items: stretch; width: 100%; }
	.ccl .ccl-btn { width: 100%; text-align: center; padding: 13px 16px; }
	.ccl .ccl-link { padding: 8px; }
	.ccl-modal .ccl-modal-box { padding: 22px 18px; }
	.ccl-modal .ccl-actions { flex-direction: column; align-items: stretch; }
}
