/* ==========================================================================
   Калькулятор стоимости доставки — templates/pages/dostavka.php
   Полностью самостоятельный компонент (свои классы dpz-*), не зависит от
   старых сайтовых .dost_types/.one_dost/.myCheckbox.
   ========================================================================== */
.dpz-page{
	--dpz-green:#1ca91d;
	--dpz-green-dark:#008d01;
	--dpz-green-light:#ecffec;
	--dpz-green-border:#3ebf3f;
	--dpz-radius:7px;
	--dpz-radius-sm:5px;
	--dpz-border:#e1e1e1;
	--dpz-muted:#777;
	--dpz-warning-bg:#fcf8e3;
	--dpz-warning-text:#8a6d3b;
	--dpz-error-bg:#fdecea;
	--dpz-error-text:#c0392b;
	/* max-width:900px; */
	margin:0 auto 40px;
}

.dpz-heading{
	font-size:22px;
	font-weight:700;
	color:#1a1a1a;
	margin:0 0 6px;
}
.dpz-subtitle{
	font-size:14px;
	color:var(--dpz-muted);
	line-height:1.5;
	margin:0 0 22px;
}

.dpz-card-block{
	background:#fff;
	border-radius:var(--dpz-radius);
	box-shadow:0 5px 14px rgb(0 0 0 / 12%);
	padding:22px;
	margin-bottom:20px;
	box-sizing:border-box;
}

.dpz-section-label{
	font-size:15px;
	font-weight:700;
	color:#1a1a1a;
	margin-bottom:12px;
}

/* ---------- Карточки типов машин ---------- */
.dpz-vehicle-grid{
	display:grid;
	grid-template-columns: repeat(5, 1fr);
	gap:10px;
}
.dpz-vehicle-card{
	position:relative;
	display:flex;
	flex-direction:column;
	gap:6px;
	padding:12px;
	background:#fff;
	border:2px solid #e6e8eb;
	border-radius:var(--dpz-radius-sm);
	cursor:pointer;
	transition:.15s border-color, .15s background, .15s box-shadow;
}
.dpz-vehicle-card:hover{
	border-color:#c7ccd2;
}
.dpz-vehicle-radio{
	position:absolute;
	width:1px;
	height:1px;
	margin:-1px;
	padding:0;
	overflow:hidden;
	clip:rect(0,0,0,0);
	white-space:nowrap;
	border:0;
}
.dpz-vehicle-card--selected{
	border-color:var(--dpz-green-border);
	background:var(--dpz-green-light);
	box-shadow:0 4px 10px rgb(28 169 29 / 15%);
}
.dpz-vehicle-card__head{
	display:flex;
	align-items:center;
	gap:8px;
}
.dpz-vehicle-card__icon{
	width:28px;
	height:auto;
	flex:0 0 auto;
}
.dpz-vehicle-card__name{
	font-size:13.5px;
	font-weight:700;
	color:#1a1a1a;
	line-height:1.25;
}
.dpz-vehicle-card__tariff{
	font-size:11.5px;
	color:var(--dpz-muted);
	line-height:1.35;
}
.dpz-vehicle-card__meta{
	display:flex;
	flex-wrap:wrap;
	gap:4px 6px;
}
.dpz-vehicle-card__badge{
	font-size:10.5px;
	color:#556;
	background:#f0f2f5;
	border-radius:20px;
	padding:2px 8px;
	white-space:nowrap;
}
.dpz-vehicle-card--selected .dpz-vehicle-card__badge{
	background:#fff;
}

/* ---------- Адрес ---------- */
.dpz-address-section{
	margin-bottom:14px;
}
.dpz-address-section label{
	display:block;
	font-size:14px;
	font-weight:700;
	color:#1a1a1a;
	margin-bottom:8px;
}
.dpz-address-input-wrap{
	position:relative;
}
.dpz-address-input{
	width:100%;
	box-sizing:border-box;
	height:48px;
	padding:0 40px 0 14px;
	font-size:15px;
	border:2px solid #e3e5e8;
	border-radius:var(--dpz-radius-sm);
	transition:.2s border-color;
}
.dpz-address-input:focus{
	border-color:var(--dpz-green-border);
	outline:none;
}
.dpz-address-clear{
	position:absolute;
	top:50%;
	right:8px;
	transform:translateY(-50%);
	width:28px;
	height:28px;
	border:none;
	border-radius:50%;
	background:#eceff2;
	color:#666;
	font-size:18px;
	line-height:1;
	cursor:pointer;
	display:flex;
	align-items:center;
	justify-content:center;
	transition:.2s background;
}
.dpz-address-clear:hover{
	background:#dde1e6;
}
.dpz-suggest{
	position:relative;
	z-index:5;
}

