/* ==========================================================================
   yesminsk-friendbar — плавающий стики-бар «Тёплый зин»
   Всё скоуплено под .ymbar. Явные hex: бар рендерится в футере вне .ym-home,
   CSS-переменные темы недоступны.
   ========================================================================== */

.ymbar{
	position:fixed;
	left:0;
	right:0;
	bottom:0;
	z-index:9998;
	display:flex;
	justify-content:center;
	padding:0 12px calc(12px + env(safe-area-inset-bottom,0px));
	pointer-events:none; /* клики проходят мимо пустых полей по бокам */
	font-family:'Manrope',system-ui,-apple-system,sans-serif;
	animation:ymbar-in .5s cubic-bezier(.2,.8,.2,1) both;
}
.ymbar.is-hidden{ display:none; }

/* Фолбэк: на лендинге квартиры у страницы свой нижний бар брони
   («Выбрать даты»). Прячем френдбар, чтобы два фиксированных бара
   не налезали друг на друга на мобильном. Основную защиту даёт PHP
   (ymbar_should_show), это подстраховка на случай кэша/гонки шаблона. */
body.ymflat-page .ymbar{ display:none !important; }

@keyframes ymbar-in{
	from{ transform:translateY(120%); opacity:0; }
	to{ transform:translateY(0); opacity:1; }
}

.ymbar-inner{
	pointer-events:auto;
	display:flex;
	align-items:center;
	gap:11px;
	width:100%;
	max-width:560px;
	background:#3a2c33;              /* plum */
	border:1.5px solid #d9663f;      /* terra */
	border-radius:18px;
	padding:10px 10px 10px 12px;
	box-shadow:0 12px 30px rgba(58,44,51,.42);
	box-sizing:border-box;
}

.ymbar-emoji{
	flex:none;
	width:42px;
	height:42px;
	border-radius:12px;
	background:#d9663f;
	display:flex;
	align-items:center;
	justify-content:center;
	font-size:22px;
	line-height:1;
	transform:rotate(-7deg);
	box-shadow:0 4px 10px rgba(217,102,63,.4);
}

.ymbar-txt{
	flex:1;
	min-width:0;
	line-height:1.15;
}
.ymbar-title{
	display:block;
	font-family:'Unbounded',sans-serif;
	font-weight:700;
	font-size:13px;
	line-height:1.2;
	color:#fbf3e8;              /* cream */
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
}
.ymbar-sub{
	display:block;
	font-weight:600;
	font-size:12.5px;
	color:#e6b199;              /* тёплый терракотовый светлый */
	margin-top:3px;
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:nowrap;
}

/* Десктоп: бар обхватывает контент, а не растягивается пустотой */
@media (min-width:600px){
	.ymbar-inner{ width:auto; max-width:none; }
	.ymbar-txt{ flex:0 1 auto; }
}

.ymbar-btn{
	flex:none;
	display:inline-flex;
	align-items:center;
	gap:6px;
	background:#d9663f;
	color:#fff;
	font-weight:800;
	font-size:13px;
	line-height:1;
	border-radius:12px;
	padding:0 15px;
	min-height:44px;            /* крупная зона нажатия */
	text-decoration:none;
	white-space:nowrap;
	box-shadow:0 4px 12px rgba(217,102,63,.45);
	transition:transform .12s ease, background .2s ease;
}
.ymbar-btn:hover{ background:#c9531f; }
.ymbar-btn:active{ transform:scale(.96); }
.ymbar-ico{ flex:none; }

.ymbar-close{
	flex:none;
	width:34px;
	height:34px;
	border:none;
	border-radius:50%;
	background:rgba(255,255,255,.14);
	color:#e6b199;
	cursor:pointer;
	display:flex;
	align-items:center;
	justify-content:center;
	padding:0;
	transition:background .2s ease, transform .12s ease;
}
.ymbar-close:hover{ background:rgba(255,255,255,.24); color:#fbf3e8; }
.ymbar-close:active{ transform:scale(.92); }

/* ---------- Мобильный ---------- */
@media (max-width:480px){
	.ymbar{ padding:0 10px calc(10px + env(safe-area-inset-bottom,0px)); }
	.ymbar-inner{ gap:9px; padding:9px 9px 9px 10px; border-radius:16px; }
	.ymbar-emoji{ width:38px; height:38px; font-size:20px; border-radius:11px; }
	.ymbar-title{ font-size:11.5px; }
	.ymbar-sub{ font-size:11.5px; }
	.ymbar-btn{ font-size:12px; padding:0 12px; min-height:44px; }
	.ymbar-btn span{ display:inline; }
	.ymbar-close{ width:32px; height:32px; }
}

/* Очень узкие экраны: прячем подстроку, чтобы всё влезло в одну строку */
@media (max-width:360px){
	.ymbar-sub{ display:none; }
	.ymbar-emoji{ width:36px; height:36px; }
}

@media (prefers-reduced-motion:reduce){
	.ymbar{ animation:none; }
	.ymbar-btn,.ymbar-close{ transition:none; }
}

/* ==========================================================================
   Превью в редакторе Гутенберга
   ========================================================================== */
.ymbar-edit-card{
	border:1px dashed #d9663f;
	border-radius:14px;
	padding:16px;
	background:#fbf6ee;
}
.ymbar-edit-head{
	display:flex;
	align-items:center;
	gap:10px;
	margin-bottom:12px;
	flex-wrap:wrap;
}
.ymbar-edit-badge{
	font-family:'Unbounded',sans-serif;
	font-weight:700;
	font-size:11px;
	letter-spacing:.05em;
	text-transform:uppercase;
	color:#fff;
	background:#d9663f;
	padding:4px 10px;
	border-radius:999px;
}
.ymbar-edit-hint{
	font-size:12px;
	color:#8a7a66;
}
.ymbar-edit-bar{
	display:flex;
	align-items:center;
	gap:11px;
	background:#3a2c33;
	border:1.5px solid #d9663f;
	border-radius:18px;
	padding:10px 10px 10px 12px;
	box-shadow:0 8px 22px rgba(58,44,51,.3);
	max-width:520px;
}
.ymbar-edit-bar.is-off{ opacity:.5; filter:grayscale(.4); }
.ymbar-edit-emoji{
	flex:none;width:42px;height:42px;border-radius:12px;background:#d9663f;
	display:flex;align-items:center;justify-content:center;font-size:22px;
	transform:rotate(-7deg);
}
.ymbar-edit-txt{ flex:1;min-width:0;line-height:1.15; }
.ymbar-edit-title{
	display:block;font-family:'Unbounded',sans-serif;font-weight:700;
	font-size:14px;color:#fbf3e8;
}
.ymbar-edit-sub{
	display:block;font-weight:600;font-size:12.5px;color:#e6b199;margin-top:3px;
}
.ymbar-edit-btn{
	flex:none;background:#d9663f;color:#fff;font-weight:800;font-size:13px;
	border-radius:12px;padding:11px 15px;white-space:nowrap;
}
.ymbar-edit-x{
	flex:none;width:34px;height:34px;border-radius:50%;
	background:rgba(255,255,255,.14);color:#e6b199;
	display:flex;align-items:center;justify-content:center;font-size:14px;
}
