/* Компоненты настроек чатов. Все эффекты ограничены отдельным фоном или строкой списка. */
@layer vmesta-component-contract {
html:root body #cover-chats-pane#cover-chats-pane#cover-chats-pane {padding:12px !important;display:grid !important;gap:14px !important;font:14px/1.45 system-ui,-apple-system,'Segoe UI',sans-serif !important;color:var(--theme-text-primary) !important;}
html:root body #cover-chats-pane.hidden {display:none!important;}
html:root body #cover-chats-pane .chat-settings426-card {background:var(--theme-surface-nested) !important;padding:16px !important;border-radius:18px !important;display:grid !important;gap:12px !important;}
html:root body #cover-chats-pane h3 {margin:0 !important;font-size:15px !important;color:var(--theme-text-primary) !important;}
html:root body #cover-chats-pane p {margin:0 !important;color:var(--theme-text-secondary) !important;font-size:12px !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-toggle {display:flex !important;align-items:center !important;justify-content:space-between !important;gap:16px !important;padding:12px 0 !important;cursor:pointer !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-toggle span {display:grid !important;gap:4px !important;min-width:0 !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) small {font-size:12px !important;line-height:1.4 !important;color:var(--theme-text-secondary) !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) input[type=checkbox] {appearance:auto!important;position:static!important;opacity:1!important;width:20px!important;height:20px!important;min-width:20px!important;accent-color:var(--theme-accent) !important;}
html:root body #cover-chats-pane .chat-settings426-select {display:grid !important;gap:10px !important;}
html:root body #cover-chats-pane .chat-settings426-select span {display:grid !important;gap:4px !important;}
html:root body #cover-chats-pane select {width:100% !important;padding:12px !important;border-radius:12px !important;border:1px solid var(--theme-divider) !important;background:var(--theme-surface-control) !important;color:var(--theme-text-primary) !important;font:inherit !important;}
html:root body #chat-settings426-modal#chat-settings426-modal#chat-settings426-modal {position:fixed !important;inset:0 !important;z-index:2147483000 !important;display:grid !important;place-items:center !important;padding:20px !important;background:rgb(0 0 0/.52) !important;font:14px/1.45 system-ui,-apple-system,'Segoe UI',sans-serif !important;color:var(--theme-text-primary) !important;}
html:root body #chat-settings426-modal .chat-settings426-dialog {width:min(560px,100%) !important;max-height:calc(100dvh - 40px) !important;display:flex !important;flex-direction:column !important;border-radius:22px !important;background:var(--theme-surface-panel) !important;overflow:hidden !important;box-shadow:0 24px 80px #0005 !important;}
html:root body #chat-settings426-modal header {display:flex !important;align-items:center !important;gap:12px !important;padding:16px 20px !important;flex:none !important;background:var(--theme-surface-nested) !important;}
html:root body #chat-settings426-modal h2 {margin:0 !important;flex:1 !important;font-size:18px !important;color:var(--theme-accent) !important;}
html:root body #chat-settings426-modal header button {width:40px !important;height:40px !important;display:grid !important;place-items:center !important;border-radius:12px !important;background:var(--theme-surface-control) !important;color:var(--theme-text-primary) !important;border:0 !important;cursor:pointer !important;}
html:root body #chat-settings426-modal .chat-settings426-body {min-height:0 !important;overflow:auto !important;overscroll-behavior:contain !important;padding:18px 20px !important;}
html:root body #chat-settings426-modal footer {display:flex !important;align-items:center !important;gap:12px !important;padding:14px 20px !important;border-top:1px solid var(--theme-divider) !important;flex:none !important;}
html:root body #chat-settings426-modal footer[hidden] {display:none!important;}
html:root body #chat-settings426-modal [data-status426] {flex:1 !important;font-size:12px !important;color:var(--theme-text-secondary) !important;}
html:root body #chat-settings426-modal [data-save426] {border:0 !important;border-radius:12px !important;padding:11px 18px !important;background:var(--theme-action-fill,var(--theme-accent)) !important;color:var(--theme-on-action,var(--theme-on-accent)) !important;font-weight:700 !important;cursor:pointer !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) svg {width:22px !important;height:22px !important;flex:none !important;fill:none !important;stroke:currentColor !important;stroke-width:1.8 !important;stroke-linecap:round !important;stroke-linejoin:round !important;color:var(--theme-accent) !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-option {display:flex !important;align-items:center !important;gap:12px !important;padding:14px !important;border:0 !important;border-radius:14px !important;width:100% !important;text-align:left !important;background:var(--theme-surface-control) !important;color:var(--theme-text-primary) !important;font:inherit !important;cursor:pointer !important;margin:8px 0 !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-preview {height:190px !important;position:relative !important;isolation:isolate !important;overflow:hidden !important;border-radius:16px !important;background:var(--theme-surface-control) !important;padding:16px !important;display:flex !important;flex-direction:column !important;align-items:flex-start !important;gap:13px !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-preview-wall {position:absolute !important;inset:-12px !important;z-index:-1 !important;background-size:cover !important;background-position:center !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-preview > span {align-self:center !important;padding:4px 10px !important;border-radius:12px !important;background:var(--theme-surface-panel) !important;font-size:11px !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-preview p {margin:0 !important;padding:10px 14px !important;border-radius:14px !important;background:var(--theme-surface-panel) !important;color:var(--theme-text-primary) !important;font-size:13px !important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-preview p:last-child {align-self:flex-end !important;background:var(--theme-surface-active) !important;}
html:root body #chat-settings426-modal .chat-settings426-wallpapers {display:grid !important;grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:10px !important;margin:16px 0 !important;}
html:root body #chat-settings426-modal .chat-settings426-wallpapers label {display:grid !important;position:relative !important;gap:5px !important;cursor:pointer !important;text-align:center !important;font-size:12px !important;}
html:root body #chat-settings426-modal .chat-settings426-wallpapers input {position:absolute!important;top:6px !important;right:6px !important;width:17px!important;height:17px!important;appearance:auto!important;opacity:1!important;accent-color:var(--theme-accent) !important;}
html:root body #chat-settings426-modal .chat-settings426-wall-tile {height:68px !important;display:grid !important;place-items:center !important;border-radius:11px !important;background-color:var(--theme-surface-control) !important;background-size:cover !important;}
html:root body #chat-settings426-modal .chat-settings426-upload {display:flex !important;align-items:center !important;flex-wrap:wrap !important;gap:10px !important;padding:14px !important;border-radius:14px !important;background:var(--theme-surface-nested) !important;cursor:pointer !important;}
html:root body #chat-settings426-modal .chat-settings426-upload small {flex-basis:100% !important;}
html:root body #chat-settings426-modal [hidden] {display:none!important;}
/* На телефоне архив открывается строкой списка, кнопки прежних панелей скрываются. */
html:root body #messages-root#messages-root#messages-root .messenger-archive426 {display:none !important;align-items:center !important;margin:4px 0 10px !important;border-radius:16px !important;background:var(--theme-surface-nested) !important;font-family:system-ui,sans-serif !important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 {flex:1 !important;min-width:0 !important;display:flex !important;align-items:center !important;gap:12px !important;padding:14px !important;border:0 !important;background:none !important;color:var(--theme-text-primary) !important;text-align:left !important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 > svg {width:28px !important;height:28px !important;fill:none !important;stroke:var(--theme-accent) !important;stroke-width:1.7 !important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 span {display:grid !important;gap:4px !important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 strong {font-size:14px !important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 small {font-size:11px !important;color:var(--theme-text-secondary) !important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-menu426 {width:44px !important;height:44px !important;margin:0 7px !important;border:0 !important;border-radius:12px !important;background:var(--theme-surface-control) !important;color:var(--theme-accent) !important;}
html:root body #messages-root#messages-root#messages-root .messenger-chat-row {position:relative !important;touch-action:pan-y !important;}
html:root body #messages-root#messages-root#messages-root .messenger-chat-row.is-swiping426 {overflow:hidden !important;}
html:root body #messages-root#messages-root#messages-root .messenger-chat-row.is-swiping426::after {content:attr(data-swipe-label) !important;position:absolute !important;right:0 !important;inset-block:0 !important;width:100px !important;display:grid !important;place-items:center !important;padding:8px !important;font-size:11px !important;text-align:center !important;background:var(--theme-surface-active) !important;color:var(--theme-accent) !important;z-index:0 !important;}
html:root body #messages-root#messages-root#messages-root .messenger-chat-row.is-swiping426 > button {transform:translateX(var(--chat-swipe426,0)) !important;position:relative !important;z-index:1 !important;}
/* Фоновый слой не участвует в размере ленты и не размывает содержимое сообщений. */
html:root body #messages-root#messages-root#messages-root .chat-wallpaper-layer426 {position:absolute !important;inset:0 !important;overflow:hidden !important;pointer-events:none !important;border-radius:inherit !important;z-index:0 !important;}
html:root body #messages-root#messages-root#messages-root .chat-wallpaper-layer426 > div {position:absolute !important;inset:-18px !important;background-size:cover !important;background-position:center !important;}
html:root body #messages-root#messages-root#messages-root .chat-wallpaper-layer426 ~ #messenger-message-stream {position:relative !important;z-index:1 !important;}
html:root body .chat-wallpaper-layer426.is-blurred > div,html:root body .chat-settings426-preview.is-blurred > .chat-settings426-preview-wall {filter:blur(7px) !important;}
html:root body .chat-wallpaper-layer426.is-moving > div,html:root body .chat-settings426-preview.is-moving > .chat-settings426-preview-wall {animation:chat-wallpaper-drift426 24s ease-in-out infinite alternate !important;}
@keyframes chat-wallpaper-drift426 {from{transform:scale(1.03) translate(-5px,-4px)}to{transform:scale(1.07) translate(5px,4px)}}
@media(prefers-reduced-motion:reduce){html:root body .chat-wallpaper-layer426 > div,html:root body .chat-settings426-preview-wall {animation:none!important;}}
@media(max-width:767px){
html:root body #messages-root#messages-root#messages-root .messenger-archive426.is-visible {display:flex!important;}
html:root body #messages-root#messages-root#messages-root .messenger-desktop-archive-button,html:root body #messages-root#messages-root#messages-root [onclick="setMessengerListFilter('archive')"]:not(.messenger-archive-open426) {display:none!important;}
html:root body #chat-settings426-modal#chat-settings426-modal#chat-settings426-modal {padding:0 !important;}
html:root body #chat-settings426-modal .chat-settings426-dialog {width:100% !important;height:100dvh !important;max-height:100dvh !important;border-radius:0 !important;padding-top:env(safe-area-inset-top) !important;padding-bottom:env(safe-area-inset-bottom) !important;}
html:root body #chat-settings426-modal .chat-settings426-body {flex:1 !important;}
/* Плеер находится в потоке ящика и резервирует собственную высоту. */
html:root body #profile-left-rail#profile-left-rail#profile-left-rail #mobile-drawer-player {position:relative!important;display:block!important;flex:none!important;width:100%!important;min-width:0!important;padding:8px 12px!important;box-sizing:border-box!important;}
html:root body #profile-left-rail#profile-left-rail#profile-left-rail #mobile-drawer-player #global-music-dock {position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;display:flex!important;}
html:root body #profile-left-rail#profile-left-rail#profile-left-rail #mobile-drawer-player #global-music-panel:not(.hidden) {position:relative!important;inset:auto!important;transform:none!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important;}
}
/* Подгруженные участки видны отдельной дорожкой под волной, даже до начала воспроизведения. */
html:root body .vmesta-track-wave > .audio-buffer426,html:root body #global-music-dock .global-music-wave > .audio-buffer426 {content:'' !important;position:absolute !important;left:0 !important;right:0 !important;bottom:0 !important;height:3px !important;border-radius:3px !important;pointer-events:none !important;background:linear-gradient(to right,color-mix(in srgb,var(--theme-accent) 48%,var(--theme-text-secondary)) 0 var(--track-buffered-position,var(--audio-buffered426,0%)),color-mix(in srgb,var(--theme-text-secondary) 18%,transparent) var(--track-buffered-position,var(--audio-buffered426,0%)) 100%) !important;}
}

@layer vmesta-component-contract {
/* Эффекты общих обоев используют такие же компактные переключатели. */
html:root body #messages-root#messages-root#messages-root .messenger-wallpaper-effect426 {display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:10px 12px!important;color:var(--theme-text-primary)!important;font-size:13px!important;}
html:root body #messages-root#messages-root#messages-root .messenger-wallpaper-effect426 input {appearance:auto!important;position:static!important;opacity:1!important;width:20px!important;height:20px!important;min-width:20px!important;accent-color:var(--theme-accent)!important;}
html:root body .vmesta-track-wave,html:root body #global-music-dock .global-music-wave {position:relative !important;}
}

@layer vmesta-component-contract {
@media(max-width:767px){html:root body .messenger-side-section button[onclick="setMessengerListFilter('archive')"] {display:none!important;}}
}

@layer vmesta-component-contract {html:root body #messages-root#messages-root#messages-root .messenger-archive-back426 {display:flex!important;gap:8px!important;padding:12px!important;border:0!important;border-radius:12px!important;background:var(--theme-surface-control)!important;color:var(--theme-text-primary)!important;font-size:13px!important;}}
