/* Gamebrott Sticky — frontend styles. Loaded only when a slot renders. */

.gbs-root {
	font-size: 0; /* prevent inline-gap shifts; children reset below */
}

.gbs-slot {
	position: fixed;
	z-index: var(--gbs-z, 9999);
	font-size: 1rem;
	box-sizing: border-box;
	display: none; /* hidden until JS reveals — no CLS, out of flow */
}

.gbs-slot.gbs-visible {
	display: block;
}

.gbs-slot.gbs-dismissed,
.gbs-slot[hidden] {
	display: none !important;
}

.gbs-body {
	position: relative;
}

.gbs-body img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ---- positions ---- */

.gbs-pos-header,
.gbs-pos-footer {
	left: 0;
	right: 0;
	width: 100%;
	justify-content: center;
	align-items: center;
	background: #111;
}

.gbs-pos-header.gbs-visible,
.gbs-pos-footer.gbs-visible {
	display: flex;
}

.gbs-pos-header { top: 0; }
.gbs-pos-footer { bottom: 0; }

.gbs-pos-left-sidebar,
.gbs-pos-right-sidebar {
	top: 50%;
	transform: translateY(-50%);
	width: var(--gbs-w, auto);
}
.gbs-pos-left-sidebar  { left: 0; }
.gbs-pos-right-sidebar { right: 0; }

.gbs-pos-left-float,
.gbs-pos-right-float {
	top: 50%;
	transform: translateY(-50%);
	width: var(--gbs-w, auto);
}
.gbs-pos-left-float  { left: 12px; }
.gbs-pos-right-float { right: 12px; }

.gbs-pos-corner-bl,
.gbs-pos-corner-br {
	bottom: 16px;
	width: var(--gbs-w, auto);
	max-width: calc(100vw - 24px);
}
.gbs-pos-corner-bl { left: 16px; }
.gbs-pos-corner-br { right: 16px; }

/* explicit dimensions when provided */
.gbs-slot {
	width: var(--gbs-w, auto);
}
.gbs-body {
	min-height: var(--gbs-h, auto);
}

/* ---- close button ---- */

.gbs-close {
	position: absolute;
	z-index: 2;
	width: 26px;
	height: 26px;
	line-height: 24px;
	text-align: center;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .65);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	padding: 0;
}
.gbs-close:hover { background: rgba(0, 0, 0, .85); }
.gbs-close-tr { top: -10px; right: -10px; }
.gbs-close-tl { top: -10px; left: -10px; }
.gbs-close-br { bottom: -10px; right: -10px; }
.gbs-close-bl { bottom: -10px; left: -10px; }

/* bars keep the close button inside the bar */
.gbs-pos-header .gbs-close,
.gbs-pos-footer .gbs-close {
	top: 50%;
	transform: translateY(-50%);
	right: 10px;
	left: auto;
	bottom: auto;
}

/* ---- animations (CSS-only) ---- */

.gbs-anim-fade.gbs-visible {
	animation: gbs-fade .35s ease both;
}
.gbs-anim-slide.gbs-pos-footer.gbs-visible,
.gbs-anim-slide.gbs-pos-corner-bl.gbs-visible,
.gbs-anim-slide.gbs-pos-corner-br.gbs-visible {
	animation: gbs-slide-up .4s ease both;
}
.gbs-anim-slide.gbs-pos-header.gbs-visible {
	animation: gbs-slide-down .4s ease both;
}
.gbs-anim-slide.gbs-pos-left-sidebar.gbs-visible,
.gbs-anim-slide.gbs-pos-left-float.gbs-visible {
	animation: gbs-slide-right .4s ease both;
}
.gbs-anim-slide.gbs-pos-right-sidebar.gbs-visible,
.gbs-anim-slide.gbs-pos-right-float.gbs-visible {
	animation: gbs-slide-left .4s ease both;
}

@keyframes gbs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gbs-slide-up   { from { opacity: 0; transform: translateY(100%); } }
@keyframes gbs-slide-down { from { opacity: 0; transform: translateY(-100%); } }
@keyframes gbs-slide-left  { from { opacity: 0; transform: translate(100%, -50%); } }
@keyframes gbs-slide-right { from { opacity: 0; transform: translate(-100%, -50%); } }

/* sidebars/floats are vertically centered — keep their transform after anim */
.gbs-pos-left-sidebar.gbs-visible,
.gbs-pos-right-sidebar.gbs-visible,
.gbs-pos-left-float.gbs-visible,
.gbs-pos-right-float.gbs-visible {
	transform: translateY(-50%);
}

@media (prefers-reduced-motion: reduce) {
	.gbs-slot.gbs-visible {
		animation: none !important;
	}
}

/* ---- device confirmation (CSS layer; JS also removes) ---- */
@media (min-width: 782px) {
	.gbs-device-mobile { display: none !important; }
}
@media (max-width: 781px) {
	.gbs-device-desktop { display: none !important; }
}
