/**
 * TBS Popups & Banners front-end styles.
 */

.tbs-pb-top-bar-stack {
	position: relative;
	width: 100%;
}

.tbs-pb-top-bar-stack .tbs-pb-top-bar {
	position: fixed;
	left: 0;
	right: 0;
}

.tbs-pb-top-bar-stack[hidden] {
	display: none !important;
}

.tbs-pb-top-bar {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 49;
	overflow: hidden;
	top: calc(var(--announcement-banner-height, 0px) + var(--header-total-height, 100px));
	transition: top 0.18s ease-in;
}

@media (max-width: 1023px) {
	.tbs-pb-top-bar {
		top: calc(var(--announcement-banner-height, 0px) + var(--mobile-header-height, 60px));
	}
}

.tbs-pb-bottom-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 49;
	transform: translateY(100%);
}

.tbs-pb-bottom-bar.is-visible {
	transform: translateY(0);
}

body.tbs-pb-has-bottom-bar {
	padding-bottom: var(--tbs-bottom-bar-height, 0px);
}

.tbs-pb-overlay {
	position: fixed;
	inset: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.tbs-pb-overlay.hidden {
	display: none;
}

.tbs-pb-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(27, 38, 51, 0.55);
	opacity: 0;
}

.tbs-pb-modal {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	max-height: 90vh;
	overflow-y: auto;
	opacity: 0;
	transform: translateY(40px) scale(0.96);
}

.tbs-pb-modal--sm { max-width: 480px; }
.tbs-pb-modal--md { max-width: 720px; }
.tbs-pb-modal--lg { max-width: 960px; }

.tbs-pb-corner {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 9990;
	max-width: 22rem;
	width: calc(100% - 2rem);
	border-radius: 0.75rem;
	box-shadow: 0 20px 40px rgba(27, 38, 51, 0.2);
	opacity: 0;
	transform: translateX(40px);
}

.tbs-pb-corner--sm { max-width: 18rem; }
.tbs-pb-corner--lg { max-width: 28rem; }

.tbs-pb-corner.is-visible,
.tbs-pb-modal-wrap.is-visible {
	display: flex !important;
}

.tbs-pb-banner[data-tbs-hidden="true"] {
	display: none !important;
}

.tbs-pb-dismiss {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	transform: none;
}

@media (min-width: 1024px) {
	.tbs-pb-dismiss {
		top: 0.75rem;
		right: 0.75rem;
	}
}

.tbs-pb-corner .tbs-pb-meta,
.tbs-pb-modal .tbs-pb-meta,
.tbs-pb-inline .tbs-pb-meta {
	align-items: flex-start;
	justify-content: flex-start;
}

.tbs-pb-corner .tbs-pb-buttons,
.tbs-pb-modal .tbs-pb-buttons,
.tbs-pb-inline .tbs-pb-buttons,
.tbs-pb-bottom-bar .tbs-pb-buttons {
	justify-content: flex-start;
}

.tbs-pb-bottom-bar .tbs-pb-meta {
	justify-content: flex-start;
}

@media (prefers-reduced-motion: reduce) {
	.tbs-pb-top-bar,
	.tbs-pb-bottom-bar,
	.tbs-pb-modal,
	.tbs-pb-corner {
		transition: none !important;
	}
}
