/* KolorTube Phase 6 — final global layout normalization */
:root{--wpst-page-gutter:clamp(12px,2vw,28px);--wpst-content-width:100%;--wpst-card-gap:clamp(10px,1.4vw,20px)}
html,body{width:100%;max-width:100%;overflow-x:clip}
*,*:before,*:after{box-sizing:border-box}
body .wrapper,body #content,body .site,body .site-content,body main,body .site-main{max-width:none}
body .container,body .container-sm,body .container-md,body .container-lg,body .container-xl,body .wpst-p2-container{width:100%!important;max-width:var(--wpst-content-width)!important;margin-left:auto!important;margin-right:auto!important;padding-left:var(--wpst-page-gutter)!important;padding-right:var(--wpst-page-gutter)!important}
body .container .container,body .wpst-p2-container .container{padding-left:0!important;padding-right:0!important}
body .row{min-width:0;margin-left:calc(var(--wpst-card-gap)/-2);margin-right:calc(var(--wpst-card-gap)/-2)}
body .row>[class*=col-]{min-width:0;padding-left:calc(var(--wpst-card-gap)/2);padding-right:calc(var(--wpst-card-gap)/2)}
img,video,iframe,embed,object{max-width:100%}
.wrapper{padding-top:clamp(14px,2vw,28px);padding-bottom:clamp(20px,3vw,44px)}
.video-loop>.row,.video-loop .row.no-gutters{row-gap:var(--wpst-card-gap)}
.wpst-p2-player-wrap,.wpst-p2-player-shell,.wpst-p2-stage{width:100%;max-width:none}
.wpst-p2-stage{aspect-ratio:16/9;background:#000}
.wpst-p2-stage video,.wpst-p2-stage iframe{width:100%;height:100%;object-fit:contain}
.wpst-p2-header,.wpst-p2-body{gap:clamp(14px,2vw,28px)}
.wpst-p2-body{grid-template-columns:minmax(0,1fr) minmax(240px,320px)}
.wpst-p2-description{overflow-wrap:anywhere}
.site-main,.video-loop,.wpst-full-column{width:100%;max-width:100%;flex:1 1 auto}
.sidebar,.widget-area{min-width:0}
@media(max-width:991px){.wpst-p2-body{grid-template-columns:1fr}.wpst-p2-side-card{width:100%}}
@media(max-width:767px){:root{--wpst-page-gutter:12px;--wpst-card-gap:10px}.wrapper{padding-top:12px}.wpst-p2-header{display:block}.wpst-p2-actions{margin-top:12px}.wpst-player-title{font-size:13px}.wpst-player-time,.wpst-volume-group,.wpst-control[data-action="pip"],.wpst-control[data-action="theater"]{display:none!important}.video-loop .row.no-gutters>[class*=col-]{flex:0 0 50%!important;max-width:50%!important}.single-video-comments{padding-left:0;padding-right:0}}
@media(max-width:420px){.video-loop .row.no-gutters>[class*=col-]{padding-left:5px!important;padding-right:5px!important}}

/* Single video recommendation block (v1.3.0) */

.wpst-you-may-also-like{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
  background-color:rgba(0,0,0,.15);
  color:rgba(255,255,255,.75);
}
.wpst-you-may-also-like__title{
  margin:0;
  padding:60px 0 40px;
  color:#fff;
  font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:clamp(26px,3vw,42px);
  font-weight:700;
  line-height:1.15;
  letter-spacing:-.005rem;
}
.wpst-you-may-also-like__grid{
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  padding:0 var(--wpst-page-gutter) 60px!important;
  row-gap:24px;
  align-items:stretch;
}
.wpst-you-may-also-like__grid a{color:inherit}
.wpst-you-may-also-like__grid>.wpst-related-lazy{display:none}
.wpst-you-may-also-like__grid>.wpst-related-lazy.is-visible{display:block}
.wpst-related-sentinel{width:100%;height:2px}
@media(max-width:767px){
  .wpst-you-may-also-like__title{padding:36px 0 24px;font-size:26px}
  .wpst-you-may-also-like__grid{padding:0 12px 36px!important;row-gap:16px}
}

/* v1.3.1: Keep a precise 2px gap between the site menu/header and single-video player. */
body.single-post #single-wrapper.wpst-p2-single{
  padding-top:2px!important;
}
body.single-post #single-wrapper .wpst-p2-article{
  padding-top:0!important;
}

