/* ==========================================================
   BuddySocial v9.99
   BALANCED FULL-PAGE PIMP LAYOUT
   Fixes v9.98 being too wide/flat.
   ========================================================== */

/* Keep page broad, but no longer edge-to-edge */
body[data-page="pimp_profile"] main.pimp-page,
body[data-page="admin_pimp_profile"] main.pimp-page{
  width:calc(100% - 56px) !important;
  max-width:1500px !important;
  margin:12px auto 26px !important;
  box-sizing:border-box !important;
}

/* Balanced 3-column proportions */
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:200px minmax(0,1fr) 230px !important;
  gap:10px !important;
  align-items:start !important;
}

/* Make the page fill more vertical space without fake empty canvas */
body[data-page="pimp_profile"] main.pimp-page,
body[data-page="admin_pimp_profile"] main.pimp-page{
  min-height:calc(100vh - 210px) !important;
}

/* Hero slightly larger and more substantial */
body[data-page="pimp_profile"] .pimp-hero,
body[data-page="admin_pimp_profile"] .pimp-hero{
  min-height:126px !important;
}

body[data-page="pimp_profile"] .pimp-hero .retro-pad,
body[data-page="admin_pimp_profile"] .pimp-hero .retro-pad{
  padding:12px 14px !important;
}

body[data-page="pimp_profile"] .pimp-hero h1,
body[data-page="admin_pimp_profile"] .pimp-hero h1{
  font-size:23px !important;
  line-height:1.15 !important;
}

body[data-page="pimp_profile"] .pimp-hero p,
body[data-page="admin_pimp_profile"] .pimp-hero p{
  font-size:10px !important;
  line-height:1.45 !important;
}

