/* „Мегдана Раздумка“ (/razgovori/, js/razgovori.js) */
:root { --red: #c23b2e; --green: #2e7d4f; --ink: #1d1b18; --muted: #6b6358; --bg: #faf6ef; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 Rubik, system-ui, sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--red); }
.rz-top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top); }
.rz-top .bar { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.rz-top .logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 700 20px Rubik, sans-serif; margin-right: auto; }
.rz-site { color: #fff; opacity: .8; text-decoration: none; font-size: 14px; }
.rz { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 14px; min-width: 0; }
/* на цял екран: менюто вляво, разговорите в средата, дъската вдясно */
.rz-wrap { flex: 1; display: flex; width: 100%; max-width: 1440px; margin: 0 auto; gap: 18px; align-items: flex-start; }
.rz-menu, .rz-side { flex: none; position: sticky; top: 70px; padding: 14px 0; max-height: calc(100dvh - 80px); overflow-y: auto; }
.rz-menu[hidden], .rz-side[hidden] { display: none; }
.rz-menu { width: 250px; display: grid; gap: 4px; font-size: 16px; padding-left: 14px; }
.rz-menu nav { display: grid; gap: 2px; }
.rz-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.rz-menu a:hover { background: #f3eee5; }
.rz-menu a.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.rz-menu i { font-style: normal; width: 26px; text-align: center; flex: none; }
.rz-menu nav b { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; margin-left: 6px; font-size: 12px; }
.rz-menu small { color: var(--muted); font-size: 13px; margin-left: 4px; }
.rz-menu h4 { margin: 14px 10px 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rz-me span { display: grid; min-width: 0; } .rz-me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rz-me small { margin: 0; }
.rz-me .rz-av { width: 40px; height: 40px; font-size: 17px; }
.rz-side { width: 320px; padding-right: 14px; }
.rz-mb { display: none; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 20px; cursor: pointer; flex: none; }
.rz-3 .rz-mb { display: inline-grid; place-items: center; }
@media (min-width: 1100px) { .rz-3 .rz-mb { display: none; } }
@media (max-width: 1099px) {
  .rz-menu { position: fixed; z-index: 20; left: 0; top: 0; bottom: 0; max-height: none; background: var(--bg); box-shadow: 4px 0 24px rgba(0,0,0,.2);
    padding: calc(14px + env(safe-area-inset-top)) 12px 14px; transform: translateX(-105%); transition: transform .2s; align-content: start; }
  .rz-menu-open .rz-menu { transform: none; }
  .rz-side { display: none !important; }
}
@media (min-width: 1100px) and (max-width: 1299px) { .rz-side { width: 280px; } .rz-menu { width: 220px; } }
.rz-card { background: #fff; border-radius: 16px; padding: 18px; border: 1px solid rgba(0,0,0,.06); margin-bottom: 12px; }
.rz-login h1 { margin: 0 0 6px; font-size: 24px; }
.rz-login label, .rz-card > label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
.rz-login input, .rz-card > label input { display: block; width: 100%; margin-top: 4px; font: 16px Rubik, sans-serif; padding: 10px 12px; border: 1px solid #d9d2c5; border-radius: 10px; color: var(--ink); }
.rz-b { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; font: 600 15px Rubik, sans-serif; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.rz-b.g { background: var(--green); }
.rz-b.ghost { background: #efe8dc; color: var(--ink); }
.rz-b.sm { padding: 6px 11px; font-size: 13px; }
.rz-b:disabled { opacity: .6; }
.rz-b[hidden] { display: none; }
.rz-sub { color: var(--muted); font-size: 14px; }
.rz-err { color: var(--red); font-size: 14px; margin: 6px 0 0; min-height: 0; }
.rz-empty { color: var(--muted); padding: 20px 4px; }
.rz-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rz-note p { margin: 0 0 10px; }
.rz-remind { background: #fff7e0; border: 1.5px solid #f0c95a; }
.rz-remind .rz-acts { margin: 0; }
.rz-list { display: grid; gap: 2px; }
.rz-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; border: 0; width: 100%; font: inherit; text-align: left; cursor: pointer; }
.rz-item:hover { background: #f3eee5; }
.rz-item .b { flex: 1; min-width: 0; display: grid; }
.rz-item .b { font-size: 17px; } .rz-item .b small { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-item.new b, .rz-item.new small { color: var(--ink); font-weight: 600; }
.rz-item .t { font-size: 12px; color: var(--muted); display: grid; justify-items: end; gap: 4px; }
.rz-item .t i { font-style: normal; background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.rz-item input { width: 22px; height: 22px; }
.rz-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: #f6e3d6; color: var(--red); font: 600 19px Rubik, sans-serif; }
.rz-av.g { background: #e7efe1; font-size: 22px; }
.rz-av.sm { width: 30px; height: 30px; font-size: 13px; }
.rz-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; }
.rz-head h2 { margin: 0; font-size: 18px; flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.rz-head h2 a { color: var(--ink); text-decoration: none; }
.rz-head h2 small { font-weight: 400; color: var(--muted); font-size: 13px; }
.rz-head .rz-av { width: 38px; height: 38px; font-size: 16px; }
.rz-back { border: 0; background: #efe8dc; color: var(--ink); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; text-decoration: none; cursor: pointer; flex: none; }
.rz-more { position: relative; }
.rz-more summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; background: #efe8dc; display: grid; place-items: center; font-size: 20px; }
.rz-more summary::-webkit-details-marker { display: none; }
.rz-more > div { position: absolute; right: 0; top: 44px; width: 260px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.15); display: grid; gap: 8px; z-index: 3; }
.rz-more p { margin: 0; }
/* разговорът: съобщенията се превъртат, полето за писане е долу */
body.in-room .copy-mini { display: none; }
.rz-room { display: flex; flex-direction: column; height: calc(100dvh - 58px - env(safe-area-inset-top) - 28px); }
.rz-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 10px; }
.rz-m { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; }
.rz-m.me { align-self: flex-end; }
.rz-m .bub { background: #fff; border-radius: 18px 18px 18px 4px; padding: 8px 12px; border: 1px solid rgba(0,0,0,.05); min-width: 0; }
.rz-m.me .bub { background: var(--ink); color: #fff; border-radius: 18px 18px 4px 18px; }
.rz-m .bub.del { font-style: italic; opacity: .6; }
.rz-m .bub p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 18px; line-height: 1.45; }
.rz-m .bub .n { font-size: 15px; color: var(--red); display: block; }
.rz-m .bub img { display: block; max-width: 100%; height: auto; max-height: 340px; border-radius: 12px; margin: 2px 0 4px; }
.rz-m .bub a { color: inherit; }
.rz-m .bub small { display: block; font-size: 13px; opacity: .7; margin-top: 3px; }
.rz-m .bub .warn { font-size: 13px; background: #fff3d6; color: var(--ink); border-radius: 8px; padding: 4px 8px; margin-top: 4px; }
.lnk { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
.rz-sys { align-self: center; font-size: 14px; color: var(--muted); margin: 6px 0; text-align: center; }
.rz-send { display: flex; gap: 8px; align-items: flex-end; background: #fff; border-radius: 22px; padding: 6px; border: 1px solid #e3dccf; margin-bottom: env(safe-area-inset-bottom); }
.rz-send[hidden] { display: none; }
.rz-send textarea { flex: 1; border: 0; resize: none; font: 18px Rubik, sans-serif; padding: 8px 4px; outline: none; max-height: 140px; background: transparent; }
.rz-send .rz-b { border-radius: 50%; width: 42px; height: 42px; padding: 0; justify-content: center; }
.rz-ph { position: relative; width: 42px; height: 42px; display: grid; place-items: center; font-size: 20px; cursor: pointer; border-radius: 50%; background: #efe8dc; flex: none; }
.rz-ph input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rz-send .emo-wrap { flex: 1; min-width: 0; display: flex; }
.rz-send .emo-wrap > textarea { flex: 1; }
.rz-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.06); color: inherit; text-decoration: none; max-width: 260px; }
.rz-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; text-decoration: underline; }
.rz-file small { flex: none; opacity: .75; }
@media (max-width: 380px) { .rz-send { gap: 4px; } .rz-ph { width: 38px; height: 38px; font-size: 18px; } }
.copy-mini { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 14px 16px; }
.rz-edit { display: grid; gap: 6px; margin-top: 4px; min-width: min(260px, 60vw); }
.rz-edit textarea { width: 100%; font: 17px Rubik, sans-serif; padding: 8px 10px; border: 1px solid #d9d2c5; border-radius: 10px; resize: vertical; color: var(--ink); background: #fff; }
.rz-edit div { display: flex; gap: 6px; }
.rz-edit .rz-err { color: #ffb3b3; }
.rz-m:not(.me) .rz-edit .rz-err { color: var(--red); }
.rz-m .bub [hidden] { display: none !important; }
.pf-sec > summary, .rz-sec > summary { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; padding: 9px 10px; border-radius: 12px; background: #f3eee5; font-weight: 600; font-size: 14.5px; cursor: pointer; list-style: none; }
.pf-sec > summary::-webkit-details-marker, .rz-sec > summary::-webkit-details-marker { display: none; }
.pf-sec > summary::after, .rz-sec > summary::after { content: '▸'; margin-left: auto; color: var(--muted); }
.pf-sec[open] > summary::after, .rz-sec[open] > summary::after { content: '▾'; }
.pf-sec > summary:hover, .rz-sec > summary:hover { background: #ece4d6; }

/* Етикет „🎓 Студент“, „🏛️ Институция“, „🏢 Фирма“… до името (собственикът 2026-11-03) */
.rz-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #f3eee5; color: #6b6358; font-size: 12.5px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
