/* Mantyweb Popups — frontend styles */

.mw-popup {
	position: fixed;
	z-index: 100000;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.mw-popup.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Position variants */
.mw-popup--center {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mw-popup--bottom-right { bottom: 24px; right: 24px; }
.mw-popup--bottom-left  { bottom: 24px; left: 24px; }
.mw-popup--top-right    { top: 24px;    right: 24px; }
.mw-popup--top-left     { top: 24px;    left: 24px; }

/* Overlay (only used in center mode) */
.mw-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 0;
}

/* The panel itself */
.mw-popup__panel {
	position: relative;
	z-index: 1;
	width: var(--mw-popup-width, 500px);
	max-width: calc(90vw - 48px);
	max-height: calc(90vh - 48px);
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
	padding: 32px;
	box-sizing: border-box;
}

/* Close button */
.mw-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1f1f1f;
	transition: background-color 0.15s ease;
	padding: 0;
	z-index: 2;
}

.mw-popup__close:hover,
.mw-popup__close:focus-visible {
	background: rgba(0, 0, 0, 0.12);
	outline: none;
}

/* Content wrapper — Gutenberg blocks render inside this. */
.mw-popup__content > :first-child { margin-top: 0; }
.mw-popup__content > :last-child  { margin-bottom: 0; }

/* Mobile: full-width on small screens regardless of position */
@media (max-width: 600px) {
	.mw-popup--bottom-right,
	.mw-popup--bottom-left,
	.mw-popup--top-right,
	.mw-popup--top-left {
		left: 12px;
		right: 12px;
	}
	.mw-popup__panel {
		width: 100%;
		max-width: 100%;
	}
}
