/**
 * Единая оболочка модалки (квиз, МФЦ-результат, callback).
 * Стили независимы от Tailwind и совпадают с превью-макетом.
 */

.dolgunet-modal{
	position:fixed;inset:0;z-index:900;
	display:flex;align-items:center;justify-content:center;
	padding:20px;
	background:rgba(19,30,69,.55);
	backdrop-filter:blur(2px);
	-webkit-backdrop-filter:blur(2px);
	opacity:0;visibility:hidden;
	transition:opacity .2s ease,visibility .2s ease;
}
.dolgunet-modal[data-open="1"]{opacity:1;visibility:visible;}
.dolgunet-modal[hidden]{display:none !important;}

.dolgunet-modal__panel{
	position:relative;
	width:100%;max-width:480px;
	background:#fff;
	border-radius:20px;
	max-height:92vh;overflow-y:auto;overflow-x:hidden;
	transform:translateY(10px);
	transition:transform .2s ease;
	box-shadow:0 30px 80px -20px rgba(19,30,69,.35);
}
.dolgunet-modal[data-open="1"] .dolgunet-modal__panel{transform:none;}

.dolgunet-modal__wrap{padding:30px 32px 28px;}

.dolgunet-modal-close{
	position:absolute;top:14px;right:14px;
	width:40px;height:40px;padding:0;
	min-width:unset;
	background:transparent;border:0;cursor:pointer;
	color:#131E45;border-radius:10px;
	display:flex;align-items:center;justify-content:center;
	transition:background .15s ease,color .15s ease,transform .15s ease;
	z-index:2;
	font-size:0;
	line-height:1;
}
.dolgunet-modal-close::before,
.dolgunet-modal-close::after{
	content:"";
	position:absolute;
	left:50%;top:50%;
	width:20px;height:2.5px;
	background:currentColor;
	border-radius:2px;
	transform-origin:center;
}
.dolgunet-modal-close::before{transform:translate(-50%,-50%) rotate(45deg);}
.dolgunet-modal-close::after{transform:translate(-50%,-50%) rotate(-45deg);}
.dolgunet-modal-close svg{display:none !important;}
.dolgunet-modal-close:hover{background:#EDF2FB;color:#0F2E5F;}
.dolgunet-modal-close:active{transform:scale(.95);}
.dolgunet-modal-close:focus-visible{outline:3px solid #2E7CC0;outline-offset:2px;}

.dolgunet-modal__progress{
	position:sticky;top:0;left:0;right:0;
	height:3px;background:#EEF3FA;
	border-radius:20px 20px 0 0;
	overflow:hidden;z-index:1;
}
.dolgunet-modal__progress[hidden]{display:none !important;}
.dolgunet-modal__progress-bar{
	height:100%;width:0%;
	background:#2E7CC0;
	transition:width .35s ease;
}

.dolgunet-modal__eyebrow{
	display:block;
	margin:0 0 12px;
	font-family:'IBM Plex Mono',ui-monospace,Menlo,monospace;
	font-size:11px;font-weight:500;
	letter-spacing:.1em;text-transform:uppercase;
	color:#2E7CC0;
}
.dolgunet-modal__eyebrow[hidden]{display:none !important;}

.dolgunet-modal__title{
	margin:0 0 10px;
	font-size:21px;line-height:1.28;font-weight:700;
	letter-spacing:-.01em;color:#131E45;
	padding-right:34px;
}
.dolgunet-modal__title[hidden]{display:none !important;}

.dolgunet-modal__body{color:#131E45;}
.dolgunet-modal__body p{margin:0 0 12px;font-size:15px;line-height:1.5;color:#5C6A90;}
.dolgunet-modal__body p:last-child{margin-bottom:0;}

.dolgunet-modal__foot{
	display:flex;align-items:center;justify-content:space-between;
	gap:12px;margin-top:22px;flex-wrap:wrap;
}
.dolgunet-modal__foot[hidden]{display:none !important;}
.dolgunet-modal__foot--single{justify-content:stretch;}
.dolgunet-modal__foot--single > *{flex:1;}

.dolgunet-modal__error{
	margin-top:14px;padding:10px 25px;
	background:#FDECEA;border-radius:9px;
	color:#D2544A;font-size:15px;line-height:1.4;
}
.dolgunet-modal__error[hidden]{display:none !important;}

.dolgunet-modal__resource-note{
	margin:0 0 18px;padding:14px 16px;
	background:#F1F5FC;border-radius:11px;
	font-size:13px;line-height:1.45;color:#5C6A90;
}
.dolgunet-modal__resource-note[hidden]{display:none !important;}
.dolgunet-modal__resource-note .dolgunet-quiz-resource-note-title{
	margin:0 0 4px;font-weight:600;color:#131E45;font-size:13px;
}
.dolgunet-modal__resource-note .dolgunet-quiz-resource-note-text{margin:0;font-size:13px;}

/* ── Кнопки модалки ─────────────────────────────────────── */
.dn-btn{
	display:inline-flex;align-items:center;justify-content:center;gap:8px;
	min-width:200px;padding:16px 30px;border:0;border-radius:13px;
	font-family:inherit;font-size:16px;font-weight:800;letter-spacing:.01em;line-height:1.5;cursor:pointer;
	transition:.18s;
}
.dn-btn:focus-visible{outline:3px solid #131E45;outline-offset:3px;}
.dn-btn--primary{background:linear-gradient(180deg,#1fa4e6,#1480cb);color:#fff;box-shadow:0 16px 30px -12px rgba(31,164,230,.6);}
.dn-btn--primary:hover{background:linear-gradient(180deg,#23a3e2,#1786cf);filter:brightness(1.1);transform:scale(1.02);box-shadow:0 22px 38px -12px rgba(31,164,230,.7);color:#fff;transition:.18s;}
.dn-btn--primary:active{transform:none;filter:none;}
.dn-btn--primary:disabled{background:#B8C7DF;box-shadow:none;filter:none;cursor:not-allowed;transform:none;}
.dn-btn--ghost{background:#fff;color:#131E45;border:1.5px solid #C2D1EA;}
.dn-btn--ghost:hover{color:#0F2E5F;background:#F1F5FC;border-color:#0F2E5F;}
.dn-btn--ghost:disabled{opacity:.4;cursor:not-allowed;}
.dn-btn--full{width:100%;flex:1 1 100%;}

/* ── Форма (input, telephone, consent, legal) ───────────── */
.dolgunet-modal .dn-field{
	width:100%;height:54px;padding:0 16px;margin:0 0 12px;
	border:1.5px solid #C2D1EA;border-radius:12px;background:#fff;
	font-family:inherit;font-size:16px;color:#131E45;
	transition:border-color .15s ease;
}
.dolgunet-modal .dn-field::placeholder{color:#9AA6C2;}
.dolgunet-modal .dn-field:focus{outline:0;border-color:#2E7CC0;}
.dolgunet-modal .dn-field.is-error{border-color:#D2544A;}

.dolgunet-modal .dn-consent{
	display:flex;gap:10px;align-items:flex-start;
	margin:6px 0 18px;
	font-size:13.5px;font-weight:400;line-height:1.45;
	letter-spacing:normal;text-transform:none;
	color:#5C6A90;cursor:pointer;
}
.dolgunet-modal .dn-consent *{text-transform:none;letter-spacing:normal;}
.dolgunet-modal .dolgunet-mfc-check__label,
.dolgunet-modal .dolgunet-mfc-check__name{text-transform:none !important;letter-spacing:normal !important;font-weight:500 !important;font-size:15.5px !important;}
.dolgunet-modal .dolgunet-mfc-check__list{border-top:1px solid #C2D1EA;list-style:none;padding:0;margin:14px 0 0;display:block;}
.dolgunet-modal .dolgunet-mfc-check__row{list-style:none;margin:0;padding:0;border-bottom:1px solid #C2D1EA;border-top:0;}
.dolgunet-modal .dolgunet-mfc-check__row::before{display:none !important;content:none !important;}
.dolgunet-modal .dolgunet-mfc-check__label{display:grid;grid-template-columns:22px 1fr;gap:14px;align-items:center;padding:14px 4px;cursor:pointer;user-select:none;color:#131E45;}
.dolgunet-modal .dolgunet-mfc-check__box{appearance:none;-webkit-appearance:none;width:22px;height:22px;margin:0;border:1.5px solid #C2D1EA;border-radius:6px;background:#fff;cursor:pointer;position:relative;flex-shrink:0;transition:background .15s ease,border-color .15s ease;}
.dolgunet-modal .dolgunet-mfc-check__box:checked{background:#2E7CC0;border-color:#2E7CC0;}
.dolgunet-modal .dolgunet-mfc-check__box:checked::after{content:"";position:absolute;left:6px;top:2px;width:6px;height:12px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);}
.dolgunet-modal .dn-consent input{
	margin-top:2px;width:17px;height:17px;flex:0 0 auto;
	accent-color:#2E7CC0;
}
.dolgunet-modal .dn-consent a{color:#2E7CC0;text-decoration:underline;}
.dolgunet-modal .dn-consent.is-error{color:#D2544A;}

.dolgunet-modal .dn-legal{
	margin:14px 0 0;font-size:11.5px;line-height:1.45;color:#8A96B4;
}

/* ── Статус (МФЦ результат) ─────────────────────────────── */
.dolgunet-modal__status{
	display:inline-flex;align-items:center;gap:7px;
	margin:0 0 12px;
	font-family:'IBM Plex Mono',ui-monospace,Menlo,monospace;
	font-size:11px;font-weight:500;
	letter-spacing:.08em;text-transform:uppercase;
}
.dolgunet-modal__status--ok{color:#2FA36B;}
.dolgunet-modal__status--no{color:#B8781F;}

.dolgunet-modal__missed{
	margin:0 0 20px;padding:14px 16px;
	background:#F1F5FC;border-radius:11px;
	font-size:14px;line-height:1.5;color:#131E45;
}
.dolgunet-modal__missed b{
	display:block;font-weight:600;margin-bottom:6px;
	font-size:13px;color:#5C6A90;
}
.dolgunet-modal__missed ul{margin:0;padding-left:18px;}
.dolgunet-modal__missed li{margin-bottom:4px;}
.dolgunet-modal__missed li:last-child{margin-bottom:0;}

/* ── Успех после отправки ───────────────────────────────── */
.dolgunet-modal__done{text-align:center;padding:10px 0 6px;}
.dolgunet-modal__done-icon{
	width:64px;height:64px;margin:0 auto 14px;
	color:#2FA36B;
}
.dolgunet-modal__done h4{
	margin:0 0 8px;font-size:20px;font-weight:700;color:#131E45;
}
.dolgunet-modal__done p{margin:0;font-size:15px;color:#5C6A90;line-height:1.5;}

/* ── Опции квиза ────────────────────────────────────────── */
.dolgunet-quiz-options{
	display:flex;flex-direction:column;gap:10px;
	margin:0 0 6px;
}
.dolgunet-quiz-option{
	display:block;width:100%;text-align:left;
	padding:15px 18px;
	background:#fff;color:#131E45;
	border:1.5px solid #C2D1EA;border-radius:12px;
	font-family:inherit;font-size:15.5px;font-weight:500;
	cursor:pointer;
	transition:border-color .15s ease,background .15s ease,color .15s ease;
}
.dolgunet-quiz-option:hover{border-color:#2E7CC0;color:#2E7CC0;}
.dolgunet-quiz-option.is-selected,
.dolgunet-quiz-option[aria-checked="true"]{
	border-color:#2E7CC0;background:#F1F5FC;color:#131E45;
}
.dolgunet-quiz-option:focus-visible{outline:3px solid #2E7CC0;outline-offset:2px;}

.dolgunet-quiz-question{
	margin:0 0 18px;font-size:19px;line-height:1.28;font-weight:700;
	letter-spacing:-.01em;color:#131E45;
}

.dolgunet-quiz-prefill{
	margin:0 0 16px;padding:11px 14px;
	background:#F1F5FC;border-radius:10px;
	font-size:13.5px;line-height:1.4;color:#5C6A90;
}
.dolgunet-quiz-prefill b{color:#131E45;font-weight:600;}
.dolgunet-quiz-prefill-edit{
	margin-left:8px;
	background:transparent;border:0;padding:0;
	color:#2E7CC0;font:inherit;font-size:13px;
	text-decoration:underline;cursor:pointer;
}
.dolgunet-quiz-prefill-edit:hover{color:#2569A6;}

/* ── Адаптив ────────────────────────────────────────────── */
@media (max-width:620px){
	.dolgunet-modal{padding:12px;}
	.dolgunet-modal__panel{border-radius:16px;max-height:96vh;}
	.dolgunet-modal__wrap{padding:26px 20px 22px;}
	.dolgunet-modal__title{font-size:19px;padding-right:32px;}
	.dolgunet-modal__body p{font-size:14.5px;}
	.dolgunet-modal-close{top:14px;right:14px;}
	.dolgunet-quiz-question{font-size:17px;}
	.dolgunet-quiz-option{font-size:15px;padding:14px 16px;}
	.dolgunet-modal__foot{flex-direction:row;flex-wrap:nowrap;gap:8px;}
	.dolgunet-modal__foot > .dn-btn{flex:1 1 0;min-width:0;}
	.dn-btn{min-height:48px;padding:0 14px;font-size:15px;min-width:0;}
}

@media (prefers-reduced-motion:reduce){
	.dolgunet-modal,.dolgunet-modal__panel,.dolgunet-modal__progress-bar,
	.dolgunet-quiz-option,.dn-btn{transition:none !important;}
}