/* v1.3.2: Prevent white text on white/light surfaces.
 * The reference palette intentionally uses white text for purple/dark areas.
 * These final rules scope readable dark typography to light UI surfaces only.
 */
:root{
  --wpst-light-text:#171717;
  --wpst-light-heading:#0f172a;
  --wpst-light-muted:#5f6875;
  --wpst-light-link:#5533ff;
}

/* Known light panels and common WordPress/Bootstrap light surfaces. */
:is(
  .bg-white,
  .bg-light,
  .card,
  .modal-content,
  .popover,
  .dropdown-menu,
  .list-group-item,
  .table,
  .wp-block-table,
  .wp-block-group.has-white-background-color,
  .has-white-background-color,
  .entry-content .wp-block-cover__inner-container.has-background,
  .wpst-p2-side-card,
  .wpst-p2-description,
  .wpst-p2-info,
  .wpst-p2-meta-card,
  .wpst-p3-playlist-pop,
  .wpst-p3-modal,
  .wpst-p3-panel,
  .wpst-p4-panel,
  .wpst-p5-stats article,
  .wpst-p5-table,
  .wpst-p5-table table,
  .wpst-dashboard-card,
  .wpst-creator-card,
  .wpst-library-card,
  .wpst-account-card,
  .wpst-form-card,
  .comments-area,
  .comment-body,
  .search-results .article,
  .page .entry-content.has-background
){
  color:var(--wpst-light-text)!important;
}

:is(
  .bg-white,
  .bg-light,
  .card,
  .modal-content,
  .popover,
  .dropdown-menu,
  .list-group-item,
  .table,
  .wp-block-table,
  .wp-block-group.has-white-background-color,
  .has-white-background-color,
  .wpst-p2-side-card,
  .wpst-p2-description,
  .wpst-p2-info,
  .wpst-p2-meta-card,
  .wpst-p3-playlist-pop,
  .wpst-p3-modal,
  .wpst-p3-panel,
  .wpst-p4-panel,
  .wpst-p5-stats article,
  .wpst-p5-table,
  .wpst-dashboard-card,
  .wpst-creator-card,
  .wpst-library-card,
  .wpst-account-card,
  .wpst-form-card,
  .comments-area,
  .comment-body
) :is(h1,h2,h3,h4,h5,h6,.entry-title,.page-title,.widget-title,strong,b,th,label,legend){
  color:var(--wpst-light-heading)!important;
}

:is(
  .bg-white,
  .bg-light,
  .card,
  .modal-content,
  .popover,
  .dropdown-menu,
  .list-group-item,
  .table,
  .wp-block-table,
  .wp-block-group.has-white-background-color,
  .has-white-background-color,
  .wpst-p2-side-card,
  .wpst-p2-description,
  .wpst-p2-info,
  .wpst-p2-meta-card,
  .wpst-p3-playlist-pop,
  .wpst-p3-modal,
  .wpst-p3-panel,
  .wpst-p4-panel,
  .wpst-p5-stats article,
  .wpst-p5-table,
  .wpst-dashboard-card,
  .wpst-creator-card,
  .wpst-library-card,
  .wpst-account-card,
  .wpst-form-card,
  .comments-area,
  .comment-body
) :is(p,li,dd,dt,span,small,.description,.entry-summary,.video-description,td,.text-muted){
  color:var(--wpst-light-muted)!important;
}

