.goc-modal[hidden] {
	display: none !important;
}

.goc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 20px;
}

.goc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 18, 30, 0.7);
	backdrop-filter: blur(3px);
}

.goc-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 620px);
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: clamp(24px, 5vw, 44px);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
	color: #152033;
}

.goc-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #526075;
	font: 32px/1 sans-serif;
	cursor: pointer;
}

.goc-modal__close:hover,
.goc-modal__close:focus-visible {
	color: #111827;
}

.goc-modal__title {
	margin: 0 38px 14px 0;
	font-size: clamp(24px, 4vw, 34px);
	line-height: 1.15;
}

.goc-modal__content > :first-child,
.goc-modal__form > :first-child {
	margin-top: 0;
}

.goc-modal__content > :last-child,
.goc-modal__form > :last-child {
	margin-bottom: 0;
}

.goc-modal__form {
	margin-top: 22px;
}

body.goc-modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.goc-modal {
		padding: 12px;
	}

	.goc-modal__dialog {
		max-height: calc(100vh - 24px);
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.goc-modal:not([hidden]) .goc-modal__overlay {
		animation: goc-modal-fade 180ms ease-out;
	}

	.goc-modal:not([hidden]) .goc-modal__dialog {
		animation: goc-modal-in 220ms ease-out;
	}

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

	@keyframes goc-modal-in {
		from { opacity: 0; transform: translateY(14px) scale(0.98); }
	}
}
