/* JES AI Deklaration – frontend styling
   Colors/size come from CSS variables set inline per the plugin settings. */

.jes-ai-dekl-figure {
	margin: 0;
	position: relative;
	display: block;
	max-width: 100%;
}

.jes-ai-dekl-figure img {
	display: block;
	max-width: 100%;
	height: auto;
}

.jes-ai-dekl-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1.4;
	/* Off by default (var resolves to "none"); the plugin sets this per the "Skygge bag tekst" setting. */
	text-shadow: var(--jes-ai-dekl-text-shadow, none);
}

/* Caption variant: text sits under the image */
.jes-ai-dekl-figure.jes-ai-dekl-caption > .jes-ai-dekl-label {
	display: flex;
	width: 100%;
	box-sizing: border-box;
	padding: 6px 10px;
	background: var(--jes-ai-dekl-bg, #1d2327);
	color: var(--jes-ai-dekl-text, #ffffff);
	font-size: var(--jes-ai-dekl-font-size, 13px);
	border-radius: 0 0 var(--jes-ai-dekl-radius, 4px) var(--jes-ai-dekl-radius, 4px);
}

.jes-ai-dekl-label a {
	color: var(--jes-ai-dekl-accent, #2271b1);
	text-decoration: underline;
}

.jes-ai-dekl-label a:hover {
	opacity: 0.85;
}

/* Badge variant: small pill overlaid on top of the image */
.jes-ai-dekl-figure.jes-ai-dekl-badge {
	display: inline-block;
}

.jes-ai-dekl-figure.jes-ai-dekl-badge > .jes-ai-dekl-label {
	position: absolute;
	padding: 4px 9px;
	background: var(--jes-ai-dekl-bg, #1d2327);
	color: var(--jes-ai-dekl-text, #ffffff);
	font-size: var(--jes-ai-dekl-font-size, 13px);
	border-radius: var(--jes-ai-dekl-radius, 4px);
	z-index: 2;
}

.jes-ai-dekl-figure.jes-ai-dekl-pos-top-left > .jes-ai-dekl-label {
	top: 8px;
	left: 8px;
}

.jes-ai-dekl-figure.jes-ai-dekl-pos-top-right > .jes-ai-dekl-label {
	top: 8px;
	right: 8px;
}

.jes-ai-dekl-figure.jes-ai-dekl-pos-bottom-left > .jes-ai-dekl-label {
	bottom: 8px;
	left: 8px;
}

.jes-ai-dekl-figure.jes-ai-dekl-pos-bottom-right > .jes-ai-dekl-label {
	bottom: 8px;
	right: 8px;
}

.jes-ai-dekl-icon {
	display: inline-flex;
	align-items: center;
}

/* "Liquid glass" effect — opt-in via the "Frostet glas-effekt" setting.
   Works best combined with a background opacity under 100%, since the
   blur needs something semi-transparent to show through. */
.jes-ai-dekl-glass > .jes-ai-dekl-label,
.jes-ai-dekl-banner.jes-ai-dekl-glass {
	backdrop-filter: blur(14px) saturate(160%);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Banner variant: one site-wide bar, fixed to the top or bottom of the viewport */
.jes-ai-dekl-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	padding: 10px 40px;
	background: var(--jes-ai-dekl-bg, #1d2327);
	color: var(--jes-ai-dekl-text, #ffffff);
	font-size: var(--jes-ai-dekl-font-size, 13px);
	border-radius: var(--jes-ai-dekl-radius, 0px);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.jes-ai-dekl-banner.jes-ai-dekl-banner-top {
	top: 0;
}

.jes-ai-dekl-banner.jes-ai-dekl-banner-bottom {
	bottom: 0;
}

.jes-ai-dekl-banner a {
	color: var(--jes-ai-dekl-accent, #2271b1);
	text-decoration: underline;
}

.jes-ai-dekl-banner .jes-ai-dekl-banner-close {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.7;
	padding: 4px;
}

.jes-ai-dekl-banner .jes-ai-dekl-banner-close:hover {
	opacity: 1;
}
