/* ==========================================================
   BuddySocial v10.02
   WIDER SIDEBARS + FILLED PAGE + FOOTER STAYS DOWN
   ========================================================== */

:root{
  --pimp-edge:8px;
  --pimp-left:275px;
  --pimp-right:315px;
  --pimp-gap:12px;
}

/* Let the Pimp page participate in a full-height site shell */
body[data-page="pimp_profile"],
body[data-page="admin_pimp_profile"]{
  min-height:100vh !important;
  min-height:100dvh !important;
}

/* Full-width but visually balanced */
body[data-page="pimp_profile"] main.pimp-page,
body[data-page="admin_pimp_profile"] main.pimp-page{
  width:calc(100% - (var(--pimp-edge) * 2)) !important;
  max-width:none !important;
  margin:8px var(--pimp-edge) 12px !important;
  box-sizing:border-box !important;

  /* critical: prevents footer jumping upward on short pages */
  min-height:calc(100vh - 215px) !important;
  min-height:calc(100dvh - 215px) !important;
}

/* Wider left/right, center keeps the rest */
body[data-page="pimp_profile"] main.pimp-page.pimp-layout-v987,
body[data-page="admin_pimp_profile"] main.pimp-page.pimp-layout-v987{
  grid-template-columns:var(--pimp-left) minmax(0,1fr) var(--pimp-right) !important;
  gap:var(--pimp-gap) !important;
  align-items:stretch !important;
}

/* Left sidebar */
body[data-page="pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
body[data-page="admin_pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav{
  width:var(--pimp-left) !important;
  max-width:var(--pimp-left) !important;
  min-height:520px !important;
  align-self:stretch !important;
}

/* Center */
body[data-page="pimp_profile"] .pimp-site-center,
body[data-page="admin_pimp_profile"] .pimp-site-center{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  min-height:520px !important;
  align-self:stretch !important;
}

/* Right sidebar */
body[data-page="pimp_profile"] .pimp-site-rightbar,
body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
  width:var(--pimp-right) !important;
  max-width:var(--pimp-right) !important;
  min-height:520px !important;
  align-self:stretch !important;
}

/* Give the side areas a subtle continuous panel so they feel filled */
body[data-page="pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
body[data-page="admin_pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
body[data-page="pimp_profile"] .pimp-site-rightbar,
body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
  background:
    linear-gradient(rgba(255,255,255,.72),rgba(255,255,255,.72)),
    var(--site-bg-image,url("../images/buddysocial-fixed-pages-bg-v965.png")) center top / cover !important;
  border:1px solid rgba(165,193,212,.82) !important;
  box-shadow:0 2px 8px rgba(31,65,91,.06) !important;
  box-sizing:border-box !important;
}

/* Right-side individual boxes stay clean */
body[data-page="pimp_profile"] .pimp-site-rightbar .pimp-side-card,
body[data-page="admin_pimp_profile"] .pimp-site-rightbar .pimp-side-card{
  width:calc(100% - 12px) !important;
  margin:6px !important;
}

/* Left nav groups fill their wider space */
body[data-page="pimp_profile"] .pimp-site-navgroup a,
body[data-page="admin_pimp_profile"] .pimp-site-navgroup a{
  min-height:37px !important;
  padding:7px 11px !important;
  font-size:10px !important;
}

/* Right side content larger but not oversized */
body[data-page="pimp_profile"] .pimp-side-card .retro-pad,
body[data-page="admin_pimp_profile"] .pimp-side-card .retro-pad{
  padding:11px !important;
}

body[data-page="pimp_profile"] .pimp-side-card p,
body[data-page="admin_pimp_profile"] .pimp-side-card p{
  font-size:9px !important;
  line-height:1.5 !important;
}

body[data-page="pimp_profile"] .pimp-side-links a,
body[data-page="admin_pimp_profile"] .pimp-side-links a{
  min-height:33px !important;
  padding:7px 9px !important;
  font-size:9px !important;
}

/* Make overview cards a little taller so center feels less empty */
body[data-page="pimp_profile"] .pimp-dashboard > a,
body[data-page="admin_pimp_profile"] .pimp-dashboard > a{
  min-height:78px !important;
  padding:11px !important;
}

/* Reset strip a little more substantial */
body[data-page="pimp_profile"] .pimp-reset-card,
body[data-page="admin_pimp_profile"] .pimp-reset-card{
  min-height:64px !important;
}

/* Background continues through the full page */
body[data-page="pimp_profile"],
body[data-page="admin_pimp_profile"]{
  background:
    linear-gradient(rgba(236,246,251,.34),rgba(236,246,251,.34)),
    var(--site-bg-image,url("../images/buddysocial-fixed-pages-bg-v965.png")) center top / cover fixed !important;
}

/* Footer remains at the bottom of short pages */
body[data-page="pimp_profile"] .retro-footer,
body[data-page="admin_pimp_profile"] .retro-footer{
  margin-top:0 !important;
  width:100% !important;
  box-sizing:border-box !important;
}

/* Add a little bottom breathing room inside main so footer doesn't sit against cards */
body[data-page="pimp_profile"] .pimp-site-center::after,
body[data-page="admin_pimp_profile"] .pimp-site-center::after{
  content:"" !important;
  display:block !important;
  min-height:18px !important;
}

/* Very large screens: sidebars can grow a little more */
@media(min-width:1700px){
  :root{
    --pimp-left:295px;
    --pimp-right:335px;
    --pimp-gap:14px;
  }
}

/* Tablet */
@media(max-width:1200px){
  :root{
    --pimp-left:215px;
    --pimp-edge:6px;
  }

  body[data-page="pimp_profile"] main.pimp-page.pimp-layout-v987,
  body[data-page="admin_pimp_profile"] main.pimp-page.pimp-layout-v987{
    grid-template-columns:var(--pimp-left) minmax(0,1fr) !important;
    align-items:start !important;
  }

  body[data-page="pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
  body[data-page="admin_pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav{
    width:var(--pimp-left) !important;
    max-width:var(--pimp-left) !important;
    min-height:0 !important;
  }

  body[data-page="pimp_profile"] .pimp-site-center,
  body[data-page="admin_pimp_profile"] .pimp-site-center{
    min-height:0 !important;
  }

  body[data-page="pimp_profile"] .pimp-site-rightbar,
  body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
    grid-column:2 !important;
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
  }
}

/* Mobile */
@media(max-width:760px){
  :root{
    --pimp-edge:4px;
  }

  body[data-page="pimp_profile"] main.pimp-page,
  body[data-page="admin_pimp_profile"] main.pimp-page{
    min-height:0 !important;
    margin-bottom:88px !important;
  }

  body[data-page="pimp_profile"] main.pimp-page.pimp-layout-v987,
  body[data-page="admin_pimp_profile"] main.pimp-page.pimp-layout-v987{
    display:block !important;
  }

  body[data-page="pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
  body[data-page="admin_pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
  body[data-page="pimp_profile"] .pimp-site-center,
  body[data-page="admin_pimp_profile"] .pimp-site-center,
  body[data-page="pimp_profile"] .pimp-site-rightbar,
  body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
  }

  body[data-page="pimp_profile"],
  body[data-page="admin_pimp_profile"]{
    background-attachment:scroll !important;
  }
}

/* Chat untouched */
#friend-chat,
.friend-chat-window{
  width:auto !important;
  max-width:none !important;
}