/* ---------- Карта ---------- */
.dpz-map{
	width:100%;
	height:480px;
	border-radius:var(--dpz-radius-sm);
	overflow:hidden;
	box-shadow:0 0 0 1px rgb(0 0 0 / 8%);
	margin-bottom:12px;
}

.dpz-map-hint{
	display:flex;
	align-items:center;
	gap:10px;
	margin-bottom:14px;
	padding:12px 14px;
	background:#f2f5f9;
	border-radius:var(--dpz-radius-sm);
	color:#3d5165;
	font-size:13px;
	line-height:1.4;
}
.dpz-map-hint svg{
	width:20px;
	height:20px;
	flex:0 0 auto;
	fill:currentColor;
}

/* ---------- Состояния ---------- */
.dpz-loading{
	display:flex;
	align-items:center;
	gap:10px;
	margin-bottom:14px;
	padding:12px 14px;
	background:#f2f5f9;
	border-radius:var(--dpz-radius-sm);
	font-size:14px;
	color:#333;
}
.dpz-spinner{
	width:18px;
	height:18px;
	border-radius:50%;
	border:2.5px solid #c9d3e0;
	border-top-color:var(--dpz-green);
	animation:dpz-spin .7s linear infinite;
	flex:0 0 auto;
}
@keyframes dpz-spin{
	to{transform:rotate(360deg);}
}
.dpz-error{
	margin-bottom:14px;
	padding:13px 15px;
	background:var(--dpz-error-bg);
	color:var(--dpz-error-text);
	border-radius:var(--dpz-radius-sm);
	font-size:14px;
	line-height:1.4;
}
.dpz-notice{
	margin-bottom:14px;
	padding:13px 15px;
	background:var(--dpz-warning-bg);
	color:var(--dpz-warning-text);
	border-radius:var(--dpz-radius-sm);
	font-size:13px;
	line-height:1.4;
}
.dpz-result{
	padding:16px;
	background:#f7fbf7;
	border:1px solid var(--dpz-green-border);
	border-radius:var(--dpz-radius);
}
.dpz-result__title{
	font-size:14px;
	font-weight:700;
	margin-bottom:8px;
	color:#1a1a1a;
}
.dpz-result__row{
	display:flex;
	justify-content:space-between;
	gap:10px;
	font-size:14px;
	padding:5px 0;
	border-bottom:1px dashed #d7e6d7;
}
.dpz-result__row:last-child{
	border-bottom:none;
}
.dpz-result__row b{
	color:#1a1a1a;
	text-align:right;
}

/* ---------- Адаптив ---------- */
@media (max-width:991px){
	.dpz-map{
		height:400px;
	}
}

@media (max-width:767px){
	.dpz-page{
		margin-bottom:28px;
	}
	.dpz-heading{
		font-size:19px;
	}
	.dpz-card-block{
		padding:16px;
		border-radius:0;
		box-shadow:none;
		border-top:1px solid var(--dpz-border);
		margin-bottom:0;
	}
	.dpz-card-block + .dpz-card-block{
		border-top:none;
	}
	.dpz-vehicle-grid{
		grid-template-columns:repeat(2, 1fr);
	}
	.dpz-map{
		height:320px;
	}
	.dpz-result__row{
		flex-direction:column;
		gap:2px;
	}
	.dpz-result__row b{
		text-align:left;
	}
}

@media (max-width:420px){
	.dpz-vehicle-grid{
		grid-template-columns:1fr;
	}
}

/* Яндекс.Карты: не даём копирайту карты вылезать за пределы блока на мобильных */
@media (max-width:767px){
	.dpz-map [class*="copyrights-promo"]{
		display:none !important;
	}
}
