/* ==========================================================
   BuddySocial v9.98 - SITE FULLER WIDTH LAYOUT
   Makes the whole site use more of the viewport.
   ========================================================== */

/* Fixed/general pages use almost full desktop width */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
main:not(.pimp-page){
  width:calc(100% - 24px) !important;
  max-width:none !important;
  margin-left:12px !important;
  margin-right:12px !important;
  box-sizing:border-box !important;
}

/* Home specifically: make all 3 columns breathe better */
body[data-page="home"] .hyves-home-layout{
  width:100% !important;
  max-width:none !important;
  grid-template-columns:270px minmax(0,1fr) 300px !important;
  gap:10px !important;
}

/* Wider central feed */
body[data-page="home"] .hyves-home-center,
body[data-page="home"] .hyves-home-main,
body[data-page="home"] .home-main-column{
  min-width:0 !important;
  width:100% !important;
}

/* Friends / directories */
body[data-page="friends"] .friends-page-shell,
body[data-page="friends_of_friends"] .friends-page-shell,
body[data-page="online"] .classic-subpage,
body[data-page="members"] .classic-subpage{
  width:100% !important;
  max-width:none !important;
}

/* Generic subpages */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
:is(.classic-subpage,.retro-content,.classic-page-shell,.page-shell){
  max-width:none !important;
  width:100% !important;
}

/* Grids take advantage of larger width */
.friends-directory-grid,
.discover-friends-grid,
.albums-grid,
.photos-grid,
.videos-grid,
.poll-grid,
.gift-grid,
.games-grid{
  width:100% !important;
  max-width:none !important;
}

/* More cards per row on large screens */
@media(min-width:1400px){
  .friends-directory-grid,
  .discover-friends-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }

  .albums-grid,
  .photos-grid,
  .videos-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }

  .games-grid{
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  }
}

/* Messages/inbox should span more width */
.message-center-layout,
.messages-layout,
.inbox-layout{
  width:100% !important;
  max-width:none !important;
  grid-template-columns:minmax(230px,280px) minmax(0,1fr) !important;
}

/* Notifications and settings pages */
.notifications-page,
.settings-page,
.support-page,
.admin-console{
  width:100% !important;
  max-width:none !important;
}

/* Footer spans entire viewport */
.retro-footer{
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}

/* Top content strips align to fuller page width */
.retro-topin,
.retro-navin{
  width:calc(100% - 24px) !important;
  max-width:none !important;
  margin-left:12px !important;
  margin-right:12px !important;
  box-sizing:border-box !important;
}

/* Avoid stretching small utility blocks too much */
body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
.retro-box{
  box-sizing:border-box !important;
}

/* Preserve Pimp's own full-width classic layout */
body[data-page="pimp_profile"] main.pimp-page,
body[data-page="admin_pimp_profile"] main.pimp-page{
  width:calc(100% - 20px) !important;
  max-width:none !important;
}

/* Profile keeps user skin logic but can use more viewport */
body[data-page="profile"] main.profile-page,
body[data-page="profile"] .profile-layout{
  width:calc(100% - 24px) !important;
  max-width:none !important;
  margin-left:12px !important;
  margin-right:12px !important;
  box-sizing:border-box !important;
}

/* Large desktop */
@media(min-width:1700px){
  body[data-page="home"] .hyves-home-layout{
    grid-template-columns:290px minmax(0,1fr) 320px !important;
  }

  .retro-topin,
  .retro-navin,
  body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
  main:not(.pimp-page){
    width:calc(100% - 32px) !important;
    margin-left:16px !important;
    margin-right:16px !important;
  }
}

/* Tablet */
@media(max-width:1100px){
  body[data-page="home"] .hyves-home-layout{
    grid-template-columns:230px minmax(0,1fr) !important;
  }

  body[data-page="home"] .hyves-home-right{
    grid-column:2 !important;
  }

  body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
  main:not(.pimp-page),
  .retro-topin,
  .retro-navin{
    width:calc(100% - 14px) !important;
    margin-left:7px !important;
    margin-right:7px !important;
  }
}

/* Mobile */
@media(max-width:760px){
  body:not([data-page="profile"]):not([data-page="pimp_profile"]):not([data-page="admin_pimp_profile"])
  main:not(.pimp-page),
  .retro-topin,
  .retro-navin{
    width:calc(100% - 8px) !important;
    margin-left:4px !important;
    margin-right:4px !important;
  }

  body[data-page="home"] .hyves-home-layout{
    display:block !important;
    width:100% !important;
  }

  body[data-page="profile"] main.profile-page,
  body[data-page="profile"] .profile-layout{
    width:calc(100% - 8px) !important;
    margin-left:4px !important;
    margin-right:4px !important;
  }

  .message-center-layout,
  .messages-layout,
  .inbox-layout{
    display:block !important;
  }
}

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