/* =============================================================
   Canada Yoga — Lead-capture popup
   Uses the design tokens from widgets.css (:root).
   ============================================================= */

.cy-pop {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--cy-font-body);
}
.cy-pop[hidden] { display: none !important; }

.cy-pop__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 35, 24, .55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	animation: cy-pop-fade .3s ease both;
}

.cy-pop__box {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: linear-gradient(180deg, #ffffff, var(--cy-bone-soft));
	border: 1px solid var(--cy-mist);
	border-radius: 22px;
	padding: 34px 32px 30px;
	box-shadow: 0 40px 90px -30px rgba(20, 35, 24, .55);
	animation: cy-pop-in .38s cubic-bezier(.2, .8, .3, 1) both;
}
/* gold accent bar */
.cy-pop__box::before {
	content: "";
	position: absolute;
	left: 32px; right: 32px; top: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--cy-clay), var(--cy-gold));
	border-radius: 999px;
}

.cy-pop__x {
	position: absolute;
	top: 12px; right: 14px;
	width: 34px; height: 34px;
	display: flex; align-items: center; justify-content: center;
	border: none;
	background: transparent;
	color: #8a857a;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: background .2s var(--cy-ease), color .2s var(--cy-ease);
}
.cy-pop__x:hover { background: var(--cy-mist); color: var(--cy-forest); }

.cy-pop__title {
	font-family: var(--cy-font-display);
	font-weight: 500;
	color: var(--cy-forest);
	font-size: 1.7rem;
	line-height: 1.15;
	margin: 8px 0 18px;
}

/* Form */
.cy-pop__form { display: grid; gap: 12px; }
.cy-pop__form input,
.cy-pop__form select {
	width: 100%;
	height: 50px;
	font-family: var(--cy-font-body);
	font-size: .98rem;
	color: var(--cy-forest);
	background: #fff;
	border: 1px solid var(--cy-mist);
	border-radius: 12px;
	padding: 0 15px;
	transition: border-color .2s var(--cy-ease), box-shadow .2s var(--cy-ease);
}
.cy-pop__form select {
	line-height: 1.3;
	padding-right: 42px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f3a2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 13px;
}
.cy-pop__form input:focus,
.cy-pop__form select:focus {
	outline: none;
	border-color: var(--cy-forest);
	box-shadow: 0 0 0 3px rgba(31, 58, 46, .12);
}
.cy-pop__form input::placeholder { color: #9a9488; }
.cy-pop__btn { width: 100%; justify-content: center; margin-top: 2px; }
.cy-pop .cy-contact__status { margin: 2px 0 0; font-size: .88rem; min-height: 1em; text-align: center; }
.cy-pop .cy-contact__status.is-ok { color: var(--cy-sage); }
.cy-pop .cy-contact__status.is-err { color: var(--cy-clay-deep); }

@keyframes cy-pop-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cy-pop-in {
	from { opacity: 0; transform: translateY(22px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
	.cy-pop { padding: 14px; }
	.cy-pop__box { padding: 30px 22px 24px; border-radius: 18px; }
	.cy-pop__box::before { left: 22px; right: 22px; }
	.cy-pop__title { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
	.cy-pop__overlay, .cy-pop__box { animation: none; }
}