:is(
  .bg-white,
  .bg-light,
  .card,
  .modal-content,
  .popover,
  .dropdown-menu,
  .list-group-item,
  .wp-block-group.has-white-background-color,
  .has-white-background-color,
  .wpst-p2-side-card,
  .wpst-p2-description,
  .wpst-p2-info,
  .wpst-p2-meta-card,
  .wpst-p3-playlist-pop,
  .wpst-p3-modal,
  .wpst-p3-panel,
  .wpst-p4-panel,
  .wpst-p5-stats article,
  .wpst-p5-table,
  .wpst-dashboard-card,
  .wpst-creator-card,
  .wpst-library-card,
  .wpst-account-card,
  .wpst-form-card,
  .comments-area,
  .comment-body
) a:not(.btn):not(.button){
  color:var(--wpst-light-link)!important;
}
:is(
  .bg-white,
  .bg-light,
  .card,
  .modal-content,
  .popover,
  .dropdown-menu,
  .list-group-item,
  .wpst-p2-side-card,
  .wpst-p2-description,
  .wpst-p2-info,
  .wpst-p2-meta-card,
  .wpst-p3-playlist-pop,
  .wpst-p3-modal,
  .wpst-p3-panel,
  .wpst-p4-panel,
  .wpst-p5-stats article,
  .wpst-p5-table,
  .wpst-dashboard-card,
  .wpst-creator-card,
  .wpst-library-card,
  .wpst-account-card,
  .wpst-form-card,
  .comments-area,
  .comment-body
) a:not(.btn):not(.button):hover{
  color:#2f1ab8!important;
}

/* Inputs must remain readable when their surface is light. */
:is(.bg-white,.bg-light,.card,.modal-content,.wpst-form-card,.wpst-account-card,.wpst-dashboard-card)
:is(input:not([type="button"]):not([type="submit"]),select,textarea){
  background:#fff!important;
  color:var(--wpst-light-text)!important;
  border-color:#d9dee7!important;
}
:is(.bg-white,.bg-light,.card,.modal-content,.wpst-form-card,.wpst-account-card,.wpst-dashboard-card)
:is(input,textarea)::placeholder{
  color:#7a8491!important;
  opacity:1;
}

/* Preserve intentional white typography on dark theme areas. */
:is(#wrapper-navbar,.navbar,#wrapper-footer,.site-footer,.wpst-p2-stage,.wpst-player,.wpst-you-may-also-like,.wpst-dark-section)
:is(h1,h2,h3,h4,h5,h6,p,li,span,label,a,strong,b,small){
  color:inherit;
}

/* v1.3.3: Single-video page light-surface typography fix.
 * The single template itself does not carry .bg-white/.card classes, so scope
 * readable colours directly to the article while preserving player/dark blocks.
 */
body.single #single-wrapper .wpst-p2-article,
body.single-post #single-wrapper .wpst-p2-article{
  color:var(--wpst-light-text)!important;
  background:#fff;
}
body.single #single-wrapper .wpst-p2-header h1,
body.single-post #single-wrapper .wpst-p2-header h1,
body.single #single-wrapper .wpst-p2-body :is(h1,h2,h3,h4,h5,h6,strong,b),
body.single-post #single-wrapper .wpst-p2-body :is(h1,h2,h3,h4,h5,h6,strong,b){
  color:var(--wpst-light-heading)!important;
}
body.single #single-wrapper :is(.wpst-p2-header,.wpst-p2-body,.wpst-p2-description,.wpst-p2-side-card,.wpst-p2-tax),
body.single-post #single-wrapper :is(.wpst-p2-header,.wpst-p2-body,.wpst-p2-description,.wpst-p2-side-card,.wpst-p2-tax){
  color:var(--wpst-light-text)!important;
}
body.single #single-wrapper :is(.wpst-p2-meta,.wpst-p2-description,.wpst-p2-side-card) :is(p,span,small,li,dd,dt),
body.single-post #single-wrapper :is(.wpst-p2-meta,.wpst-p2-description,.wpst-p2-side-card) :is(p,span,small,li,dd,dt){
  color:var(--wpst-light-muted)!important;
}
body.single #single-wrapper :is(.wpst-p2-description,.wpst-p2-tax,.wpst-p2-side-card) a:not(.btn):not(.button),
body.single-post #single-wrapper :is(.wpst-p2-description,.wpst-p2-tax,.wpst-p2-side-card) a:not(.btn):not(.button){
  color:var(--wpst-light-link)!important;
}
body.single #single-wrapper :is(.wpst-p2-description,.wpst-p2-tax,.wpst-p2-side-card) a:not(.btn):not(.button):hover,
body.single-post #single-wrapper :is(.wpst-p2-description,.wpst-p2-tax,.wpst-p2-side-card) a:not(.btn):not(.button):hover{
  color:#2f1ab8!important;
}
/* Keep video/player controls and dark recommendation block intentionally light. */
body.single #single-wrapper :is(.wpst-p2-stage,.wpst-player,.wpst-player-shell,.wpst-player-controls,.wpst-you-may-also-like),
body.single-post #single-wrapper :is(.wpst-p2-stage,.wpst-player,.wpst-player-shell,.wpst-player-controls,.wpst-you-may-also-like){
  color:inherit!important;
}


