/* ============================================================
   Corrales Popups — front-end modal
   Scoped under .cpop-* to avoid leaking into theme styles.
   ============================================================ */

.cpop-modal {
	position: fixed;
	inset: 0;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--cc-sans, system-ui, -apple-system, "Segoe UI", sans-serif);
	color: #0d0d0d;
}
.cpop-modal[hidden] { display: none; }

.cpop-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(13, 13, 13, 0.7);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: cpop-fade .25s ease;
}
.cpop-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 24px 80px rgba(0,0,0,0.35);
	animation: cpop-pop .3s cubic-bezier(.2,.9,.3,1.1);
	overflow-x: hidden;
}
@keyframes cpop-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cpop-pop {
	from { opacity: 0; transform: translateY(14px) scale(.96); }
	to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.cpop-modal__x {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	background: rgba(255,255,255,0.95);
	color: #0d0d0d;
	font: 700 16px/1 system-ui, sans-serif;
	cursor: pointer;
	display: grid;
	place-items: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.18);
	transition: background .15s ease, color .15s ease;
	z-index: 3;
}
.cpop-modal__x:hover { background: #0d0d0d; color: #fff; }

.cpop-modal__image {
	display: block;
	width: 100%;
	background: #fbf6eb;
	overflow: hidden;
}
.cpop-modal__image img {
	display: block;
	width: 100%;
	height: auto;
}

.cpop-modal__body {
	padding: 24px 26px 26px;
}
.cpop-modal__title {
	font-family: var(--cc-display, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.015em;
	margin: 0 0 8px;
	color: #0d0d0d;
}
.cpop-modal__subtitle {
	font-size: 14px;
	line-height: 1.5;
	color: #5e5e5e;
	margin: 0 0 16px;
}
.cpop-modal__subtitle strong { color: #b88b3b; font-weight: 700; }

/* ── Countdown ─────────────────────────────────────────── */
.cpop-countdown {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 16px 0 20px;
}
.cpop-countdown__cell {
	background: linear-gradient(135deg, #1a0f0a 0%, #3a1a14 100%);
	color: #fff;
	border-radius: 10px;
	padding: 12px 6px 8px;
	text-align: center;
	box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.25);
}
.cpop-countdown__cell strong {
	display: block;
	font-family: var(--cc-display, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
	color: #ffb86b;
	margin-bottom: 4px;
	font-variant-numeric: tabular-nums;
}
.cpop-countdown__cell span {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: rgba(255,255,255,0.72);
	font-weight: 700;
}

/* ── Form ───────────────────────────────────────────────── */
.cpop-form { display: flex; flex-direction: column; gap: 10px; }
.cpop-form__field { display: flex; flex-direction: column; gap: 4px; }
.cpop-form__field label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: #5e5e5e;
}
.cpop-form__field input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	color: #0d0d0d;
	background: #fbf6eb;
	border: 1.5px solid #e7dcc1;
	border-radius: 10px;
	box-sizing: border-box;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.cpop-form__field input:focus {
	outline: 0;
	border-color: #b88b3b;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(184, 139, 59, 0.18);
}
.cpop-form__submit {
	margin-top: 6px;
	padding: 14px 18px;
	background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .02em;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(238, 9, 121, 0.32);
	transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cpop-form__submit:hover:not(:disabled) {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(238, 9, 121, 0.4);
}
.cpop-form__submit:disabled { opacity: .7; cursor: progress; }

.cpop-form__msg {
	min-height: 1.2em;
	font-size: 13px;
	margin: 4px 0 0;
	line-height: 1.4;
}
.cpop-form__msg--ok    { color: #1aa86b; }
.cpop-form__msg--error { color: #c0392b; }

body.cpop-locked { overflow: hidden; }

@media (max-width: 520px) {
	.cpop-modal { padding: 14px; align-items: flex-end; }
	.cpop-modal__dialog {
		max-height: 92vh;
		border-radius: 18px 18px 0 0;
	}
	.cpop-modal__body { padding: 20px 20px 22px; }
	.cpop-modal__title { font-size: 20px; }
	.cpop-countdown__cell strong { font-size: 20px; }
	.cpop-countdown__cell { padding: 10px 4px 6px; }
}
