/* MasterBeing NIW Wrapper — frontend styles */

.mb-niw-wrapper {
	box-sizing: border-box;
}

/* ---------- Fullscreen mode ---------- */
.mb-niw-fullscreen .mb-niw-iframe {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	border: 0;
	display: block;
	background: #fff;
	z-index: 1;
}

/* ---------- Inline mode ---------- */
.mb-niw-inline {
	width: 100%;
	position: relative;
}

.mb-niw-iframe-inline {
	width: 100%;
	height: var(--mb-niw-height, calc(100vh - 120px));
	border: 0;
	display: block;
	background: #fff;
}

/* ---------- Overlay logo (1:1 z prostokątem badge Base44) ----------
 * Zmierzone bezpośrednio w aplikacji Base44 na desktopie, tablecie i telefonie:
 * 208 x 39 px, 16 px od prawej i 16 px od dołu. Te wartości są stałe.
 */
html body .mb-niw-overlay-logo {
	position: fixed !important;
	bottom: 16px !important;
	right: 16px !important;
	z-index: 2147483647 !important;
	background: #ffffff !important;
	padding: 4px 12px !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	width: 208px !important;
	height: 39px !important;
	min-width: 208px !important;
	min-height: 39px !important;
	max-width: 208px !important;
	max-height: 39px !important;
	box-sizing: border-box;
	display: flex !important;
	align-items: center;
	justify-content: center;
	overflow: hidden !important;
	cursor: pointer;
	text-decoration: none !important;
	transform: none !important;
	transition: none !important;
	pointer-events: auto !important;
	margin: 0 !important;
	border: 0 !important;
}

html body .mb-niw-overlay-logo:hover {
	transform: none !important;
	box-shadow: none !important;
}

html body .mb-niw-overlay-logo:active { transform: none !important; }

html body .mb-niw-overlay-logo:focus-visible {
	outline: 2px solid #1a1610;
	outline-offset: 2px;
}

html body .mb-niw-overlay-logo img {
	max-height: 31px !important;
	max-width: 184px !important;
	height: 31px !important;
	width: auto !important;
	display: block;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
}

/* ---------- Fallback (iframe zablokowany) ---------- */
.mb-niw-fallback {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background:
		radial-gradient(1200px 600px at 20% 10%, #f6efe3 0%, transparent 60%),
		radial-gradient(900px 500px at 90% 90%, #eae3d1 0%, transparent 55%),
		#faf7f0;
	z-index: 5;
}

.mb-niw-fallback-inner {
	max-width: 620px;
	background: #ffffff;
	border: 1px solid #e6ddc7;
	border-radius: 14px;
	padding: 40px 44px;
	box-shadow: 0 12px 48px rgba(60, 40, 10, 0.08);
	text-align: left;
}

.mb-niw-fallback-inner h2 {
	margin: 0 0 12px 0;
	font-size: clamp(24px, 3.5vw, 34px);
	line-height: 1.15;
	color: #2b2416;
}

.mb-niw-fallback-inner p {
	margin: 0 0 24px 0;
	font-size: 16px;
	line-height: 1.55;
	color: #55493a;
}

.mb-niw-fallback-btn {
	display: inline-block;
	padding: 12px 22px;
	background: #1a1610;
	color: #f7efdc;
	text-decoration: none;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.3px;
	transition: transform 180ms ease, background-color 180ms ease;
}

.mb-niw-fallback-btn:hover { background: #000; transform: translateY(-1px); }

/* ---------- Noscript fallback ---------- */
.mb-niw-noscript {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #faf7f0;
	z-index: 4;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.mb-niw-noscript a {
	padding: 14px 24px;
	background: #1a1610;
	color: #f7efdc;
	text-decoration: none;
	border-radius: 999px;
	font-weight: 600;
}

/* Base44 nie zmienia rozmiaru badge na mobile, więc nakładka także pozostaje stała. */
@media (max-width: 768px) {
	.mb-niw-fallback-inner { padding: 28px 24px; }
}

/* Ukryj stary, dodatkowy badge. Reguła celowo znajduje się na końcu pliku. */
.overlay-logo {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 9999;
	background: #ffffff;
	padding: 10px 15px;
	border-radius: 8px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
	display: none !important;
}
