/**
 * Модальные окна (Fancybox HTML): обратный звонок, заказ услуги.
 * Подключается после jquery.fancybox.css и style.css.
 */

.fancybox-slide--html {
	padding: 16px;
}

.fancybox-slide--html .fancybox-content {
	padding: 0;
	margin: 0;
	background: transparent;
	overflow: visible;
	max-width: min(100vw - 32px, 560px);
	vertical-align: middle;
}

.fancybox-slide--html .fancybox-close-small {
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.06);
	color: #1a2b3c;
	opacity: 1;
	transition: background 0.2s ease, color 0.2s ease;
}

.fancybox-slide--html .fancybox-close-small:hover {
	background: rgba(0, 114, 138, 0.12);
	color: #00728a;
}

.fancybox-slide--html .fancybox-close-small:focus {
	outline: 2px solid rgba(0, 114, 138, 0.35);
	outline-offset: 2px;
}

.bti-popup {
	position: relative;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 48px rgba(15, 35, 52, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	text-align: left;
}

.bti-popup__header {
	padding: 28px 28px 12px;
	border-bottom: 1px solid #e8ecef;
	background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.bti-popup__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: #1a2b3c;
	letter-spacing: -0.02em;
}

.bti-popup__body {
	padding: 20px 28px 28px;
}

.bti-popup__notice {
	margin: 0;
	padding: 8px 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: #4a5568;
}

.bti-popup .statusFormSubmit {
	min-height: 22px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 500;
	color: #00728a;
}

.bti-popup .statusFormSubmit:empty {
	margin-bottom: 0;
	min-height: 0;
}

.bti-popup-form.is-waiting-order .statusFormSubmit {
	margin: 28px 12px;
	min-height: 0;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	text-align: center;
	color: #1a2b3c;
}

/* После успешной отправки — только сообщение */
.formAjax--success,
.formAjaxService.formAjax--success,
.bti-popup-form.formAjax--success {
	min-height: 120px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 12px 0;
}

.formAjax--success > .statusFormSubmit,
.formAjax--success .statusFormSubmit--ok,
.formAjax--success .bti-service-order-success {
	width: 100%;
	max-width: 420px;
	margin: 0;
	padding: 16px 18px;
	text-align: center;
	font-size: 16px;
	line-height: 1.45;
	font-weight: 500;
	color: #1a2b3c;
}

.action .formAjax--success > .statusFormSubmit,
.action .formAjax--success .statusFormSubmit--ok {
	color: #fff;
}

.bti-popup .popup__form .cols {
	margin: 0 -10px;
}

.bti-popup .popup__form .col {
	padding: 0 10px;
	flex: 1 1 200px;
	min-width: 0;
}

.bti-popup .form-group .title {
	color: #5c6670;
}

.bti-popup .popup__form .form-group {
	margin-bottom: 0;
}

.bti-date-field {
	position: relative;
	display: block;
	width: 100%;
}

.bti-date-field .bti-date-mask {
	width: 100%;
	padding-right: 44px;
	box-sizing: border-box;
}

.bti-date-field .bti-date-native {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.bti-date-field::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 14px;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	pointer-events: none;
	z-index: 1;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 18px 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' stroke='%2300728a' stroke-width='1.8'/%3E%3Cpath d='M3 10h18' stroke='%2300728a' stroke-width='1.8'/%3E%3Cpath d='M8 3v4M16 3v4' stroke='%2300728a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.bti-popup-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bti-popup--service {
	overflow: visible;
}

.bti-popup-form__variant {
	width: 100%;
	min-width: 0;
	margin-bottom: 0;
}

.bti-popup-form__variant .title {
	color: #5c6670;
}

.bti-variant-select {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.bti-variant-select__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.bti-variant-select__ui {
	position: relative;
	width: 100%;
}

.bti-variant-select__trigger {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 48px;
	padding: 0 38px 0 14px;
	box-sizing: border-box;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	line-height: 1.35;
	color: #3b3b39;
	text-align: left;
	cursor: pointer;
	border-radius: 10px;
	border: 1px solid #e2e5ea;
	background-color: #fafbfc;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235c6670' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.bti-variant-select__trigger:hover {
	border-color: #c5cdd6;
	background-color: #fff;
}

.bti-variant-select.is-open .bti-variant-select__trigger,
.bti-variant-select__trigger:focus {
	outline: none;
	border-color: #00728a;
	background-color: #fff;
	box-shadow: 0 0 0 3px rgba(0, 114, 138, 0.12);
}

.bti-variant-select__value {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bti-variant-select__list {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 99999;
	max-height: min(280px, 50vh);
	overflow-x: hidden;
	overflow-y: auto;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #e2e5ea;
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(15, 35, 52, 0.14);
}

.bti-variant-select__list[hidden] {
	display: none !important;
}

.bti-variant-select__option {
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.4;
	color: #3b3b39;
	cursor: pointer;
	white-space: normal;
	word-break: break-word;
}

.bti-variant-select__option:hover {
	background: #f0f7f9;
	color: #00728a;
}

.bti-variant-select__option.is-selected {
	background: #e8f4f6;
	color: #00728a;
	font-weight: 500;
}

.fancybox-slide--html .fancybox-content:has(.bti-popup--service) {
	max-width: min(calc(100vw - 32px), 680px);
	overflow: visible;
}

.fancybox-slide--html .fancybox-content:has(.bti-popup--entity) {
	max-width: min(calc(100vw - 32px), 720px);
	overflow: auto;
	max-height: calc(100vh - 48px);
}

.bti-entity-docs {
	margin: 12px 0 16px;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
}

.bti-entity-docs__toggle {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	background: #f7f9fa;
	color: #00728a;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.bti-entity-docs__toggle:hover {
	background: #eef5f7;
}

.bti-entity-docs__body {
	padding: 12px 14px 14px;
	font-size: 14px;
	line-height: 1.45;
	color: #333;
}

.bti-entity-docs__body p {
	margin: 0 0 8px;
}

.bti-entity-docs__body p:last-child {
	margin-bottom: 0;
}

.bti-popup-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 16px;
}

.bti-popup-form__grid .form-group {
	margin-bottom: 0;
}

.bti-popup-form__grid > .bti-popup-form__full,
.bti-popup-form__grid .form-group.bti-popup-form__full {
	grid-column: 1 / -1;
}

.bti-popup-form .pay_block {
	margin: 4px 0 0;
	padding: 14px 16px;
	background: #f4f7f9;
	border-radius: 12px;
	border: 1px solid #e8ecef;
	font-size: 14px;
	line-height: 1.45;
	color: #353e4b;
}

.bti-popup-form .pay_block b {
	color: #1a2b3c;
}

.bti-popup-form .pay_block .pay {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 8px;
}

.bti-popup-form .pay_block .pay p {
	margin: 0;
	flex: 1;
}

.bti-popup-form .pay_block label.custom input[type='radio'] {
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: #00728a;
	cursor: pointer;
}

.bti-popup .bti-consent {
	margin-top: 8px;
}

.bti-popup .bti-checkbox {
	color: #4a5568;
}

.bti-popup .bti-checkbox__label a {
	color: #00728a;
}

.bti-popup-form .file-upload-module {
	margin-top: 4px;
	padding: 12px 14px;
	background: #fafbfc;
	border: 1px dashed #c5cdd6;
	border-radius: 12px;
}

.bti-popup-form .file-upload-label {
	font-size: 14px;
	font-weight: 600;
	color: #1a2b3c;
}

.bti-popup-form .file-upload-queue:empty {
	display: none;
}

.bti-popup-form .file-upload-controls {
	margin-bottom: 10px;
}

.bti-popup-form .file-upload-controls .filepond--root {
	margin: 0;
	max-width: 100%;
	/* После init в display:none FilePond ставит height:0 — перебиваем */
	height: auto !important;
	min-height: 4.75em;
}

.bti-popup-form .file-upload-controls .filepond--root,
.bti-popup-form .file-upload-controls .filepond--drop-label,
.bti-popup-form .file-upload-controls .filepond--panel-root {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.bti-popup-form .file-upload-controls .filepond--drop-label {
	background: linear-gradient(180deg, #0089a3 0%, #00728a 100%);
	border-radius: 10px;
	color: #fff;
	min-height: 44px;
	height: auto !important;
	padding: 10px 16px;
	border: 1px solid #006274;
	box-shadow: 0 2px 6px rgba(0, 114, 138, 0.25);
	opacity: 1 !important;
	transform: none !important;
	pointer-events: auto !important;
}

.bti-popup-form .file-upload-controls .filepond--drop-label label {
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	text-align: center;
}

.bti-popup-form .file-upload-controls .filepond--panel-root {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.bti-popup-form .file-upload-controls .filepond--item-panel {
	background: #e6f4f7;
}

.bti-popup-form .file-upload-controls .filepond--credits {
	display: none !important;
}

/* Список уже загруженных файлов (showModule → .file-list) */
.bti-popup-form .file-list {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	clear: both;
}

.bti-popup-form .file-item {
	display: block;
	position: relative;
	margin: 0;
	padding: 0;
	vertical-align: top;
}

.bti-popup-form .file-item-wrapper {
	position: relative;
	background: #fff;
	border: 1px solid #e8ecef;
	border-radius: 10px;
	padding: 8px;
	box-shadow: 0 2px 6px rgba(15, 35, 52, 0.06);
	width: 120px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bti-popup-form .file-item-wrapper:hover {
	border-color: #00728a;
	box-shadow: 0 4px 10px rgba(0, 114, 138, 0.12);
}

.bti-popup-form .file-item-preview {
	position: relative;
	width: 104px;
	height: 104px;
	overflow: hidden;
	border-radius: 6px;
	background: #f4f7f9;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.bti-popup-form .file-item-preview img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: cover;
	display: block;
	border-radius: 6px;
}

.bti-popup-form .file-item-preview .miniImg,
.bti-popup-form .file-item-preview a.miniImg {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
}

.bti-popup-form .file-item-preview .miniImg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bti-popup-form .file-generic-thumb {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f7f9;
	border: 1px solid #e8ecef;
	border-radius: 6px;
}

.bti-popup-form .file-generic-thumb img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	opacity: 0.85;
}

.bti-popup-form .file-generic-thumb .file-type-icon {
	font-size: 36px;
	line-height: 1;
	color: #5a6a7a;
	opacity: 0.92;
}

.bti-popup-form .file-generic-thumb--pdf .file-type-icon { color: #c0392b; }
.bti-popup-form .file-generic-thumb--doc .file-type-icon,
.bti-popup-form .file-generic-thumb--docx .file-type-icon,
.bti-popup-form .file-generic-thumb--rtf .file-type-icon,
.bti-popup-form .file-generic-thumb--odt .file-type-icon { color: #2b579a; }
.bti-popup-form .file-generic-thumb--xls .file-type-icon,
.bti-popup-form .file-generic-thumb--xlsx .file-type-icon,
.bti-popup-form .file-generic-thumb--csv .file-type-icon,
.bti-popup-form .file-generic-thumb--ods .file-type-icon { color: #217346; }
.bti-popup-form .file-generic-thumb--ppt .file-type-icon,
.bti-popup-form .file-generic-thumb--pptx .file-type-icon,
.bti-popup-form .file-generic-thumb--odp .file-type-icon { color: #d24726; }
.bti-popup-form .file-generic-thumb--zip .file-type-icon,
.bti-popup-form .file-generic-thumb--rar .file-type-icon,
.bti-popup-form .file-generic-thumb--7z .file-type-icon { color: #8a6d3b; }

.bti-popup-form .file-ext-badge {
	position: absolute;
	right: 6px;
	bottom: 6px;
	background: rgba(26, 43, 60, 0.88);
	color: #fff;
	font-size: 10px;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 8px;
	text-transform: uppercase;
	max-width: 90%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bti-popup-form .js-copy-file-path {
	display: none;
}

.bti-popup-form .file-item-delete {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(198, 40, 40, 0.92);
	color: #fff;
	border-radius: 50%;
	text-decoration: none;
	opacity: 1;
	z-index: 10;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
	transition: background 0.2s ease, transform 0.2s ease;
}

.bti-popup-form .file-item-delete:hover {
	background: #b71c1c;
	transform: scale(1.06);
	color: #fff;
}

.bti-popup-form .file-item-delete i,
.bti-popup-form .file-item-delete .fa {
	font-size: 12px;
	margin: 0;
}

.bti-popup-form .file-item .fileTitle {
	margin-top: 8px;
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #e8ecef;
	border-radius: 6px;
	font-size: 12px;
	box-sizing: border-box;
}

.bti-popup-form .file-item .fileTitle:focus {
	outline: none;
	border-color: #00728a;
	box-shadow: 0 0 0 2px rgba(0, 114, 138, 0.15);
}

.bti-popup .btn-green {
	margin-top: 8px;
	width: 100%;
	max-width: 100%;
	min-height: 52px;
	border-radius: 10px;
	font-size: 14px;
	letter-spacing: 0.02em;
}

.bti-popup .btn-green:disabled,
.bti-popup .btn-green.is-disabled,
.bti-popup-form.is-submitting .btn-green {
	opacity: 0.65;
	cursor: not-allowed;
	pointer-events: none;
}

@media (max-width: 540px) {
	.bti-popup__header,
	.bti-popup__body {
		padding-left: 20px;
		padding-right: 20px;
	}

	.bti-popup-form__grid {
		grid-template-columns: 1fr;
	}

	.fancybox-slide--html .fancybox-content {
		max-width: calc(100vw - 24px);
	}
}
