/*
 * MOO «EDINSTVO» — social functions inside the single edinstvo-portal theme.
 * Author and copyright: Ланцет Семён Борисович
 * License: proprietary / all rights reserved
 */

body.edinstvo-portal--social{background:var(--ep-paper);color:var(--ep-ink)}
body.edinstvo-portal--social .ep-main{background:var(--ep-paper)}
body.edinstvo-portal--social .btn,
body.edinstvo-portal--social button,
body.edinstvo-portal--social input,
body.edinstvo-portal--social select,
body.edinstvo-portal--social textarea{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}

/* Portal header notification bell. */
.ep-account .site-account{position:relative}
.ep-notifications{position:relative}
.ep-notifications>summary{list-style:none}
.ep-notifications>summary::-webkit-details-marker{display:none}
.ep-notifications__bell{position:relative;width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--ep-line);border-radius:50%;background:#fff;color:var(--ep-blue);cursor:pointer;font-size:17px;font-weight:900}
.ep-notifications__bell:hover{background:var(--ep-blue-soft)}
.ep-notifications__bell em{position:absolute;right:-5px;top:-5px;min-width:17px;height:17px;padding:0 4px;border:2px solid #fff;border-radius:10px;background:#b23d3d;color:#fff;font:800 9px/13px Inter,system-ui;font-style:normal;text-align:center}
.ep-notifications__panel{position:absolute;z-index:1200;right:0;top:39px;width:min(370px,calc(100vw - 26px));overflow:hidden;border:1px solid var(--ep-line);border-radius:12px;background:#fff;box-shadow:var(--ep-shadow)}
.ep-notifications__panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--ep-line)}
.ep-notifications__panel>header b{font:800 13px Inter,system-ui}
.ep-notifications__panel>header button{border:0;background:none;color:var(--ep-blue-2);font-size:10px;font-weight:800;cursor:pointer}
.ep-notifications__panel>div{max-height:380px;overflow:auto}
.ep-notification{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:11px 13px;border-bottom:1px solid #edf1f5;background:#fff}
.ep-notification.is-unread{background:#f4f8fc}
.ep-notification__mark{width:34px;height:34px;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--ep-blue-soft);color:var(--ep-blue)}
.ep-notification__mark img{width:100%;height:100%;object-fit:cover}
.ep-notification b,.ep-notification small,.ep-notification time{display:block}
.ep-notification b{font-size:11px;color:var(--ep-ink)}
.ep-notification small{margin-top:2px;color:var(--ep-muted);font-size:10px;line-height:1.35}
.ep-notification time{margin-top:3px;color:#8b98a7;font-size:9px}
.ep-notifications__empty{margin:0;padding:22px;color:var(--ep-muted);font-size:11px;text-align:center}

/* One internal navigation line below the official portal navigation. */
.ep-social-shell{padding:28px 0 58px;background:linear-gradient(180deg,#f7f9fb 0,#fff 220px)}
.ep-social-nav{display:flex;align-items:center;gap:4px;margin:0 0 24px;padding:0 0 10px;border-bottom:1px solid var(--ep-line);overflow-x:auto;scrollbar-width:none}
.ep-social-nav::-webkit-scrollbar{display:none}
.ep-social-nav a{flex:0 0 auto;padding:8px 11px;border-radius:7px;color:#42556a;font-size:11px;font-weight:850;white-space:nowrap}
.ep-social-nav a:hover{background:var(--ep-blue-soft);color:var(--ep-blue)}
.ep-social-nav a.is-active{background:var(--ep-blue);color:#fff}

.ep-social-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:18px}
.ep-social-heading h1{margin:5px 0 4px;font:500 clamp(30px,3.4vw,42px)/1.05 Georgia,"Times New Roman",serif;color:var(--ep-blue)}
.ep-social-heading p{margin:0;color:var(--ep-muted);font-size:12px}
.ep-card-kicker{display:block;margin-bottom:5px;color:var(--ep-blue-3);font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.ep-social-card{border:1px solid var(--ep-line);border-radius:var(--ep-radius);background:#fff;box-shadow:0 8px 24px rgba(20,48,77,.055)}
.ep-social-card h2{margin:0 0 9px;font:500 22px/1.18 Georgia,"Times New Roman",serif;color:var(--ep-blue)}
.ep-social-card p{color:var(--ep-muted);font-size:12px;line-height:1.5}
.ep-social-button,.ep-social-shell .btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border:1px solid #c8d5e2;border-radius:8px;background:#fff;color:var(--ep-blue)!important;font-size:11px;font-weight:900;text-decoration:none;cursor:pointer}
.ep-social-button:hover,.ep-social-shell .btn:hover{border-color:#9fb9d0;background:#f6f9fc}
.ep-social-button--primary,.ep-social-shell .btn-primary{border-color:var(--ep-blue)!important;background:var(--ep-blue)!important;color:#fff!important}
.ep-social-button--primary:hover,.ep-social-shell .btn-primary:hover{background:var(--ep-blue-2)!important}
.ep-social-actions,.button-row{display:flex;flex-wrap:wrap;gap:8px}
.ep-wide{width:100%;margin-top:8px}
.ep-danger{color:#9c3434!important}
.ep-muted,.muted{color:var(--ep-muted)!important}

/* Account. */
.ep-account-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:20px 22px;border:1px solid var(--ep-line);border-radius:var(--ep-radius);background:#fff;box-shadow:0 8px 24px rgba(20,48,77,.055)}
.ep-account-identity{display:flex;align-items:center;gap:14px;min-width:0}
.ep-account-identity .profile-avatar,.ep-account-identity img{width:70px;height:70px;object-fit:cover;border-radius:12px}
.ep-account-identity h2{margin:0;font:500 25px Georgia,"Times New Roman",serif;color:var(--ep-blue)}
.ep-account-identity p{margin:4px 0 0;color:var(--ep-muted);font-size:11px}
.ep-social-stats{display:grid;grid-template-columns:repeat(4,1fr);margin-top:12px;border:1px solid var(--ep-line);border-radius:var(--ep-radius);overflow:hidden;background:#fff}
.ep-social-stats article,.ep-social-stats>a{padding:13px 16px;border-right:1px solid var(--ep-line);text-align:center}
.ep-social-stats article:last-child,.ep-social-stats>a:last-child{border-right:0}
.ep-social-stats strong,.ep-social-stats b{display:block;font:600 21px Georgia,"Times New Roman",serif;color:var(--ep-blue)}
.ep-social-stats span{display:block;margin-top:2px;color:var(--ep-muted);font-size:9px}
.ep-account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.ep-account-grid>.ep-social-card{padding:18px}
.ep-social-link-list{display:grid;border-top:1px solid var(--ep-line)}
.ep-social-link-list>a{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:11px 2px;border-bottom:1px solid var(--ep-line)}
.ep-social-link-list>a:hover b{color:var(--ep-blue-3)}
.ep-social-link-list b,.ep-social-link-list small{display:block}
.ep-social-link-list b{font-size:12px;color:var(--ep-blue)}
.ep-social-link-list small{margin-top:2px;color:var(--ep-muted);font-size:9px}

/* Profile. */
.ep-profile-cover{height:220px;margin-bottom:12px;border-radius:var(--ep-radius);background-position:center;background-size:cover;box-shadow:var(--ep-shadow)}
.ep-profile-grid{display:grid;grid-template-columns:220px minmax(0,1fr) 250px;gap:12px;align-items:start}
.ep-profile-aside,.ep-profile-main,.ep-profile-side{min-width:0}
.ep-profile-avatar-card{padding:12px}
.profile-avatar-interactive{position:relative}
.profile-avatar-button{position:relative;width:100%;display:block;padding:0;border:0;background:none;cursor:pointer}
.profile-story-ring{display:block;overflow:hidden;border-radius:10px;background:#e7eef5}
.profile-story-ring .vk-profile-avatar,.profile-story-ring img{width:100%!important;height:auto!important;aspect-ratio:1/1;object-fit:cover;border-radius:0!important}
.avatar-hover-label{position:absolute;left:8px;right:8px;bottom:8px;padding:6px 7px;border-radius:7px;background:rgba(13,39,66,.78);color:#fff;font-size:9px;font-weight:800;opacity:0;transition:opacity .16s}
.profile-avatar-button:hover .avatar-hover-label{opacity:1}
.profile-avatar-menu{position:absolute;z-index:30;left:8px;right:8px;top:calc(100% - 4px);display:grid;padding:5px;border:1px solid var(--ep-line);border-radius:9px;background:#fff;box-shadow:var(--ep-shadow)}
.profile-avatar-menu[hidden]{display:none}
.profile-avatar-menu button{padding:8px;border:0;border-radius:6px;background:none;color:var(--ep-ink);font-size:10px;text-align:left;cursor:pointer}
.profile-avatar-menu button:hover{background:var(--ep-blue-soft)}
.profile-action-stack{display:grid;gap:7px;margin-top:1px}
.ep-profile-people{margin-top:12px;padding:13px}
.ep-profile-card{padding:20px}
.ep-profile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.ep-profile-head h1{margin:4px 0 3px;font:500 clamp(28px,3vw,38px)/1.04 Georgia,"Times New Roman",serif;color:var(--ep-blue)}
.ep-profile-head a{color:var(--ep-blue-3);font-size:11px;font-weight:800}
.ep-profile-head>span{color:var(--ep-muted);font-size:9px;white-space:nowrap}
.ep-profile-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.ep-profile-badges span{padding:4px 8px;border-radius:999px;background:var(--ep-blue-soft);color:var(--ep-blue);font-size:9px;font-weight:850}
.ep-profile-badges span.is-member{background:#f4ead8;color:#795b21}
.ep-profile-status{margin-top:14px;padding:9px 11px;border-left:3px solid var(--ep-blue-3);background:#f7f9fb;color:#344b62;font-size:12px}
.ep-profile-bio{margin-top:14px;color:#34485d;font-size:12px;line-height:1.6}
.ep-profile-locality{margin:12px 0 0!important;padding-top:10px;border-top:1px solid var(--ep-line)}
.ep-private-note{display:grid;gap:4px;margin-top:14px;padding:14px;border:1px dashed #bccada;border-radius:9px;background:#f8fafc}
.ep-private-note span{color:var(--ep-muted);font-size:10px}
.ep-profile-stats{grid-template-columns:repeat(3,1fr);margin-top:12px}
.ep-profile-wall{margin-top:12px;padding:14px}
.ep-profile-side>.ep-social-card{padding:14px;margin-bottom:12px}
.ep-weather-wrap .weather-widget{margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important}

/* Existing feed, people and settings now live inside the portal body. */
.edinstvo-portal--social .site-page-shell{width:min(1180px,calc(100% - 32px))!important;max-width:none!important;margin:0 auto!important;padding:28px 0 58px!important;display:block!important;background:transparent!important}
.edinstvo-portal--social .site-page-shell>.site-sidebar{display:none!important}
.edinstvo-portal--social .settings-page-060,
.edinstvo-portal--social .people-page-060,
.edinstvo-portal--social .feed-page{width:100%!important;max-width:none!important;margin:0!important}
.edinstvo-portal--social .settings-title,
.edinstvo-portal--social .people-page-060>header,
.edinstvo-portal--social .feed-page-head{padding:18px 20px!important;border:1px solid var(--ep-line)!important;border-radius:var(--ep-radius)!important;background:#fff!important;box-shadow:none!important;color:var(--ep-ink)!important}
.edinstvo-portal--social .settings-title h1,
.edinstvo-portal--social .people-page-060 h1,
.edinstvo-portal--social .feed-page-head h1{font-family:Georgia,"Times New Roman",serif!important;font-weight:500!important;color:var(--ep-blue)!important}
.edinstvo-portal--social .settings-layout-060{grid-template-columns:220px minmax(0,1fr)!important;gap:12px!important}
.edinstvo-portal--social .settings-menu-060,
.edinstvo-portal--social .settings-content-060,
.edinstvo-portal--social .person-card,
.edinstvo-portal--social .empty-card,
.edinstvo-portal--social .wall-composer,
.edinstvo-portal--social .feed-list>*{border-color:var(--ep-line)!important;background:#fff!important;box-shadow:none!important}
.edinstvo-portal--social .settings-menu-060 a.active,
.edinstvo-portal--social .people-tabs a.active,
.edinstvo-portal--social .feed-tabs a.active{background:var(--ep-blue)!important;color:#fff!important}
.edinstvo-portal--social .settings-form input,
.edinstvo-portal--social .settings-form textarea,
.edinstvo-portal--social .settings-form select{border:1px solid var(--ep-line)!important;border-radius:8px!important;background:#fff!important;color:var(--ep-ink)!important}

/* Messenger keeps its existing backend/DOM, but uses the portal canvas. */
.edinstvo-portal--social .messenger{width:min(1180px,calc(100% - 32px))!important;max-width:none!important;height:min(720px,calc(100vh - 190px))!important;margin:28px auto 58px!important;border:1px solid var(--ep-line)!important;border-radius:var(--ep-radius)!important;overflow:hidden!important;background:#fff!important;box-shadow:0 8px 24px rgba(20,48,77,.055)!important}
.edinstvo-portal--social .messenger>.site-sidebar{display:none!important}
.edinstvo-portal--social .chat-list{border-right:1px solid var(--ep-line)!important;background:#f8fafc!important}
.edinstvo-portal--social .conversation-shell{background:#fff!important}

/* Functional overlays remain inside the same portal visual system. */
.edinstvo-portal--social .modal-card,
.edinstvo-portal--social .crop-card,
.edinstvo-portal--social .message-context-menu,
.edinstvo-portal--social .chat-context-menu{border:1px solid var(--ep-line)!important;border-radius:var(--ep-radius)!important;background:#fff!important;color:var(--ep-ink)!important;box-shadow:var(--ep-shadow)!important}
.edinstvo-portal--social .toast-stack{z-index:1500}

@media(max-width:1040px){
 .ep-profile-grid{grid-template-columns:190px minmax(0,1fr)}
 .ep-profile-side{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .ep-profile-side>.ep-social-card{margin:0}
}
@media(max-width:760px){
 .ep-social-shell{padding:18px 0 38px}
 .ep-social-nav{margin-bottom:16px}
 .ep-account-hero{align-items:flex-start;flex-direction:column}
 .ep-account-grid{grid-template-columns:1fr}
 .ep-social-stats{grid-template-columns:repeat(2,1fr)}
 .ep-social-stats article:nth-child(2),.ep-social-stats>a:nth-child(2){border-right:0}
 .ep-social-stats article:nth-child(-n+2),.ep-social-stats>a:nth-child(-n+2){border-bottom:1px solid var(--ep-line)}
 .ep-profile-cover{height:145px}
 .ep-profile-grid{grid-template-columns:1fr}
 .ep-profile-aside{display:grid;grid-template-columns:140px minmax(0,1fr);gap:12px}
 .ep-profile-avatar-card{grid-column:1}
 .ep-profile-people{grid-column:2;margin:0}
 .ep-profile-side{grid-template-columns:1fr}
 .edinstvo-portal--social .settings-layout-060{grid-template-columns:1fr!important}
 .edinstvo-portal--social .settings-menu-060{display:flex!important;overflow-x:auto!important}
 .edinstvo-portal--social .settings-menu-060 a{flex:0 0 auto!important}
 .edinstvo-portal--social .messenger{width:100%!important;height:calc(100vh - 150px)!important;margin:0!important;border-left:0!important;border-right:0!important;border-radius:0!important}
}
@media(max-width:520px){
 .ep-profile-aside{display:block}
 .ep-profile-people{margin-top:12px}
 .ep-account-identity .profile-avatar,.ep-account-identity img{width:58px;height:58px}
 .ep-social-heading h1{font-size:30px}
 .ep-notifications__panel{right:-70px}
}
