.t3yt-root{width:100%;max-width:none!important;font-family:Arial,Helvetica,sans-serif;color:inherit}.t3yt-tabs{display:flex;gap:26px;overflow-x:auto;border-bottom:1px solid #8885;margin-bottom:15px}.t3yt-tab{background:none!important;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;padding:13px 3px!important;color:inherit!important;cursor:pointer;font-weight:600}.t3yt-tab.active{border-bottom-color:currentColor!important}.t3yt-panel{display:none}.t3yt-panel.active{display:block}.t3yt-panel h2{font-size:1.35rem;margin:24px 0 12px}.t3yt-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0!important;width:100%}.t3yt-tile{display:block;position:relative;aspect-ratio:16/9;min-width:0;width:100%;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#151515!important;cursor:pointer;z-index:0;transition:transform .2s ease,box-shadow .2s ease;transform-origin:center;overflow:hidden}.t3yt-tile img{display:block;width:100%;height:100%;object-fit:cover}.t3yt-tile:hover,.t3yt-tile:focus-visible{transform:scale(1.12);z-index:5;box-shadow:0 10px 28px #0009;overflow:visible}.t3yt-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;background:#000b;color:white;font-size:21px;line-height:1;padding:12px 17px;opacity:0;transition:opacity .2s}.t3yt-tile:hover .t3yt-play,.t3yt-tile:focus-visible .t3yt-play{opacity:1}.t3yt-more,.t3yt-see{display:block;margin:20px auto!important;padding:10px 25px!important;cursor:pointer}.t3yt-see{margin:12px 0 24px!important}.t3yt-modal[hidden]{display:none!important}.t3yt-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:24px}.t3yt-backdrop{position:absolute;inset:0;background:#000d}.t3yt-dialog{position:relative;width:min(1050px,100%);background:#161616;color:#fff;box-shadow:0 20px 70px #000a}.t3yt-close{position:absolute;right:0;top:-45px;color:white!important;background:transparent!important;border:0!important;font-size:34px!important;cursor:pointer}.t3yt-frame{aspect-ratio:16/9;background:#000}.t3yt-frame iframe{width:100%;height:100%;border:0;display:block}.t3yt-player-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 16px;font-size:14px}.t3yt-player-title{font-weight:600}.t3yt-youtube{color:#fff!important;white-space:nowrap}.t3yt-notice{padding:12px;border-left:4px solid #d33;background:#fff5f5;color:#222}@media(max-width:900px){.t3yt-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:550px){.t3yt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.t3yt-modal{padding:10px}.t3yt-player-bottom{flex-wrap:wrap}.t3yt-tabs{gap:18px}}@media(prefers-reduced-motion:reduce){.t3yt-tile{transition:none}}

/* v1.1: Explicit multi-row grid, overriding Avada theme button and flex rules. */
.t3yt-root .t3yt-panel .t3yt-grid {
 display:grid!important;
 grid-template-columns:repeat(5,minmax(0,1fr))!important;
 grid-auto-flow:row!important;
 grid-auto-rows:auto;
 align-items:stretch;
 column-gap:0!important;
 row-gap:0!important;
 width:100%!important;
 max-width:none!important;
 overflow:visible!important;
 margin:0!important;
 padding:0!important;
}
.t3yt-root .t3yt-panel .t3yt-grid > .t3yt-tile {
 box-sizing:border-box!important;
 display:block!important;
 float:none!important;
 flex:none!important;
 min-width:0!important;
 max-width:none!important;
 width:100%!important;
 height:auto!important;
 aspect-ratio:16/9!important;
 line-height:normal!important;
 margin:0!important;
 padding:0!important;
 border:0!important;
 border-radius:0!important;
 position:relative!important;
 overflow:hidden;
}
.t3yt-root .t3yt-grid > .t3yt-tile img {width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;}
.t3yt-root .t3yt-grid > .t3yt-tile:hover,
.t3yt-root .t3yt-grid > .t3yt-tile:focus-visible {z-index:10;transform:scale(1.12);overflow:visible;}
@media(max-width:900px){.t3yt-root .t3yt-panel .t3yt-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:550px){.t3yt-root .t3yt-panel .t3yt-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}

/* v1.2 simple gallery: direct child grid, no tabs, playlists, or category UI. */
.t3yt-root.t3yt-simple {width:100%!important;max-width:none!important;margin:0!important;padding:0!important;overflow:visible!important;}
.t3yt-root.t3yt-simple > .t3yt-grid {display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:0!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;overflow:visible!important;}
.t3yt-root.t3yt-simple > .t3yt-grid > .t3yt-tile {box-sizing:border-box!important;display:block!important;position:relative!important;float:none!important;min-width:0!important;max-width:none!important;width:100%!important;height:auto!important;aspect-ratio:16/9!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden;}
.t3yt-root.t3yt-simple > .t3yt-grid > .t3yt-tile img {width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;}
.t3yt-root.t3yt-simple > .t3yt-grid > .t3yt-tile:hover,.t3yt-root.t3yt-simple > .t3yt-grid > .t3yt-tile:focus-visible {z-index:10;transform:scale(1.12);overflow:visible;}
@media(max-width:900px){.t3yt-root.t3yt-simple > .t3yt-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:550px){.t3yt-root.t3yt-simple > .t3yt-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}

/* v1.3 configurable desktop columns; responsive overrides remain fixed. */
@media(min-width:901px){.t3yt-root.t3yt-simple > .t3yt-grid{grid-template-columns:repeat(var(--t3yt-desktop-columns,5),minmax(0,1fr))!important;}}

/* v1.4 responsive admin-selected column counts. */
@media (min-width:551px) and (max-width:900px){.t3yt-root.t3yt-simple > .t3yt-grid{grid-template-columns:repeat(var(--t3yt-tablet-columns,3),minmax(0,1fr))!important;}}
@media (max-width:550px){.t3yt-root.t3yt-simple > .t3yt-grid{grid-template-columns:repeat(var(--t3yt-mobile-columns,2),minmax(0,1fr))!important;}}

/* v1.5: Subscribe button beside the player title. */
.t3yt-player-heading{display:flex;align-items:center;gap:12px;min-width:0;flex:1;flex-wrap:wrap}
.t3yt-player-heading .t3yt-player-title{min-width:0;overflow-wrap:anywhere}
.t3yt-subscribe,.t3yt-subscribe:visited{display:inline-flex!important;align-items:center;justify-content:center;flex-shrink:0;background:#ff0033!important;color:#fff!important;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:700;text-decoration:none!important;line-height:1.2;white-space:nowrap}
.t3yt-subscribe:hover,.t3yt-subscribe:focus-visible{background:#cf0029!important;color:#fff!important;text-decoration:none!important}
@media(max-width:550px){.t3yt-player-heading{width:100%}}

/* v1.5.2: minimal popup footer: Subscribe and Watch on YouTube only. */
.t3yt-player-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.t3yt-player-bottom .t3yt-youtube{margin-left:auto}

/* AdSense placements occupy exactly one responsive video-grid cell. */
.t3yt-root.t3yt-simple > .t3yt-grid > .t3yt-ad{box-sizing:border-box!important;position:relative!important;display:block!important;width:100%!important;min-width:0!important;aspect-ratio:16/9!important;overflow:hidden!important;background:#151515!important;margin:0!important;padding:0!important;border:0!important;}
.t3yt-ad-label{position:absolute;top:2px;left:3px;z-index:1;color:#ddd;background:#151515;font:9px/1.2 Arial,sans-serif;padding:1px 3px;pointer-events:none}
.t3yt-ad-unit{max-width:100%;max-height:100%;overflow:hidden}

/* Affiliate promotion: separate horizontal row between video and player controls. */
.t3yt-popup-affiliate[hidden]{display:none!important}
.t3yt-popup-affiliate{padding:10px 16px;background:#242424;color:#fff;border-top:1px solid #444}
.t3yt-affiliate-disclosure{display:block;font-size:11px;color:#bbb;margin-bottom:7px}
.t3yt-affiliate-link{display:flex;align-items:center;gap:12px;color:#fff!important;text-decoration:none!important;min-height:52px}
.t3yt-affiliate-image{width:56px;height:56px;object-fit:contain;flex-shrink:0;background:#fff;border-radius:3px}
.t3yt-affiliate-image[hidden]{display:none!important}
.t3yt-affiliate-name{font-size:14px;font-weight:600;flex:1;min-width:0;overflow-wrap:anywhere}
.t3yt-affiliate-cta{font-size:12px;white-space:nowrap;border:1px solid #999;padding:8px 10px;border-radius:4px}
.t3yt-affiliate-link:focus-visible{outline:2px solid #fff;outline-offset:3px}
@media(max-width:550px){.t3yt-popup-affiliate{padding:8px 10px}.t3yt-affiliate-image{width:42px;height:42px}.t3yt-affiliate-name{font-size:12px}.t3yt-affiliate-cta{font-size:11px;padding:6px}}

/* v1.7.1: Keep the entire player, affiliate promotion and buttons within the viewport.
   Width scales down with viewport height, retaining the native 16:9 video ratio. */
.t3yt-modal{box-sizing:border-box!important;padding:clamp(10px,2vh,20px)!important}
.t3yt-dialog{box-sizing:border-box!important;width:min(1050px,100%,calc((100dvh - 185px)*16/9))!important;max-height:calc(100dvh - 55px)!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain}
.t3yt-frame{width:100%;aspect-ratio:16/9!important}
.t3yt-close{position:sticky!important;top:0!important;float:right!important;margin-bottom:-38px!important;transform:translateY(0);z-index:4;background:#161616!important;border-radius:4px;line-height:1!important;height:38px;width:38px}
.t3yt-popup-affiliate{padding:7px 12px!important}
.t3yt-affiliate-disclosure{margin-bottom:4px!important;font-size:10px!important}
.t3yt-affiliate-link{min-height:42px!important;gap:9px!important}
.t3yt-affiliate-image{width:44px!important;height:44px!important}
.t3yt-player-bottom{padding:9px 12px!important}
@media(max-width:550px){.t3yt-dialog{width:100%!important;max-height:calc(100dvh - 28px)!important}.t3yt-modal{padding:8px!important}.t3yt-affiliate-cta{white-space:normal!important;text-align:center}}

/* v1.7.4: Reserve the Avada header area and size the 16:9 player to the
   available vertical viewport, including the affiliate and button rows. */
.t3yt-modal{inset:0!important;padding:72px 12px 12px!important;box-sizing:border-box!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
.t3yt-dialog{width:min(1050px,calc(100vw - 24px),max(200px,calc((100dvh - 270px)*16/9)))!important;max-width:100%!important;max-height:calc(100dvh - 84px)!important;overflow-y:auto!important;overflow-x:hidden!important;float:none!important;margin:0 auto!important;flex:none!important}
.t3yt-close{position:absolute!important;top:7px!important;right:7px!important;float:none!important;margin:0!important;z-index:8!important;background:#161616e8!important;box-shadow:0 1px 6px #0009!important}
.t3yt-frame{width:100%!important;height:auto!important;aspect-ratio:16/9!important;flex:none!important}
.t3yt-popup-affiliate{box-sizing:border-box!important}
.t3yt-affiliate-image{display:block;object-fit:contain}
.t3yt-affiliate-image[hidden]{display:none!important}
.t3yt-affiliate-image-fallback{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border-radius:3px;background:#353535;color:#ddd;font:8px/1.2 Arial,sans-serif;text-align:center;padding:3px;box-sizing:border-box}
.t3yt-affiliate-image-fallback[hidden]{display:none!important}
@media(max-width:550px){.t3yt-modal{padding:58px 8px 8px!important}.t3yt-dialog{width:min(calc(100vw - 16px),max(180px,calc((100dvh - 230px)*16/9)))!important;max-height:calc(100dvh - 66px)!important}}
@media(max-height:460px){.t3yt-modal{padding:8px!important;align-items:flex-start!important;overflow-y:auto!important}.t3yt-dialog{width:min(650px,calc(100vw - 16px))!important;max-height:none!important;overflow:visible!important}}

/* 1.8.0 affiliate gallery tile — same footprint as video thumbnail */
.t3yt-root .t3yt-grid>.t3yt-affiliate-grid-ad{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-sizing:border-box!important;aspect-ratio:16/9!important;overflow:hidden!important;padding:12px 8px 7px!important;text-align:center;text-decoration:none!important;background:#202020!important;color:#fff!important;position:relative!important;}
.t3yt-affiliate-grid-image{display:flex;align-items:center;justify-content:center;min-height:0;flex:1;max-height:62%;width:100%;}
.t3yt-affiliate-grid-image img{display:block!important;max-height:100%!important;max-width:100%!important;width:auto!important;height:auto!important;object-fit:contain!important;}
.t3yt-affiliate-grid-placeholder{font-size:11px;color:#ccc;}
.t3yt-affiliate-grid-name{font-size:clamp(10px,1vw,13px);font-weight:700;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;}
.t3yt-affiliate-grid-cta{font-size:11px;color:#ddd;white-space:nowrap;}
.t3yt-affiliate-grid-ad:hover .t3yt-affiliate-grid-cta{text-decoration:underline;}

/* v1.8.3: restore original centered affiliate tile with white background. */
.t3yt-root .t3yt-grid > .t3yt-affiliate-grid-ad {
  background:#fff!important;color:#171717!important;
}
.t3yt-root .t3yt-affiliate-grid-ad .t3yt-affiliate-grid-name {color:#171717!important;}
.t3yt-root .t3yt-affiliate-grid-ad .t3yt-affiliate-grid-cta {color:#252525!important;}
.t3yt-root .t3yt-affiliate-grid-ad .t3yt-affiliate-grid-placeholder {color:#555!important;}
.t3yt-root .t3yt-affiliate-grid-ad .t3yt-ad-label {background:#fff!important;color:#333!important;}
.t3yt-root .t3yt-affiliate-grid-ad .t3yt-affiliate-grid-image img {object-fit:contain!important;}
