/* rs-header.css — общая шапка (тёмная капсула), окна и нижняя шторка.
   Подключается на главной (ru/en/uz), в протоколах и на других страницах сайта. */
:root { --rs-green: #34A853; --rs-green-d: #2A8C45; --rs-lime: #E2FFAB; }
[hidden] { display: none !important; }
/* ── Окна (бегун, вход) ── */
.rs-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; overscroll-behavior: contain; }
.rs-modal-box { position: relative; background: #fff; color: #1c1c1e; border-radius: 24px; padding: 28px 24px 24px; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.rs-modal-wide { max-width: 640px; background: #fafdf3; }
.rs-modal-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); color: #1c1c1e; font-size: 18px; cursor: pointer; }
.rs-modal-close:hover { background: rgba(0,0,0,.12); }
body.rs-noscroll { overflow: hidden; }

/* ── Шапка главной — как на страницах протоколов и кабинета ── */
.rs-header { position: fixed; z-index: 1000; left: 0; right: 0; top: max(12px, env(safe-area-inset-top)); padding: 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
.rs-nav { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1080px; margin: 0 auto; background: rgba(31,31,31,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; border-radius: 999px; padding: 8px 12px 8px 22px; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-family: "Montserrat Alternates", sans-serif; }
.rs-logo { font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: #fff !important; text-decoration: none !important; white-space: nowrap; }
.rs-logo span { font-weight: 500; }
.rs-nav-links { display: flex; gap: 22px; font-weight: 600; font-size: 14px; }
.rs-nav-links a { color: #fff !important; text-decoration: none !important; white-space: nowrap; transition: color .15s; }
.rs-nav-links a:hover, .rs-nav-links a.active { color: #FFB547 !important; }
.rs-nav-right { display: flex; align-items: center; gap: 14px; }
.rs-lang-pill { display: flex; gap: 2px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.rs-lang-pill a { color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: 12px; padding: 7px 10px; border-radius: 999px; line-height: 1; }
.rs-lang-pill a:hover { background: rgba(255,255,255,.12); }
.rs-lang-pill a[aria-current] { background: var(--rs-green); }
.rs-lang-btn { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #fff; font: 700 13px "Montserrat Alternates", sans-serif; cursor: pointer; }
.rs-login { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--rs-green); color: #fff; font: 600 14px "Montserrat Alternates", sans-serif; cursor: pointer; white-space: nowrap; }
.rs-login:hover { background: var(--rs-green-d); }
/* аватар: фото всегда круглое и на всю кнопку */
.rs-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: var(--rs-green); color: #fff !important; text-decoration: none !important; display: inline-flex; align-items: center; justify-content: center; font: 700 14px "Montserrat Alternates", sans-serif; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.rs-avatar:hover { box-shadow: 0 0 0 2px #FFB547; }
.rs-avatar > span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.rs-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.rs-menu-btn { display: none; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--rs-lime); color: #1c1c1e !important; align-items: center; justify-content: center; }
@media (max-width: 1080px) { .rs-nav-links { gap: 16px; font-size: 13px; } }
@media (max-width: 991px) {
  .rs-nav { padding: 6px 10px 6px 18px; gap: 8px; }
  .rs-nav-links { display: none; }
  .rs-menu-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  .rs-lang-pill { display: none; }
  .rs-lang-btn { display: inline-flex; }
  .rs-login span { display: none; }
  .rs-login { width: 40px; padding: 0; justify-content: center; }
  .rs-nav-right { gap: 8px; }
  .rs-logo { font-size: 17px; }
}

/* ── Нижняя шторка (выбор языка на телефоне) ── */
.rs-sheet { align-items: flex-end; padding: 0; }
.rs-sheet-box { position: relative; width: 100%; max-width: 520px; background: #fff; color: #1c1c1e; border-radius: 24px 24px 0 0; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); animation: rs-sheet-up .22s ease-out; }
@keyframes rs-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .rs-sheet-box { animation: none; } }
.rs-sheet-handle { display: block; width: 44px; height: 5px; border-radius: 9px; background: #d6d8d2; margin: 0 auto 12px; }
.rs-sheet-title { font: 700 17px "Montserrat Alternates", sans-serif; margin: 0 0 10px 4px; color: #1c1c1e; }
.rs-sheet-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; color: #1c1c1e !important; text-decoration: none !important; font-weight: 600; font-size: 16px; }
.rs-sheet-item:hover { background: #f5f6f2; }
.rs-sheet-item img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.rs-sheet-item span { flex: 1; }
.rs-sheet-item[aria-current] { background: #F1FFE0; }
.rs-sheet-item b { color: var(--rs-green); }
.rs-sheet .rs-modal-close { top: 8px; right: 8px; }
@media (min-width: 641px) { .rs-sheet { align-items: center; padding: 16px; } .rs-sheet-box { border-radius: 24px; } }

/* на страницах без большого фото шапка стоит в потоке и прилипает при прокрутке */
.rs-header.rs-flow { position: sticky; top: max(10px, env(safe-area-inset-top)); padding: 0; margin: 12px 0 0; }

/* логотип-картинка в шапке (если загружен в админке) */
.rs-logo-img { display: block; height: 28px; width: auto; max-width: 160px; object-fit: contain; }
@media (max-width: 640px) { .rs-logo-img { height: 24px; max-width: 120px; } }

/* окна по видимой высоте экрана: на телефоне не уходят под адресную строку браузера */
@supports (height: 100dvh) {
  .rs-modal { height: 100dvh; bottom: auto; }
  .rs-modal-box { max-height: calc(100dvh - 32px); }
}
