/* COMy Access Control — Popup styles (v5 inset-image design) */

:root {
	--comy-purple:       #660D51;
	--comy-purple-mid:   #7d1062;
	--comy-light-p1:     #F2E7F5;
	--comy-grey-2:       #EFEFF6;
	--comy-grey-4:       #5E5F7A;
	--comy-grey-5:       #312D40;
	--comy-grey-8:       #1A1823;
	--comy-shadow:       0 8px 80px rgba(86, 77, 95, 0.18);
}

/* ---- Overlay ---- */

.comy-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	animation: comy-fade-in 0.22s ease both;
}

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

.comy-overlay[hidden] {
	display: none;
}

/* ---- Backdrop ---- */

.comy-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.comy-backdrop__img {
	display: none;
}

/* ---- Popup card ---- */

.comy-popup {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: row;
	width: 100%;
	max-width: 920px;
	min-height: 540px;
	background: #fff;
	border-radius: 24px;
	box-shadow: var(--comy-shadow), 0 2px 0 rgba(255,255,255,0.6) inset;
	overflow: hidden;
	font-family: 'Mulish', sans-serif;
	animation: comy-pop-in 0.30s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	animation-delay: 0.08s;
}

@keyframes comy-pop-in {
	from { opacity: 0; transform: scale(0.93) translateY(14px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Close button ---- */

.comy-close {
	position: absolute;
	top: 16px;
	right: 18px;
	background: none;
	border: none;
	font-size: 16px;
	color: var(--comy-grey-4);
	cursor: pointer;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.comy-close:hover {
	background: var(--comy-light-p1);
	color: var(--comy-purple);
}

/* ---- Left panel — inset image ---- */

.comy-panel-image {
	flex: 0 0 44%;
	padding: 20px 16px 20px 20px;
	background: #fff;
}

.comy-image-inner {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 16px;
	overflow: hidden;
}

.comy-image-inner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.comy-image-inner::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(102,13,81,0.60) 0%, transparent 55%);
	pointer-events: none;
}

.comy-image-caption {
	position: absolute;
	bottom: 22px;
	left: 22px;
	right: 22px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.comy-edition {
	font-family: 'Mulish', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.75);
}

.comy-congress-name {
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-size: 18px;
	color: #fff;
	line-height: 1.3;
}

/* ---- Right panel — form ---- */

.comy-panel-form {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 48px 52px 48px 40px;
	box-sizing: border-box;
}

.comy-form-header {
	margin-bottom: 32px;
}

.comy-logo {
	height: 52px;
	width: auto;
	display: block;
}

.comy-form-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.comy-heading {
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-size: 36px;
	font-weight: 400;
	color: var(--comy-grey-5);
	margin: 0 0 10px;
	line-height: 1.15;
}

.comy-subtext {
	font-family: 'Mulish', sans-serif;
	font-size: 13.5px;
	color: var(--comy-grey-4);
	margin: 0 0 28px;
	max-width: 340px;
	line-height: 1.55;
}

/* ---- Input group ---- */

.comy-input-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-bottom: 14px;
}

.comy-label {
	font-family: 'Mulish', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--comy-purple);
}

.comy-input {
	font-family: 'Mulish', sans-serif;
	font-size: 14px;
	color: var(--comy-grey-8);
	background: var(--comy-light-p1);
	border: 1.5px solid rgba(102, 13, 81, 0.15);
	border-radius: 12px;
	padding: 14px 18px;
	width: 100%;
	box-sizing: border-box;
	outline: none;
	transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.comy-input::placeholder {
	color: var(--comy-grey-4);
	opacity: 0.6;
}

.comy-input:focus {
	background: #fff;
	border-color: var(--comy-purple);
	box-shadow: 0 0 0 3px rgba(102, 13, 81, 0.12);
}

/* ---- Error message ---- */

.comy-error {
	font-size: 13px;
	color: #c0392b;
	background: #fff1f0;
	border: 1px solid rgba(192, 57, 43, 0.18);
	border-radius: 10px;
	padding: 11px 16px;
	margin-top: 12px;
	line-height: 1.55;
}

.comy-error a {
	color: #c0392b;
	font-weight: 700;
	text-decoration: underline;
}

/* ---- Submit button ---- */

.comy-submit-btn {
	font-family: 'Mulish', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: var(--comy-purple);
	border: none;
	border-radius: 14px;
	padding: 15px 24px;
	width: 100%;
	cursor: pointer;
	transition: background 0.18s, transform 0.12s, box-shadow 0.15s;
	position: relative;
}

.comy-submit-btn:hover {
	background: var(--comy-purple-mid);
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(102, 13, 81, 0.28);
}

.comy-submit-btn:active {
	transform: none;
	box-shadow: none;
}

.comy-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* ---- Form footer ---- */

.comy-form-footer {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--comy-grey-2);
}

.comy-form-footer p {
	font-size: 12px;
	color: var(--comy-grey-4);
	margin: 0 0 6px;
	line-height: 1.5;
}

.comy-form-footer p:last-child {
	margin-bottom: 0;
}

.comy-form-footer a {
	color: var(--comy-purple);
	text-decoration: none;
	font-weight: 600;
}

.comy-form-footer a:hover {
	text-decoration: underline;
}

/* ---- Fade-out animation ---- */

@keyframes comy-fade-out {
	to { opacity: 0; pointer-events: none; }
}

.comy-overlay--hiding {
	animation: comy-fade-out 0.3s ease forwards;
}

/* ---- Google Fonts (loaded here so CSS is self-contained) ---- */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital@1&family=Mulish:wght@400;600;700&display=swap');

/* ---- Responsive ---- */

@media (max-width: 700px) {
	.comy-overlay {
		padding: 12px;
		align-items: flex-end;
	}

	.comy-popup {
		flex-direction: column;
		border-radius: 20px;
		min-height: unset;
		max-height: 92vh;
		overflow-y: auto;
	}

	.comy-panel-image {
		flex: 0 0 auto;
		padding: 16px 16px 0;
	}

	.comy-image-inner {
		height: 200px;
	}

	.comy-panel-form {
		padding: 28px 28px 36px;
	}

	.comy-heading {
		font-size: 28px;
	}
}
