/* Amber Consent — Frontend Banner */

.ac-banner {
	--ac-accent: #2563eb;
	--ac-bg: #ffffff;
	--ac-text: #1e293b;
	--ac-text-muted: #64748b;
	--ac-border: #e2e8f0;
	--ac-radius: 16px;
	--ac-shadow: 0 -4px 30px rgba(0,0,0,0.1);
	--ac-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

	position: fixed;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ac-text);
	box-sizing: border-box;
}
.ac-banner *, .ac-banner *::before, .ac-banner *::after { box-sizing: border-box; }

/* Layouts */
.ac-layout-bottom {
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0 16px 16px;
}
.ac-layout-top {
	top: 0;
	left: 0;
	right: 0;
	padding: 16px 16px 0;
}
.ac-layout-modal {
	inset: 0;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0,0,0,0.5);
}
.ac-banner.ac-layout-modal:not(.ac-visible) { display: none !important; }
.ac-banner.ac-visible.ac-layout-modal { display: flex; }

.ac-banner-inner {
	max-width: 860px;
	margin: 0 auto;
	background: var(--ac-bg);
	border-radius: var(--ac-radius);
	box-shadow: var(--ac-shadow);
	padding: 24px;
	animation: acSlideIn var(--ac-transition) forwards;
}

@keyframes acSlideIn {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}
.ac-layout-top .ac-banner-inner {
	animation-name: acSlideInTop;
}
@keyframes acSlideInTop {
	from { opacity: 0; transform: translateY(-20px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ac-banner-heading {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--ac-text);
}
.ac-banner-body {
	margin: 0 0 16px;
	color: var(--ac-text-muted);
	font-size: 14px;
	line-height: 1.6;
}
.ac-policy-link {
	color: var(--ac-accent);
	text-decoration: underline;
	margin-left: 4px;
}

/* Actions */
.ac-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.ac-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}
.ac-btn:focus-visible {
	outline: 2px solid var(--ac-accent);
	outline-offset: 2px;
}
.ac-btn-accept {
	background: var(--ac-accent);
	color: #fff;
}
.ac-btn-accept:hover { filter: brightness(1.1); }
.ac-btn-reject {
	background: #f1f5f9;
	color: var(--ac-text);
}
.ac-btn-reject:hover { background: #e2e8f0; }
.ac-btn-manage {
	background: transparent;
	color: var(--ac-accent);
	border: 1px solid var(--ac-accent);
}
.ac-btn-manage:hover { background: rgba(37,99,235,0.05); }
.ac-btn-save {
	background: var(--ac-accent);
	color: #fff;
}
.ac-btn-save:hover { filter: brightness(1.1); }

/* Preferences panel */
.ac-preferences {
	margin: 16px 0;
	padding: 16px 0;
	border-top: 1px solid var(--ac-border);
	border-bottom: 1px solid var(--ac-border);
}
.ac-pref-category {
	padding: 12px 0;
	border-bottom: 1px solid var(--ac-border);
}
.ac-pref-category:last-child { border-bottom: none; }
.ac-pref-category label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
}
.ac-pref-category input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--ac-accent);
	cursor: pointer;
}
.ac-pref-locked label { cursor: default; }
.ac-pref-locked input { opacity: 0.6; }
.ac-pref-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 99px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.ac-badge-necessary { background: #dcfce7; color: #166534; }
.ac-pref-desc {
	margin: 4px 0 0 28px;
	font-size: 13px;
	color: var(--ac-text-muted);
}

/* Re-open badge */
.ac-badge {
	position: fixed;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--ac-accent, #2563eb);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.15);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ac-badge:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.ac-badge-bottom-left  { bottom: 20px; left: 20px; }
.ac-badge-bottom-right { bottom: 20px; right: 20px; }

/* Iframe placeholders */
.ac-iframe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	text-align: center;
}
.ac-placeholder-inner { padding: 24px; }
.ac-placeholder-inner p {
	margin: 12px 0;
	color: #64748b;
	font-size: 14px;
}
.ac-placeholder-btn {
	display: inline-block;
	padding: 8px 18px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.ac-placeholder-btn:hover { filter: brightness(1.1); }

/* Cookie policy table (shortcode) */
.ac-cookie-policy { margin: 20px 0; }
.ac-policy-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.ac-policy-table th,
.ac-policy-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
.ac-policy-table th { background: #f8fafc; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
.ac-policy-table code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* Mobile */
@media (max-width: 600px) {
	.ac-banner-inner { padding: 18px; }
	.ac-banner-heading { font-size: 16px; }
	.ac-banner-actions { flex-direction: column; }
	.ac-btn { width: 100%; justify-content: center; }
}
