/**
 * Paramour In-App Surface — overlay shell (paramour.me).
 */

.paramour-in-app-surface {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: stretch;
	justify-content: center;
	box-sizing: border-box;
	padding: 2%;
	background: rgba(20, 23, 116, 0.45);
}

.paramour-in-app-surface[hidden] {
	display: none !important;
}

body.paramour-in-app-surface-open {
	overflow: hidden;
}

.paramour-in-app-surface__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(100%, 960px);
	height: 100%;
	max-height: 100%;
	margin: 0 auto;
	background: #fff;
	border: 2px solid #ec4f6a;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}

.paramour-in-app-surface__chrome {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	min-height: 52px;
	margin: 0;
	padding: 8px 12px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.paramour-in-app-surface__logo {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.paramour-in-app-surface__title {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	color: #333;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
}

.paramour-in-app-surface__breadcrumb-parent {
	flex-shrink: 0;
	color: #707070;
	font-weight: 600;
}

.paramour-in-app-surface__breadcrumb-sep {
	flex-shrink: 0;
	margin: 0 0.35em;
	color: #707070;
	font-weight: 600;
}

.paramour-in-app-surface__breadcrumb-current {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	color: #333;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.paramour-in-app-surface__close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #333;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}

.paramour-in-app-surface__close:hover,
.paramour-in-app-surface__close:focus-visible {
	background: transparent;
	color: #3f3138;
	outline: 2px solid #141774;
	outline-offset: 2px;
}

.paramour-in-app-surface__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f7f7f7;
	z-index: 2;
}

.paramour-in-app-surface__loading[hidden] {
	display: none !important;
}

.paramour-in-app-surface__spinner {
	position: relative;
	width: 50px;
	height: 50px;
}

.paramour-in-app-surface__spinner span {
	position: absolute;
	inset: 0;
	border-radius: 100%;
	background: #141774;
	opacity: 0.5;
	animation: paramour-in-app-surface-pulse 1.5s ease-in-out infinite;
}

.paramour-in-app-surface__spinner span:last-child {
	animation-delay: 0.75s;
}

@keyframes paramour-in-app-surface-pulse {
	0%,
	100% {
		transform: scale(0);
		opacity: 0.5;
	}
	50% {
		transform: scale(1);
		opacity: 0;
	}
}

.paramour-in-app-surface__error {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 24px;
	background: #f7f7f7;
	text-align: center;
	z-index: 3;
}

.paramour-in-app-surface__error[hidden] {
	display: none !important;
}

.paramour-in-app-surface__error-text {
	margin: 0;
	color: #333;
}

.paramour-in-app-surface__error-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.paramour-in-app-surface__retry,
.paramour-in-app-surface__open-external {
	padding: 8px 16px;
	border: 1px solid #141774;
	border-radius: 4px;
	background: #fff;
	color: #141774;
	font-size: 0.875rem;
	cursor: pointer;
}

.paramour-in-app-surface__retry:hover,
.paramour-in-app-surface__open-external:hover,
.paramour-in-app-surface__retry:focus-visible,
.paramour-in-app-surface__open-external:focus-visible {
	background: #eef0ff;
}

.paramour-in-app-surface__frame {
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	border: 0;
	background: #fff;
}

.paramour-in-app-surface.is-open .paramour-in-app-surface__frame {
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.paramour-in-app-surface__spinner span {
		animation: none;
		opacity: 0.35;
	}
}
