/* ===== Mobile bar (+ «Другие отели» sheet, messenger buttons) — visible only < 768px ===== */
.hm-mbar {
    --_h: var(--hm-mbar-h, 64px);
    --_safe: env(safe-area-inset-bottom, 0px);
    --_bar-bg: rgba(30, 30, 29, .9);
    --_bar-fg: #fff;
    font-family: var(--hm-font-body);
}
.hm-mbar [hidden] { display: none !important; }
@media (min-width: 768px) {
    .hm-mbar { display: none; }
}

/* Reserves the bar height at the end of the page so the bar never covers the footer */
.hm-mbar__spacer { height: calc(var(--_h) + var(--_safe)); }
.hm-mbar--top .hm-mbar__spacer { display: none; }

/* ---------- Bar ---------- */
.hm-mbar__bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    min-height: calc(var(--_h) + var(--_safe));
    padding: 0 4px var(--_safe);
    background: var(--_bar-bg);
    color: var(--_bar-fg);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.hm-mbar--top .hm-mbar__bar {
    inset: 0 0 auto;
    min-height: calc(var(--_h) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 4px 0;
}
.hm-mbar.is-chat-open .hm-mbar__bar { z-index: 205; }
.hm-mbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    height: var(--_h);
    padding: 6px 2px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .2s, color .2s;
}
.hm-mbar__item svg { width: 26px; height: 26px; flex: none; }
.hm-mbar__label {
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hm-mbar__item:active { opacity: .6; }
.hm-mbar__item[aria-expanded="true"] { color: var(--hm-c-accent); }

/* ---------- «Написать»: messenger buttons ---------- */
/* While open, dim + buttons + bar rise above corner popups (toast z-index 200) */
.hm-mbar__dim {
    position: fixed;
    inset: 0;
    z-index: 204;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    transition: opacity .3s var(--hm-ease);
}
.hm-mbar__dim.is-open { opacity: 1; }
.hm-mbar__chat {
    position: fixed;
    right: 16px;
    bottom: calc(var(--_h) + var(--_safe) + 18px);
    z-index: 206;
    display: grid;
    justify-items: end;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.hm-mbar--top .hm-mbar__chat { top: calc(var(--_h) + env(safe-area-inset-top, 0px) + 18px); bottom: auto; }
.hm-mbar__chat li {
    opacity: 0;
    transform: translateY(16px) scale(.8);
    transition: opacity .25s var(--hm-ease), transform .3s var(--hm-ease);
}
.hm-mbar__chat.is-open li { opacity: 1; transform: none; }
.hm-mbar__chat.is-open li:nth-last-child(2) { transition-delay: .04s; }
.hm-mbar__chat.is-open li:nth-last-child(3) { transition-delay: .08s; }
.hm-mbar__chat.is-open li:nth-last-child(4) { transition-delay: .12s; }
.hm-mbar__chat-btn {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--hm-c-accent);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
.hm-mbar__chat-btn svg { width: 30px; height: 30px; }
/* Messenger brand colours (third-party marks, not site theme colours) */
.hm-mbar__chat-btn--vk { background: #0077ff; }
.hm-mbar__chat-btn--max { background: linear-gradient(135deg, #3dc4ff 0%, #5a5cff 55%, #a54cf0 100%); }
.hm-mbar__chat-btn--telegram { background: #29a9eb; }
.hm-mbar__chat-btn--whatsapp { background: #25d366; }
.hm-mbar__chat-label { display: none; }

/* ---------- «Другие отели»: bottom sheet ---------- */
.hm-mbar__sheet { position: fixed; inset: 0; z-index: 210; }
.hm-mbar__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .3s var(--hm-ease);
}
.hm-mbar__sheet.is-open .hm-mbar__backdrop { opacity: 1; }
.hm-mbar__panel {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100svh - 28px);
    border-radius: var(--hm-radius-card) var(--hm-radius-card) 0 0;
    background: var(--hm-c-alt);
    color: var(--hm-c-text);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
    transform: translateY(100%);
    transition: transform .38s var(--hm-ease);
    outline: none;
}
.hm-mbar__sheet.is-open .hm-mbar__panel { transform: none; }
.hm-mbar__panel.is-dragging { transition: none; }
.hm-mbar__grab {
    flex: none;
    display: grid;
    place-items: center;
    height: 34px;
    touch-action: none;
    cursor: grab;
}
.hm-mbar__handle {
    width: 36px;
    height: 7px;
    border-block: 2px solid rgba(0, 0, 0, .22);
    border-radius: 2px;
}
.hm-mbar__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1.5px solid rgba(0, 0, 0, .3);
    border-radius: 50%;
    background: none;
    color: var(--hm-c-muted);
    cursor: pointer;
}
.hm-mbar__close svg { width: 20px; height: 20px; }
.hm-mbar__scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 20px calc(24px + var(--_safe));
    -webkit-overflow-scrolling: touch;
}
.hm-mbar__sheet-title {
    margin: 0 0 22px 8px;
    color: var(--hm-c-muted);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
}
.hm-mbar__sheet-title em { font-style: normal; }
.hm-mbar__hotels { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.hm-mbar__hotel {
    overflow: hidden;
    border-radius: calc(var(--hm-radius-card) * .7);
    background: var(--hm-c-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}
.hm-mbar__hotel-media { aspect-ratio: 16 / 9; overflow: hidden; }
.hm-mbar__hotel-img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.hm-mbar__hotel-body { display: grid; justify-items: start; gap: 6px; padding: 18px 18px 20px; }
.hm-mbar__hotel-name { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.hm-mbar__stars { font-size: 17px; letter-spacing: .08em; line-height: 1; }
.hm-mbar__city { margin: 2px 0 0; font-size: 14px; font-weight: 700; }
.hm-mbar__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.hm-mbar__tags li {
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .07);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
}
.hm-mbar__visit { margin-top: 12px; }
