/**
 * PF Contact Modal — the dialog the header Contact button opens.
 *
 * Glass is the shared `.pf-glass` rules from pf-glass.css: this file only sets
 * the two custom properties (`--pf-glass-blur`, `--pf-glass-edge-blur`) inline
 * per request, so the panel is one more glass surface rather than a second
 * implementation of one. Everything below is layout, colour and motion — the
 * parts a glass toggle would never touch.
 */

.pf-contact-modal[hidden] {
	display: none;
}

.pf-contact-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.pf-contact-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 26, 0.72);
	animation: pf-contact-modal-fade 0.18s ease-out;
}

.pf-contact-modal-panel {
	position: relative;
	max-width: 480px;
	width: 100%;
	max-height: 100%;
	padding: 40px 32px 32px;
	overflow: auto;
	background: #1e1a24;
	border: 1px solid rgba(245, 243, 247, 0.12);
	border-radius: var(--pf-contact-modal-radius, 20px);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
	animation: pf-contact-modal-rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* The glass toggle replaces the flat surface above with the shared tint —
   see pf-glass.md. Without it the panel stays the solid plum surface. */
.pf-contact-modal-panel.pf-glass {
	border-color: rgba(245, 243, 247, 0.12);
}

.pf-contact-modal-content {
	color: #c9c4d0;
}

.pf-contact-modal-content > :first-child {
	margin-top: 0;
}

.pf-contact-modal-content > :last-child {
	margin-bottom: 0;
}

.pf-contact-modal-content :is(h1, h2, h3, h4, h5, h6) {
	color: #f5f3f7;
}

.pf-contact-modal-content a {
	color: #b07bd8;
}

.pf-contact-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: #8a8394;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.pf-contact-modal-close:hover,
.pf-contact-modal-close:focus-visible {
	color: #b07bd8;
	background: rgba(245, 243, 247, 0.1);
}

.pf-contact-modal-close:focus-visible {
	outline: 2px solid #c8a2e8;
	outline-offset: 2px;
}

.pf-contact-modal-content a:focus-visible {
	outline: 2px solid #c8a2e8;
	outline-offset: 2px;
}

/* The scroll lock the script puts on the body while the dialog is open. */
.pf-contact-modal-open {
	overflow: hidden;
}

@keyframes pf-contact-modal-fade {
	from {
		opacity: 0;
	}
}

@keyframes pf-contact-modal-rise {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.97);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pf-contact-modal-backdrop,
	.pf-contact-modal-panel {
		animation: none;
	}
}
