/* KolorTube — complete nested 100% layout normalization.
 * This is the final layout layer. It expands structural containers/wrappers
 * without flattening the responsive video-card grid columns.
 */
:root{--wpst-layout-edge:0px}

/* Root and semantic structural regions. */
html,body,#page,.site,
header,main,footer,section,
#wrapper-navbar,#wrapper-footer,#content,
.site-content,.site-main,.content-area,
#primary,#main,
#page-wrapper,#archive-wrapper,#search-wrapper,#author-wrapper,#single-wrapper,
.page-wrapper,.content-wrapper,.main-wrapper,.inner-wrapper,.inner-wrap,
.container,.container-sm,.container-md,.container-lg,.container-xl,.container-fluid{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* No hidden outer/inner gutter from Bootstrap or legacy wrappers. */
.container,.container-sm,.container-md,.container-lg,.container-xl,.container-fluid,
#content,.site-content,.site-main,.content-area,#primary,#main,
#page-wrapper,#archive-wrapper,#search-wrapper,#author-wrapper,#single-wrapper,
.page-wrapper,.content-wrapper,.main-wrapper,.inner-wrapper,.inner-wrap{
  padding-left:0!important;
  padding-right:0!important;
}

/* Nested containers must never reintroduce a centered max-width. */
.container .container,.container .container-fluid,
.container-fluid .container,.container-fluid .container-fluid,
.wrapper .container,.wrapper .container-fluid,
.site-main .container,.site-main .container-fluid,
.entry-content .container,.entry-content .container-fluid,
#content .container,#content .container-fluid,
#primary .container,#primary .container-fluid,
.wpst-p2-container .container,.wpst-p2-container .container-fluid{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:0!important;
  padding-right:0!important;
}

/* Structural rows fill their parent exactly. Keep card column percentages. */
.row,.row.no-gutters,
.video-loop,.video-loop>.row,
.related-videos,.related-videos>.row,
.wpst-p2-related,.wpst-p2-related-grid,
.wpst-library-grid,.wpst-dashboard-grid,
.wpst-creator-dashboard,.wpst-dashboard-shell,.wpst-library-shell,
.wpst-p2-single,.wpst-p2-article,.wpst-p2-player-wrap,.wpst-p2-body,
.wpst-p2-header,.wpst-p2-comments,.wpst-p2-section-head,
.entry-content,.entry-summary,.post-content,.page-content,.archive-content,
.hero,.hero-text,.video-info,.video-actions-box,.video-share-box{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
}
.row,.row.no-gutters{padding-left:0!important;padding-right:0!important}

/* Main columns use all available width; actual video cards retain Bootstrap widths. */
#primary.content-area,.content-area,.site-main,
.wpst-content-column,.wpst-main-column,.video-loop{
  flex-grow:1!important;
  min-width:0!important;
}
body:not(.home) #primary.content-area,
body:not(.home) .site-main,
body:not(.home) .wpst-content-column{
  width:100%!important;
  max-width:none!important;
}

/* Remove centering helpers only from structural shells, not media/buttons. */
#content .mx-auto,.site-main.mx-auto,.content-area.mx-auto,
.entry-content.mx-auto,.wpst-p2-container.mx-auto,.wpst-library-shell.mx-auto,
.wpst-dashboard-shell.mx-auto{
  margin-left:0!important;
  margin-right:0!important;
}

/* Single video and custom systems: every inner shell spans 100%. */
.wpst-p2-container,.wpst-p2-layout,.wpst-p2-main,.wpst-p2-sidebar,
.wpst-p2-player,.wpst-player-shell,.wpst-player-stage,.wpst-player-inner,
.wpst-video-library,.wpst-library-section,.wpst-library-content,
.wpst-creator-content,.wpst-creator-main,.wpst-creator-section,
.wpst-analytics-wrap,.wpst-payout-wrap,.wpst-subscriptions-wrap,
.wpst-playlists-wrap,.wpst-history-wrap,.wpst-continue-wrap{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Header/footer internal wrappers align with the same true full width. */
.navbar,.navbar>.container,.navbar>.container-fluid,.nav-container,
#wrapper-footer>.container,#wrapper-footer>.container-fluid,
.site-footer>.container,.site-footer>.container-fluid,
.footer-inner,.header-inner{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Homepage: only the requested left rail consumes fixed width. */
.home .wpst-home-shell{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  gap:0!important;
  grid-template-columns:220px minmax(0,1fr)!important;
}
.home .wpst-home-menu,.home #secondary.widget-area{
  flex:0 0 220px!important;
  width:220px!important;
  max-width:220px!important;
}
.home .wpst-home-shell>.video-loop,
.home .wpst-home-shell>#primary,
.home .wpst-home-shell>.content-area{
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  flex:1 1 auto!important;
}

/* Sidebar layouts on archives use all remaining width, with no phantom gap. */
#content.d-flex,.container.d-flex,.container-fluid.d-flex{
  width:100%!important;
  max-width:none!important;
  gap:0!important;
}
body:not(.home) #secondary.widget-area,
body:not(.home) .sidebar-left,body:not(.home) .sidebar-right{
  flex:0 0 220px;
  width:220px;
  max-width:220px;
  margin:0!important;
}
body:not(.home) #secondary.widget-area + #primary,
body:not(.home) #primary.content-area{
  flex:1 1 auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
}

/* Media and players never create a smaller inner box. */
.video-player,.single-video-player,.wp-video,.wp-video-shortcode,
.video-js,.fluid_video_wrapper,video,iframe{
  max-width:100%!important;
}
.video-player,.single-video-player,.wp-video,.wp-video-shortcode,
.video-js,.fluid_video_wrapper{
  width:100%!important;
}

/* Avoid accidental horizontal overflow while retaining the full viewport. */
html,body,#page,.site{overflow-x:clip}
img,svg,canvas,video,iframe{max-width:100%;}

@media(max-width:991.98px){
  .home .wpst-home-shell{display:block!important}
  .home .wpst-home-menu,.home #secondary.widget-area,
  body:not(.home) #secondary.widget-area,
  body:not(.home) .sidebar-left,body:not(.home) .sidebar-right{
    width:100%!important;max-width:none!important;flex:0 0 100%!important;
  }
  #content.d-flex,.container.d-flex,.container-fluid.d-flex{display:block!important}
}
