/* Комната онлайн-встречи (pages/meet.php, js/meet.js), без верхней полосы (решение владельца 18.10). Цвета отеля приходят переменными --m1 (основной),
   --m2 (дополнительный), --mbg (фон), --mtx (текст) из карточки лида; без них - фирменные QRush. */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.mt { background: var(--mbg); color: var(--mtx); font: 15px/1.4 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
button, input, textarea { font: inherit; }


.mt-main { display: grid; grid-template-columns: minmax(0, 1fr) var(--pw, 300px); gap: 16px; padding: 16px 24px; min-height: 0; }
body.has-chat .mt-main { grid-template-columns: minmax(0, 1fr) var(--pw, 260px) 320px; }
.mt-mon { min-width: 0; min-height: 0; border-radius: 22px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.08); overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
/* лобби за сценами (lobbyFit в js/meet.js): картинка по размеру cover, экран монитора на стойке */
.mt-lobby { position: absolute; inset: 0; overflow: hidden; }
.mt-lobby__in { position: absolute; background: var(--mjbg) 0 0 / 100% 100% no-repeat; }
.mt-lobby__patch { position: absolute; background: #e9e9e9;   /* прямоугольник с мягкими краями: лотос и черта под ним уходят целиком */
    -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(transparent, #000 10%, #000 90%, transparent); -webkit-mask-composite: source-in;
    mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(transparent, #000 10%, #000 90%, transparent); mask-composite: intersect; }
.mt-lobby__sign { position: absolute; display: flex; align-items: center; justify-content: center; }
.mt-lobby__sign img { max-width: 58%; max-height: 44%; object-fit: contain; mix-blend-mode: multiply; opacity: .9; }   /* белый фон логотипа уходит в вывеску */
.mt-lobby__scr { position: absolute; box-sizing: border-box; border-radius: 3% / 6%; background: #121316; box-shadow: 0 0 0 .6px rgba(0,0,0,.4); }
.mt-lobby__qr { position: absolute; inset: 5% 3.5% 9%; border-radius: 1.5% / 3%; background: linear-gradient(135deg, #30343c, #1c1e23 55%, #2a2d34); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: background .4s ease; }
.mt-lobby__qr img, .mt-lobby__qr canvas { height: 88%; width: auto; opacity: 0; }
.mt-mon.is-qr .mt-lobby__qr { background: #0b0b0d; }
/* анимация, а не переход: картинку кода библиотека дорисовывает позже, переход на нее не срабатывал */
.mt-mon.is-qr .mt-lobby__qr img, .mt-mon.is-qr .mt-lobby__qr canvas { animation: mtQrOn .4s ease .3s both; }
@keyframes mtQrOn { from { opacity: 0; } to { opacity: 1; } }
.mt-mon__sc { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mt-mon__sc > * { pointer-events: auto; }
.mt-qrcap { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 12px 22px; border-radius: 999px; background: rgba(255,255,255,.94);
    box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: 17px; font-weight: 700; color: #111; white-space: nowrap; animation: mtIn .4s ease .3s both; }
.mt-scene { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; padding: 40px; text-align: center; animation: mtIn .35s ease; }
@keyframes mtIn { from { opacity: 0; transform: scale(.97); } }
.mt-scene__t { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; }
.mt-scene__t b { font-size: 26px; font-weight: 800; color: var(--mtx); }
.mt-scene__t span { font-size: 15px; color: #6b6f78; }

/* участники квадратами, сторона --t и число столбцов --cols считает layout() в js/meet.js */
.mt-people { min-height: 0; overflow: hidden; display: grid; grid-template-columns: repeat(var(--cols, 1), var(--t, 300px)); grid-auto-rows: var(--t, 300px); gap: 12px; align-content: start; }
.mt-tile.is-host { order: -1; }
.mt-tile { position: relative; width: var(--t, 300px); height: var(--t, 300px); border-radius: 18px; overflow: hidden; background: #2b2b30; color: #fff; display: flex; align-items: center; justify-content: center; }
.mt-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-tile.is-me video { transform: scaleX(-1); }
.mt-tile__ava { width: 72px; height: 72px; border-radius: 50%; background: var(--m1); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; }
.mt-tile.has-video .mt-tile__ava { display: none; }
.mt-tile__n { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.mt-tile__n span { padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-tile__n i { color: #ff8a80; }
.mt-tile__n i[hidden] { display: none; }   /* Font Awesome задает display сам и перебивает hidden */
.mt-tile.is-talk { box-shadow: inset 0 0 0 3px var(--m2); }

.mt-chat { min-height: 0; display: flex; flex-direction: column; border-radius: 18px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.06); overflow: hidden; }
.mt-chat[hidden] { display: none; }
.mt-chat__list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mt-msgi { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.mt-msgi b { font-size: 12px; color: #6b6f78; }
.mt-msgi span { white-space: pre-line; word-wrap: break-word; }
.mt-msgi.is-me b { color: var(--m1); }
.mt-chat__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; align-items: flex-end; }
.mt-chat__form textarea { flex: 1; resize: none; overflow: hidden; border: 1px solid #e3e1dc; border-radius: 12px; padding: 9px 12px; min-height: 40px; font-size: 16px; outline: none; }
.mt-chat__form textarea:focus { border-color: var(--m1); }
.mt-chat__form button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--m1); color: #fff; cursor: pointer; }

.mt-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px 18px; }
.mt-bar[hidden] { display: none; }
.mt-bar__scenes { display: flex; gap: 10px; padding-left: 14px; margin-left: 4px; border-left: 1px solid rgba(0,0,0,.1); }
.mt-bar__scenes[hidden] { display: none; }
.mt-btn { min-width: 92px; height: 56px; padding: 0 14px; border: 0; border-radius: 16px; background: #fff; color: var(--mtx); cursor: pointer;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.06); position: relative; }
.mt-btn i { font-size: 17px; }
.mt-btn:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.mt-btn.is-off { background: #fde8e6; color: #b42318; }
.mt-btn.is-on { background: var(--m1); color: #fff; }
.mt-btn.has-new::after { content: ''; position: absolute; top: 8px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; }
.mt-btn--end { background: #e5484d; color: #fff; }

.mt-join, .mt-mobile { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(20,18,15,.55); padding: 16px; }
.mt-join[hidden], .mt-mobile[hidden] { display: none; }
.mt-mobile { background: var(--mbg); text-align: center; gap: 10px; }
/* окно входа по макету 12.png: белое, 600px, логотип отеля, заголовок шрифтом отеля (--mfont), наш логотип строкой ниже */
.mt-join__box { position: relative; width: 100%; max-width: 600px; background: #fff; border-radius: 24px; padding: 48px 85px 49px;
    display: flex; flex-direction: column; align-items: center; box-shadow: 0 24px 70px rgba(0,0,0,.28); text-align: center;
    transition: opacity .38s ease, transform .45s cubic-bezier(.3,.7,.2,1); }
.mt-join__x { position: absolute; top: 17px; right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: #202227;
    display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: transform .2s; }
.mt-join__x:hover { transform: rotate(90deg); }
.mt-join__logo { height: 64px; max-width: 300px; object-fit: contain; margin-bottom: 31px; }
.mt-join__box h1 { margin: 0; font: 400 47px/1.08 var(--mfont); color: #111; letter-spacing: -.005em; }
.mt-join__qrush { display: block; height: 56px; width: auto; margin-top: 4px; }
.mt-join__me { margin: 16px 0 0; font-size: 17px; line-height: 1.35; color: #4a4d5b; }
.mt-join__me b { color: #1d1f25; font-weight: 700; }
.mt-join__fs { width: 100%; display: flex; gap: 12px; margin-top: 24px; text-align: left; }
.mt-join__fs[hidden], .mt-join__me[hidden] { display: none; }
.mt-join__f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #6b6f78; }
.mt-join__f input { width: 100%; height: 50px; border: 1px solid #e3e1dc; border-radius: 14px; padding: 0 14px; font-size: 16px; color: #111; outline: none; background: #fff; }
.mt-join__f input:focus { border-color: #121518; box-shadow: 0 0 0 3px rgba(18,21,24,.1); }
.mt-join__go { position: relative; overflow: hidden; width: 100%; height: 69px; margin-top: 24px; border: 0; border-radius: 999px; background: #121518; color: #fff;
    display: flex; align-items: center; padding: 0 29px 0 18px; cursor: pointer; box-shadow: 0 16px 30px rgba(0,0,0,.2);
    transition: transform .18s ease, box-shadow .25s ease; }
.mt-join__go:hover { transform: translateY(-1px); box-shadow: 0 20px 36px rgba(0,0,0,.24); }
.mt-join__go:active { transform: scale(.985); }
.mt-join__cam { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; background: #21232a; display: flex; align-items: center; justify-content: center; }
.mt-join__sep { flex: none; width: 1px; height: 24px; margin-left: 24px; background: rgba(255,255,255,.18); }
.mt-join__t { flex: 1; padding-right: 14px; font-size: 20px; font-weight: 600; letter-spacing: .005em; white-space: nowrap; transition: opacity .2s; }
.mt-join__ar { flex: none; display: flex; transition: transform .35s cubic-bezier(.5,0,.75,0), opacity .3s; }
.mt-join__go:hover .mt-join__ar { transform: translateX(4px); }
.mt-join__go:disabled { cursor: default; }
.mt-join__err { margin: 14px 0 0; color: #b42318; font-size: 14px; }

/* нажали «Войти»: стрелка тает, на ее месте тонкое кольцо, надпись мягко сменяется на «Подключаюсь» (JS) */
.mt-join__ar { position: relative; }
.mt-join__ar svg { transition: opacity .25s ease, transform .3s ease; }
.mt-join__spin { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.22); border-top-color: #fff; opacity: 0; transform: scale(.6); transition: opacity .25s ease .1s, transform .3s ease .1s; }
.mt-join__go.is-going .mt-join__ar, .mt-join__go.is-going:hover .mt-join__ar { transform: none; }
.mt-join__go.is-going .mt-join__ar svg { opacity: 0; transform: scale(.6); }
.mt-join__go.is-going .mt-join__spin { opacity: 1; transform: scale(1); animation: mtSpin .8s linear infinite; }
.mt-join__go.is-going, .mt-join__go.is-going:hover { transform: none; box-shadow: 0 16px 30px rgba(0,0,0,.2); }
.mt-join__t.is-fade { opacity: 0; }
@keyframes mtSpin { to { transform: scale(1) rotate(360deg); } }
/* до входа видно только окно: комната спрятана, подложка сплошная (body.is-join ставит pages/meet.php) */
body.is-join .mt-main, body.is-join .mt-bar { visibility: hidden; }
.mt-join { background: #f2f1ee; }   /* сплошная подложка, тает вместе с окном */
/* подключились: окно уходит вглубь и тает вместе с подложкой */
.mt-join { transition: opacity .45s ease, backdrop-filter .45s; }
.mt-join.is-out { opacity: 0; pointer-events: none; }
.mt-join.is-out .mt-join__box { transform: scale(.94) translateY(8px); }
.mt-join:not(.is-ready) .mt-join__box { visibility: hidden; }   /* до готовности (js/meet.js) окно не показываем */
.mt-join.is-ready .mt-join__box { animation: mtBoxIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes mtBoxIn { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.mt-mobile h1, .mt-msg h1 { font-size: 22px; margin: 0; text-align: center; }
.mt-msg { grid-row: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 16px; }
.mt-main .mt-msg { grid-column: 1 / -1; }
.mt-msg__logo { height: 44px; }
.mt-msg p, .mt-mobile p { margin: 0; color: #6b6f78; max-width: 420px; }

/* страница для записи: без кнопок, монитор и участники на весь кадр */
body.is-rec { grid-template-rows: minmax(0, 1fr); }
body.is-rec .mt-main { grid-template-columns: minmax(0, 1fr) var(--pw, 320px); }
body.is-mobile .mt-main { display: none; }

/* подтверждение «Завершить встречу для всех?» (askEnd в js/meet.js), в стиле окна входа */
.mt-ask { position: fixed; inset: 0; z-index: 40; background: rgba(20,18,15,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mt-ask__box { position: relative; width: 100%; max-width: 540px; background: #fff; border-radius: 24px; padding: 54px 55px 44px; text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.28); animation: mtBoxIn .4s cubic-bezier(.2,.8,.2,1); }
.mt-ask__box h2 { margin: 0 0 14px; font: 400 36px/1.12 var(--mfont); color: #111; text-wrap: balance; }
.mt-ask__box p { margin: 0; font-size: 17px; line-height: 1.4; color: #4a4d5b; }
.mt-ask__ic { color: #ff6b6b; font-size: 19px; }
.mt-ask__sp { flex: none; width: 22px; }
.mt-ask__no { width: 100%; height: 56px; margin-top: 12px; border: 0; border-radius: 999px; background: #f2f1ee; color: #121518; font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; transition: background .2s; }
.mt-ask__no:hover { background: #e9e7e3; }

/* сцена «Ваш сайт»: снимок главной в рамке окна браузера */
.mt-scene--site { flex-direction: column; gap: 18px; padding: 28px; }
.mt-site { width: min(100%, 760px); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.16); background: #fff; }
.mt-site__bar { height: 26px; background: #f1eee9; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.mt-site__bar i { width: 10px; height: 10px; border-radius: 50%; background: #d8d2c8; }
.mt-site img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.mt-msg .mt-join__go { width: auto; height: 54px; margin-top: 6px; padding: 0 34px; justify-content: center; font-size: 17px; font-weight: 700; }
