/* =====================================================
   ОКНО ЗАПИСИ (попап виджета GetCourse)
   ===================================================== */

.ny-lesson-popup {
	position:fixed;
	inset:0;
	z-index:2147483640;
	display:flex;
	align-items:center;
	justify-content:center;
	padding:32px 20px;
	background:rgba(30,42,61,.72);
	backdrop-filter:blur(6px);
	-webkit-backdrop-filter:blur(6px);
	opacity:0;
	transition:opacity .25s ease;
	font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
	font-size:15px;
	line-height:1.5;
	color:#1E2A3D;
}
.ny-lesson-popup[data-ny-popup-state="true"] { opacity:1; }
.ny-lesson-popup[hidden] { display:none !important; }

.ny-lesson-popup__dialog {
	position:relative;
	width:700px;
	max-width:100%;
	max-height:88vh;
	overflow-y:auto;
	padding:28px;
	background:#FBF8F2;
	border-radius:24px;
	box-shadow:0 30px 80px -24px rgba(0,0,0,.5);
	transform:scale(.97);
	transition:transform .25s ease;
	overscroll-behavior:contain;
}
.ny-lesson-popup[data-ny-popup-state="true"] .ny-lesson-popup__dialog { transform:scale(1); }

.ny-lesson-popup__head {
	display:grid;
	grid-template-columns:1fr 40px;
	gap:12px;
	align-items:start;
	margin-bottom:20px;
}

.ny-lesson-popup__title {
	margin:0;
	font-family:Georgia,"Times New Roman",serif;
	font-size:22px;
	font-weight:700;
	line-height:1.25;
	letter-spacing:-.01em;
	color:#1E2A3D;
	text-align:center;
}

.ny-lesson-popup__close {
	-webkit-appearance:none;
	appearance:none;
	position:relative;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	width:40px;
	height:40px;
	min-width:40px;
	min-height:40px;
	flex:0 0 40px;
	padding:0;
	margin:0;
	border:0;
	border-radius:50%;
	background:rgba(30,42,61,.10);
	color:#1E2A3D;
	font-family:inherit;
	font-size:0;
	line-height:0;
	cursor:pointer;
	transition:background .2s ease, color .2s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.ny-lesson-popup__close:hover { background:rgba(30,42,61,.16); color:#b87a89; }
.ny-lesson-popup__close:focus-visible { outline:2px solid #4c6e9b; outline-offset:3px; }
/* Крестик — инлайновый SVG: рисуется всегда, независимо от шрифта и внешних стилей */
.ny-lesson-popup__close-icon {
	display:block;
	width:20px;
	height:20px;
	flex:0 0 auto;
	pointer-events:none;
	overflow:visible;
	transition:transform .35s cubic-bezier(.22,1,.36,1);
}
.ny-lesson-popup__close:hover .ny-lesson-popup__close-icon { transform:rotate(90deg) scale(1.08); }
.ny-lesson-popup__close-line {
	fill:none;
	stroke:currentColor;
	stroke-width:2.2;
	stroke-linecap:round;
	stroke-dasharray:20;
	stroke-dashoffset:0;
}
/* Анимация: крестик аккуратно прорисовывается при открытии окна */
.ny-lesson-popup[data-ny-popup-state="true"] .ny-lesson-popup__close-line {
	animation:ny-close-draw .34s cubic-bezier(.22,1,.36,1) both;
}
.ny-lesson-popup[data-ny-popup-state="true"] .ny-lesson-popup__close-line:nth-of-type(2) {
	animation-delay:.08s;
}
.ny-lesson-popup[data-ny-popup-state="true"] .ny-lesson-popup__close {
	animation:ny-close-pop .38s cubic-bezier(.22,1,.36,1);
}
@keyframes ny-close-draw { from { stroke-dashoffset:20; } to { stroke-dashoffset:0; } }
@keyframes ny-close-pop { from { opacity:0; transform:scale(.55) rotate(-40deg); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) {
	.ny-lesson-popup__close,
	.ny-lesson-popup__close-icon,
	.ny-lesson-popup__close-line { animation:none !important; transition:none !important; }
	.ny-lesson-popup__close-line { stroke-dashoffset:0; }
}

/* Заготовка под содержимое попапа: сюда вставляется строка импорта виджета GetCourse */
.ny-lesson-popup__body { min-height:80px; }
.ny-lesson-popup__widget-frame { width:100%; }

.ny-lesson-popup__fallback {
	padding:20px 4px;
	text-align:center;
	color:#4A5868;
	font-size:13.5px;
	line-height:1.55;
}
.ny-lesson-popup__fallback p { margin:0 0 12px; }
.ny-lesson-popup__fallback a {
	display:inline-flex;
	align-items:center;
	justify-content:center;
	padding:12px 22px;
	border-radius:50px;
	background:#b87a89;
	color:#FFFFFF;
	font-family:Georgia,"Times New Roman",serif;
	font-size:13px;
	font-weight:700;
	text-decoration:none;
	transition:background .2s ease;
}
.ny-lesson-popup__fallback a:hover { background:#9c6373; }

html.ny-lesson-popup-open, html.ny-lesson-popup-open body { overflow:hidden; touch-action:none; }

@media (max-width:640px) {
	.ny-lesson-popup { padding:16px 12px; }
	.ny-lesson-popup__dialog { max-height:92vh; padding:22px 18px; border-radius:20px; }
	.ny-lesson-popup__title { font-size:19px; }
	/* Крестик закреплён в правом верхнем углу окна: не сжимается и не уезжает при прокрутке */
	.ny-lesson-popup__head { display:block; padding-right:46px; }
	.ny-lesson-popup__close {
		position:absolute;
		top:10px;
		right:10px;
		z-index:5;
		width:40px;
		height:40px;
		min-width:40px;
		min-height:40px;
		flex:0 0 40px;
		background:rgba(30,42,61,.14);
		box-shadow:0 4px 14px -8px rgba(0,0,0,.45);
	}
}