/* Left navigation a touch larger */
body[data-page="pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav,
body[data-page="admin_pimp_profile"] .pimp-tabs-organized.pimp-site-leftnav{
  width:200px !important;
  max-width:200px !important;
}

body[data-page="pimp_profile"] .pimp-site-navgroup > span,
body[data-page="admin_pimp_profile"] .pimp-site-navgroup > span{
  padding:6px 8px !important;
  font-size:8.5px !important;
}

body[data-page="pimp_profile"] .pimp-site-navgroup a,
body[data-page="admin_pimp_profile"] .pimp-site-navgroup a{
  min-height:33px !important;
  padding:6px 8px !important;
  font-size:9.5px !important;
}

/* Center content gets more visual weight */
body[data-page="pimp_profile"] .pimp-site-center,
body[data-page="admin_pimp_profile"] .pimp-site-center{
  gap:8px !important;
}

/* Overview dashboard: slightly taller cards */
body[data-page="pimp_profile"] .pimp-dashboard,
body[data-page="admin_pimp_profile"] .pimp-dashboard{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
}

body[data-page="pimp_profile"] .pimp-dashboard > a,
body[data-page="admin_pimp_profile"] .pimp-dashboard > a{
  min-height:68px !important;
  padding:9px 10px !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

body[data-page="pimp_profile"] .pimp-dashboard > a > span:first-child,
body[data-page="admin_pimp_profile"] .pimp-dashboard > a > span:first-child{
  min-width:42px !important;
  min-height:42px !important;
}

/* Slightly bigger dashboard titles/content */
body[data-page="pimp_profile"] .pimp-dashboard b,
body[data-page="admin_pimp_profile"] .pimp-dashboard b{
  font-size:11px !important;
}

body[data-page="pimp_profile"] .pimp-dashboard small,
body[data-page="admin_pimp_profile"] .pimp-dashboard small{
  font-size:8.5px !important;
  line-height:1.35 !important;
}

/* Reset strip should not look squashed */
body[data-page="pimp_profile"] .pimp-reset-card,
body[data-page="admin_pimp_profile"] .pimp-reset-card{
  min-height:58px !important;
}

body[data-page="pimp_profile"] .pimp-reset-card .retro-pad,
body[data-page="admin_pimp_profile"] .pimp-reset-card .retro-pad{
  padding:9px 10px !important;
}

/* Right sidebar slightly larger, still compact */
body[data-page="pimp_profile"] .pimp-site-rightbar,
body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
  width:230px !important;
  max-width:230px !important;
  gap:8px !important;
}

body[data-page="pimp_profile"] .pimp-side-card .retro-pad,
body[data-page="admin_pimp_profile"] .pimp-side-card .retro-pad{
  padding:9px !important;
}

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

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

/* Larger section headers without becoming bulky */
body[data-page="pimp_profile"] :is(
  .retro-box-title,
  .pimp-block-toolbar,
  .pimp-design-card-toolbar,
  .pimp-v984-cardbar,
  .pimp-v984-group-head
),
body[data-page="admin_pimp_profile"] :is(
  .retro-box-title,
  .pimp-block-toolbar,
  .pimp-design-card-toolbar,
  .pimp-v984-cardbar,
  .pimp-v984-group-head
){
  min-height:30px !important;
  padding:6px 8px !important;
  font-size:9.5px !important;
}

/* Cards slightly larger but still compact */
body[data-page="pimp_profile"] .pimp-setting-card,
body[data-page="admin_pimp_profile"] .pimp-setting-card,
body[data-page="pimp_profile"] fieldset.theme-field.block-text-studio,
body[data-page="admin_pimp_profile"] fieldset.theme-field.block-text-studio{
  margin-bottom:10px !important;
}

/* Inputs a touch larger */
body[data-page="pimp_profile"] :is(
  input[type="text"],input[type="url"],input[type="number"],input[type="email"],select,textarea
),
body[data-page="admin_pimp_profile"] :is(
  input[type="text"],input[type="url"],input[type="number"],input[type="email"],select,textarea
){
  min-height:30px !important;
  padding:5px 6px !important;
  font-size:9.5px !important;
}

/* Buttons slightly larger for usability */
body[data-page="pimp_profile"] :is(button,.blue-btn,.orange-btn),
body[data-page="admin_pimp_profile"] :is(button,.blue-btn,.orange-btn){
  min-height:29px !important;
  padding:5px 9px !important;
  font-size:9px !important;
}

/* Avoid the full-width cards appearing too flat */
body[data-page="pimp_profile"] :is(
  .pimp-hero,
  .pimp-dashboard > a,
  .pimp-reset-card,
  .pimp-side-card,
  .pimp-setting-card,
  fieldset.theme-field.block-text-studio
),
body[data-page="admin_pimp_profile"] :is(
  .pimp-hero,
  .pimp-dashboard > a,
  .pimp-reset-card,
  .pimp-side-card,
  .pimp-setting-card,
  fieldset.theme-field.block-text-studio
){
  border-color:#a7c2d5 !important;
  box-shadow:0 2px 7px rgba(30,63,88,.07) !important;
}

/* Background still fills the page, but content sits in a stronger area */
body[data-page="pimp_profile"],
body[data-page="admin_pimp_profile"]{
  background-position:center top !important;
  background-size:cover !important;
}

/* Footer should follow actual page content naturally */
body[data-page="pimp_profile"] .retro-footer,
body[data-page="admin_pimp_profile"] .retro-footer{
  margin-top:12px !important;
}

/* Large screens: do not get ridiculously wide */
@media(min-width:1600px){
  body[data-page="pimp_profile"] main.pimp-page,
  body[data-page="admin_pimp_profile"] main.pimp-page{
    max-width:1560px !important;
    width:calc(100% - 70px) !important;
  }

  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:210px minmax(0,1fr) 240px !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:210px !important;
    max-width:210px !important;
  }

  body[data-page="pimp_profile"] .pimp-site-rightbar,
  body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
    width:240px !important;
    max-width:240px !important;
  }
}

/* Tablet */
@media(max-width:1100px){
  body[data-page="pimp_profile"] main.pimp-page,
  body[data-page="admin_pimp_profile"] main.pimp-page{
    width:calc(100% - 18px) !important;
    max-width:none !important;
  }

  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:180px minmax(0,1fr) !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:180px !important;
    max-width:180px !important;
  }

  body[data-page="pimp_profile"] .pimp-site-rightbar,
  body[data-page="admin_pimp_profile"] .pimp-site-rightbar{
    width:100% !important;
    max-width:none !important;
  }
}

/* Mobile */
@media(max-width:760px){
  body[data-page="pimp_profile"] main.pimp-page,
  body[data-page="admin_pimp_profile"] main.pimp-page{
    width:calc(100% - 8px) !important;
    margin:4px auto 88px !important;
    min-height:0 !important;
  }

  body[data-page="pimp_profile"] .pimp-dashboard,
  body[data-page="admin_pimp_profile"] .pimp-dashboard{
    grid-template-columns:1fr !important;
  }

  body[data-page="pimp_profile"] .pimp-dashboard > a,
  body[data-page="admin_pimp_profile"] .pimp-dashboard > a{
    min-height:62px !important;
  }
}

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