/* Conecta Social Network 3.0 — CSS isolado e limpo */

.csn3-shell,
.csn3-profile{
  max-width:600px;
  margin:0 auto;
  padding-bottom:90px;
}

.csn3-feed{
  display:flex;
  flex-direction:column;
  gap:22px;
}

.csn3-empty{
  text-align:center;
  color:#71717a;
  margin:24px 0;
}

.csn3-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.07);
}

.csn3-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
}

.csn3-member{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
  flex:1;
  color:inherit;
  text-decoration:none;
}

.csn3-member-avatar{
  width:44px;
  height:44px;
  border-radius:12px;
  object-fit:cover;
  background:#e5e7eb;
  flex:0 0 44px;
}

.csn3-member-text{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.csn3-member-text strong{
  display:block;
  font-size:14px;
  font-weight:900;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.csn3-member-text small{
  display:block;
  font-size:12px;
  color:#71717a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.csn3-more{
  border:1px solid #D6245D;
  background:#fff;
  color:#D6245D;
  border-radius:8px;
  width:38px;
  height:34px;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}

.csn3-media{
  position:relative;
  width:100%;
  aspect-ratio:4/5;
  overflow:hidden;
  background:#f5f5f5;
}

.csn3-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.csn3-carousel{
  position:absolute;
  inset:0;
  display:flex;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
  scrollbar-width:none;
  cursor:pointer;
  background:#f5f5f5;
}

.csn3-carousel::-webkit-scrollbar{
  display:none;
}

.csn3-slide{
  flex:0 0 100%;
  height:100%;
  position:relative;
  scroll-snap-align:start;
  background:#f5f5f5;
}

.csn3-image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover !important;
  object-position:center center;
  display:block;
  background:#f5f5f5;
}

.csn3-no-image{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#71717a;
  font-weight:800;
}

.csn3-counter,
.csn3-badge{
  position:absolute;
  z-index:5;
  border-radius:999px;
  color:#fff;
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
}

.csn3-counter{
  top:10px;
  right:10px;
  background:rgba(0,0,0,.56);
}

.csn3-badge{
  top:10px;
  left:10px;
  background:#F57C00;
}

.csn3-overlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:4;
  color:#fff;
  padding:40px 14px 14px;
  background:linear-gradient(to top, rgba(0,0,0,.70), rgba(0,0,0,0));
  pointer-events:none;
}

.csn3-overlay strong,
.csn3-overlay b,
.csn3-overlay small{
  display:block;
}

.csn3-overlay strong{
  font-size:15px;
  font-weight:900;
}

.csn3-overlay b{
  font-size:18px;
  font-weight:900;
  margin-top:3px;
}

.csn3-overlay small{
  font-size:12px;
  font-weight:800;
  margin-top:3px;
}

.csn3-actions{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px 0;
}

.csn3-actions button{
  border:0;
  background:transparent;
  color:#D6245D;
  font-size:20px;
  cursor:pointer;
  padding:4px;
}

.csn3-wa{
  margin-left:auto;
  color:#D6245D;
  text-decoration:none;
  font-weight:900;
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  padding:8px 10px;
}

.csn3-body{
  padding:10px 14px 14px;
}

.csn3-body h3{
  font-size:16px;
  line-height:1.2;
  font-weight:900;
  margin:0 0 5px;
}

.csn3-location{
  margin:0 0 6px;
  font-size:13px;
  color:#52525b;
}

.csn3-desc{
  margin:0;
  color:#3f3f46;
  font-size:14px;
  line-height:1.35;
}

.csn3-read-more{
  border:0;
  background:transparent;
  color:#0A66FF;
  font-weight:900;
  cursor:pointer;
  padding:0;
}

/* Stories */
.csn3-live{
  padding:10px 12px 14px;
  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.06);
  margin-bottom:14px;
}

.csn3-live-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  font-size:15px;
  margin-bottom:10px;
}

.csn3-live-title span{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#12b76a;
  box-shadow:0 0 0 4px rgba(18,183,106,.12);
}