/* Single-video share menu with inline SVG social icons. */
.wpst-share-actions{position:relative;display:flex;align-items:center;z-index:25}
.wpst-p2-actions .wpst-p2-share{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;cursor:pointer;font-weight:700;line-height:1}
.wpst-p2-actions .wpst-p2-share svg{width:18px;height:18px;display:block;fill:currentColor;flex:0 0 auto}
.wpst-share-menu{position:absolute;top:calc(100% + 8px);right:0;width:220px;padding:8px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 14px 35px rgba(15,23,42,.16);z-index:999;color:#111827}
.wpst-share-menu[hidden]{display:none!important}
.wpst-share-item{width:100%;min-height:42px;display:flex;align-items:center;gap:11px;padding:9px 10px;border:0;border-radius:6px;background:transparent!important;color:#111827!important;text-decoration:none!important;font:inherit;font-size:14px;font-weight:650;text-align:left;cursor:pointer;box-sizing:border-box}
.wpst-share-item:hover,.wpst-share-item:focus{background:#f3f4f6!important;color:#111827!important;outline:none}
.wpst-share-item svg{width:20px;height:20px;display:block;fill:currentColor;flex:0 0 20px}
.wpst-share-item.is-whatsapp svg{color:#16a34a}
.wpst-share-item.is-facebook svg{color:#1877f2}
.wpst-share-item.is-x svg{color:#111}
.wpst-share-item.is-telegram svg{color:#229ed9}
.wpst-share-item.is-copy svg{color:#6d28d9}
@media(max-width:640px){.wpst-share-actions{width:100%}.wpst-p2-actions .wpst-p2-share{width:100%}.wpst-share-menu{left:0;right:auto;width:min(100%,280px)}}

/* v1.3.5: Keep the single-video container visually separated from the menu bar. */
body.single #single-wrapper > .wpst-p2-article,
body.single-post #single-wrapper > .wpst-p2-article{
  padding-top:8px!important;
}
body.single #single-wrapper > .wpst-p2-article > .wpst-p2-container,
body.single-post #single-wrapper > .wpst-p2-article > .wpst-p2-container{
  margin-top:0!important;
}
@media(max-width:640px){
  body.single #single-wrapper > .wpst-p2-article,
  body.single-post #single-wrapper > .wpst-p2-article{
    padding-top:6px!important;
  }
}

/* v1.3.7: Mobile footer .row.text-center alignment fix. */
@media (max-width: 767.98px){
  #wrapper-footer > .container{
    width:100%!important;
    max-width:none!important;
    padding-left:12px!important;
    padding-right:12px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  #wrapper-footer .row.text-center{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    text-align:center!important;
  }
  #wrapper-footer .row.text-center > [class*="col-"]{
    width:100%!important;
    max-width:100%!important;
    flex:0 0 100%!important;
    padding-left:0!important;
    padding-right:0!important;
    margin:0!important;
  }
  #wrapper-footer .site-footer,
  #wrapper-footer .footer-menu-container,
  #wrapper-footer .site-info{
    width:100%!important;
    max-width:100%!important;
    margin-left:auto!important;
    margin-right:auto!important;
    text-align:center!important;
    overflow-wrap:anywhere;
  }
  #wrapper-footer .footer-menu-container ul{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px 14px!important;
    width:100%!important;
    margin:0 0 12px!important;
    padding:0!important;
    list-style:none!important;
  }
  #wrapper-footer .footer-menu-container li{
    float:none!important;
    display:inline-flex!important;
    width:auto!important;
    margin:0!important;
    padding:0!important;
  }
}
