/* Choice screen and pre-measure quote. Uses the existing measure dialog. */

.dk-measure-modal__dialog {
	overflow-x: hidden;
}

#dk-measure-modal .dk-measure-modal__dialog {
	width: min(760px, 100%);
	max-height: calc(100dvh - 32px);
	padding: 36px 40px 32px;
}

#dk-measure-modal .dk-measure-modal__close {
	position: sticky;
	top: 0;
	float: right;
	margin: -4px -8px 0 12px;
	background: #ffffff;
}

#dk-measure-modal .dk-measure-modal__title {
	margin: 0 0 14px;
	padding: 6px 28px 0 0;
	font-size: 28px;
	line-height: 1.2;
	text-align: center;
}

#dk-measure-modal .dk-measure-modal__lead {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
}

.dk-quote-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 6px;
	padding: 4px 2px;
	border: 0;
	background: transparent;
	color: var(--dk-green, #0e6b50);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.dk-quote-back::before {
	content: "←";
}

.dk-quote-back[hidden],
.dk-quote-step[hidden],
.dk-quote-form[hidden],
.dk-quote-telegram[hidden],
.dk-quote-channel-hint[hidden],
.dk-quote-empty[hidden],
.dk-quote-files[hidden] {
	display: none !important;
}

.dk-quote-back:focus-visible,
.dk-quote-btn:focus-visible,
.dk-quote-file__remove:focus-visible,
.dk-quote-add:focus-visible {
	outline: 2px solid var(--dk-green, #0e6b50);
	outline-offset: 2px;
}

.dk-quote-ask {
	margin: 4px 0 14px;
	color: #17201d;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.dk-quote-card {
	margin: 0 0 18px;
	padding: 20px;
	border: 1px solid #e3ece8;
	border-radius: 16px;
	background: #fff;
	box-sizing: border-box;
	text-align: left;
}

.dk-quote-card--mint {
	border-color: transparent;
	background: var(--dk-green-soft, #eef7f3);
}

.dk-quote-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
}

.dk-quote-card__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #fff;
	color: var(--dk-green, #0e6b50);
}

.dk-quote-card__icon svg {
	width: 18px;
	height: 18px;
}

.dk-quote-card--mint .dk-quote-card__icon {
	background: rgba(255, 255, 255, 0.72);
}

.dk-quote-card__title {
	margin: 0;
	min-width: 0;
	color: #17201d;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
}

.dk-quote-card__text {
	margin: 0 0 20px;
	color: #3d534b;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.dk-quote-card .dk-measure-modal__submit,
#dk-measure-choice .dk-quote-btn {
	width: 100%;
	min-height: 52px;
	margin-top: 0;
}

.dk-quote-calc {
	display: block;
	margin: 16px 0 0;
	color: var(--dk-green, #0e6b50);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: underline;
}

.dk-quote-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	padding: 0 16px;
	border-radius: 10px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	box-sizing: border-box;
}

.dk-quote-btn--ghost {
	border: 1.5px solid var(--dk-green, #0e6b50);
	background: #fff;
	color: var(--dk-green, #0e6b50);
}

.dk-quote-btn--ghost:hover,
.dk-quote-btn--ghost:focus-visible {
	background: var(--dk-green-soft, #eef7f3);
}

.dk-quote-label,
.dk-quote-channels-wrap legend {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	color: #17201d;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.dk-quote-block,
.dk-quote-channels-wrap {
	min-width: 0;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.dk-quote-hint,
.dk-quote-limits,
.dk-quote-after {
	margin: 12px 0 0;
	color: #5b6661;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
}

#dk-quote-form .dk-quote-hint {
	color: #0f3b2e;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
}

#dk-quote-form .dk-quote-block {
	margin-bottom: 40px;
}

#dk-quote-form .dk-measure-modal__field:has(#dk-quote-note) {
	margin-bottom: 56px;
}

.dk-quote-limits {
	margin-top: 10px;
}

.dk-quote-after {
	text-align: center;
}

.dk-quote-note {
	height: auto;
	min-height: 96px;
	padding: 12px 14px;
	resize: vertical;
}

.dk-quote-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.dk-quote-files {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
	gap: 10px;
}

.dk-quote-file,
.dk-quote-add {
	min-width: 0;
}

.dk-quote-file__thumb,
.dk-quote-add {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	width: 100%;
	border-radius: 12px;
	box-sizing: border-box;
}

.dk-quote-file__thumb {
	overflow: hidden;
	background: #f3f7f5;
	color: var(--dk-green, #0e6b50);
}

.dk-quote-file.is-invalid .dk-quote-file__thumb {
	box-shadow: inset 0 0 0 2px #b42318;
}

.dk-quote-file__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dk-quote-file__remove {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(23, 32, 29, 0.72);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.dk-quote-file__name,
.dk-quote-file__error {
	margin: 6px 0 0;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dk-quote-file__name {
	color: #3d534b;
}

.dk-quote-file__error {
	color: #b42318;
	white-space: normal;
}

.dk-quote-add {
	flex-direction: column;
	gap: 6px;
	border: 1.5px dashed #b7d4c8;
	background: var(--dk-green-soft, #eef7f3);
	color: var(--dk-green, #0e6b50);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.dk-quote-channels {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.dk-quote-channel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	min-height: 52px;
	margin: 0;
	padding: 8px 10px;
	border: 1.5px solid #d7e2dd;
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
	cursor: pointer;
}

.dk-quote-channel input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.dk-quote-channel:has(input:checked),
.dk-quote-channel.is-selected {
	border-color: var(--dk-green, #0e6b50);
	background: var(--dk-green-soft, #eef7f3);
}

.dk-quote-channel:has(input:focus-visible) {
	outline: 2px solid var(--dk-green, #0e6b50);
	outline-offset: 2px;
}

.dk-quote-channel__icon,
.dk-quote-channel__check {
	flex: 0 0 auto;
	display: inline-flex;
}

.dk-quote-channel__name {
	min-width: 0;
	color: #17201d;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
}

.dk-quote-channel__check {
	margin-left: auto;
	color: var(--dk-green, #0e6b50);
	opacity: 0;
}

.dk-quote-channel:has(input:checked) .dk-quote-channel__check,
.dk-quote-channel.is-selected .dk-quote-channel__check {
	opacity: 1;
}

#dk-quote-success .dk-measure-modal__submit {
	margin-top: 18px;
}

#dk-measure-choice .dk-measure-modal__info {
	margin: 0;
}

#dk-measure-choice .dk-measure-modal__info-note {
	font-size: 16px;
	line-height: 1.5;
}

@media screen and (max-width: 700px) {
	#dk-measure-modal {
		padding: 12px;
	}

	#dk-measure-modal .dk-measure-modal__dialog {
		width: 100%;
		max-height: calc(100dvh - 24px);
		margin: 0;
		padding: 20px;
	}

	#dk-measure-modal .dk-measure-modal__close {
		position: sticky;
		top: 0;
		float: right;
		margin: 0 0 8px;
	}

	#dk-measure-modal .dk-measure-modal__title {
		clear: both;
		margin: 0 0 12px;
		padding: 0;
		font-size: 27px;
		line-height: 1.2;
	}

	#dk-measure-modal .dk-measure-modal__lead {
		margin-bottom: 24px;
		font-size: 16px;
		line-height: 1.5;
	}

	.dk-quote-card {
		padding: 20px;
		margin-bottom: 16px;
	}

	.dk-quote-card__title {
		font-size: 19px;
		line-height: 1.3;
	}

	.dk-quote-card .dk-measure-modal__submit,
	#dk-measure-choice .dk-quote-btn {
		min-height: 48px;
	}

	.dk-quote-channels {
		grid-template-columns: 1fr;
	}

	.dk-quote-btn,
	.dk-quote-card .dk-measure-modal__submit {
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dk-quote-btn,
	.dk-quote-channel,
	.dk-quote-add {
		transition: none;
	}
}
