.mwc-popup-root {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.mwc-popup-root[hidden] {
	display: none !important;
}

.mwc-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	cursor: pointer;
}

.mwc-popup-dialog {
	position: relative;
	z-index: 1;
	width: min(960px, 100%);
	max-height: min(90vh, 900px);
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	outline: none;
}

.mwc-popup-close {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #334155;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.mwc-popup-close:hover,
.mwc-popup-close:focus-visible {
	background: #f1f5f9;
	color: #0f172a;
}

.mwc-popup-body {
	position: relative;
	flex: 1;
	min-height: 200px;
	overflow: auto;
}

.mwc-popup-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.85);
	font-size: 1rem;
	color: #475569;
}

.mwc-popup-loading[hidden] {
	display: none !important;
}

.mwc-popup-content {
	min-height: 120px;
}

.mwc-popup-content iframe {
	display: block;
	width: 100%;
	border: 0;
	vertical-align: top;
}

.mwc-popup-error {
	margin: 1.5rem;
	padding: 1rem 1.25rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #991b1b;
	font-size: 0.95rem;
}

.mwc-popup-root.mwc-is-open {
	animation: mwc-fade-in 0.2s ease;
}

@keyframes mwc-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

body.mwc-popup-open {
	overflow: hidden;
}