.csn3-live-row{
  display:flex;
  gap:13px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.csn3-live-row::-webkit-scrollbar{
  display:none;
}

.csn3-story{
  position:relative;
  width:68px;
  flex:0 0 68px;
  text-align:center;
  color:inherit;
  text-decoration:none;
}

.csn3-story-ring{
  display:block;
  width:58px;
  height:58px;
  padding:3px;
  border-radius:999px;
  margin:0 auto 5px;
  background:#e5e7eb;
}

.csn3-story-ring.is-online{
  background:linear-gradient(135deg,#0A66FF,#F57C00);
}

.csn3-story-ring img{
  width:100%;
  height:100%;
  border-radius:999px;
  object-fit:cover;
  border:2px solid #fff;
}

.csn3-story b{
  position:absolute;
  top:44px;
  left:50%;
  transform:translateX(-50%);
  background:#12b76a;
  color:#fff;
  border-radius:999px;
  padding:2px 6px;
  font-size:9px;
  font-weight:900;
}

.csn3-story small{
  display:block;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Perfil */
.csn3-profile{
  max-width:1100px;
  padding:18px 14px 90px;
}

.csn3-profile-head{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding:8px 0 16px;
}

.csn3-profile-avatar{
  width:86px;
  height:86px;
  border-radius:20px;
  object-fit:cover;
  background:#e5e7eb;
  flex:0 0 86px;
}

.csn3-profile-info{
  min-width:0;
  flex:1;
}

.csn3-profile-info h1{
  font-size:22px;
  font-weight:900;
  line-height:1.05;
  margin:0;
}

.csn3-profile-info p{
  font-size:13px;
  color:#71717a;
  margin:4px 0 0;
}

.csn3-profile-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.csn3-profile-tags span{
  font-size:12px;
  font-weight:800;
  background:#f4f4f5;
  border:1px solid rgba(0,0,0,.06);
  padding:5px 8px;
  border-radius:999px;
}

.csn3-profile-bio{
  margin-top:8px;
  font-size:13px;
  line-height:1.35;
  color:#3f3f46;
  max-width:560px;
}

.csn3-profile-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.csn3-profile-actions button,
.csn3-profile-actions a{
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111;
  text-decoration:none;
  font-size:13px;
  font-weight:900;
  padding:8px 11px;
  border-radius:12px;
  cursor:pointer;
}

.csn3-profile-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  border-top:1px solid rgba(0,0,0,.06);
  border-bottom:1px solid rgba(0,0,0,.06);
  padding:12px 0;
  margin-bottom:14px;
}

.csn3-profile-stats div{
  text-align:center;
}

.csn3-profile-stats strong{
  display:block;
  font-size:16px;
  font-weight:900;
}

.csn3-profile-stats span{
  display:block;
  font-size:12px;
  color:#71717a;
}

.csn3-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.csn3-grid-item{
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  border-radius:12px;
  overflow:hidden;
}

.csn3-grid-media{
  display:block;
  width:100%;
  aspect-ratio:4/5;
  position:relative;
  background:#f5f5f5;
  overflow:hidden;
}

.csn3-grid-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover !important;
  background:#f5f5f5;
}

.csn3-grid-media b{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#71717a;
}

/* Modal */
.csn3-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:block;
}

.csn3-modal[aria-hidden="true"]{
  display:none;
}

.csn3-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.58);
}

.csn3-modal-panel{
  position:relative;
  max-width:640px;
  max-height:94vh;
  overflow:auto;
  margin:3vh auto;
  background:#fff;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.csn3-modal-close{
  position:sticky;
  top:0;
  float:right;
  margin:10px 10px 0 0;
  border:0;
  background:rgba(0,0,0,.06);
  width:40px;
  height:40px;
  border-radius:12px;
  font-size:24px;
  font-weight:900;
  cursor:pointer;
  z-index:4;
}

.csn3-modal-content{
  padding:10px 10px 14px;
}

.csn3-loading{
  padding:22px;
  font-weight:900;
}

.csn3-modal-open,
.csn3-modal-open body{
  overflow:hidden;
}

@media (max-width:520px){
  .csn3-shell{
    max-width:100%;
  }

  .csn3-card{
    border-radius:0;
    border-left:0;
    border-right:0;
  }

  .csn3-profile{
    padding-left:10px;
    padding-right:10px;
  }

  .csn3-profile-avatar{
    width:74px;
    height:74px;
    border-radius:18px;
    flex-basis:74px;
  }

  .csn3-grid{
    gap:6px;
  }
}


/* V3.1: grid do perfil com título e capa clicável */
.csn3-grid-caption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:2;
  display:block;
  text-align:left;
  color:#fff;
  padding:36px 9px 9px;
  background:linear-gradient(to top, rgba(0,0,0,.74), rgba(0,0,0,0));
  pointer-events:none;
}

.csn3-grid-caption strong,
.csn3-grid-caption em,
.csn3-grid-caption small{
  display:block;
  line-height:1.15;
}

.csn3-grid-caption strong{
  font-size:13px;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.csn3-grid-caption em{
  font-style:normal;
  font-size:12px;
  font-weight:900;
  margin-top:3px;
}

.csn3-grid-caption small{
  font-size:11px;
  font-weight:800;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media (max-width:520px){
  .csn3-grid-caption{ padding:30px 7px 7px; }
  .csn3-grid-caption strong{ font-size:11px; }
  .csn3-grid-caption em,
  .csn3-grid-caption small{ font-size:10px; }
}
