/* TiviLux original WebApp: fourth guide row and provider VOD library */
.vod-page{padding:20px;max-width:1450px;margin:auto}.vod-filters{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.vod-filters select,.vod-filters input{min-width:180px;flex:1;background:#101720;color:#fff;border:1px solid #303743;border-radius:10px;padding:12px}.vod-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:14px}.vod-grid .card{min-width:0}.vod-pages{display:flex;justify-content:center;align-items:center;gap:18px;padding:22px}.vod-episodes{display:grid;gap:8px;max-height:55vh;overflow-y:auto}.vod-episodes button{text-align:left;padding:12px;border:1px solid #343943;background:#111720;color:white;border-radius:8px}.vod-detail{max-height:75vh;overflow-y:auto}.vod-detail h3{margin-top:20px}
@media(min-width:701px){.guide-v22-body .guide-scroll{min-height:343px!important;max-height:max(440px,calc(100dvh - 255px))!important}}

/* Scoped VOD cards: prevent legacy rail card sizing from collapsing poster columns. */
.vod-page .vod-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:22px 16px;align-items:start;width:100%}
.vod-page .vod-grid>.card{display:block;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;flex:none;overflow:visible}
.vod-page .vod-grid>.card>.card-open{display:block;width:100%!important;min-width:0;padding:0!important;text-align:left;overflow:visible}
.vod-page .vod-grid .art{display:block;position:relative;width:100%!important;height:auto!important;aspect-ratio:2/3;overflow:hidden;border-radius:12px;background:#141923}
.vod-page .vod-grid .art img{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;object-fit:cover}
.vod-page .vod-grid .art>span{position:absolute;inset:0;display:grid;place-items:center}
.vod-page .vod-grid .art:has(img)>span{display:none}
.vod-page .vod-grid .card-caption{display:block;width:100%;min-width:0;padding:10px 2px 0}
.vod-page .vod-grid .card-caption h3{display:block;width:100%;min-width:0;margin:0;font-size:14px;line-height:1.4;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vod-page .vod-grid .card-caption p{display:block;width:100%;margin:5px 0 0;font-size:12px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:600px){.vod-page .vod-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.vod-page .vod-grid .card-caption h3{font-size:13px}}

/* Cinematic VOD detail page, scoped to the existing modal. */
.vod-detail.cinematic{width:min(1050px,85vw);max-height:78vh;overflow:auto;color:#fff}
.vod-hero{background-color:#10131b;background-size:cover;background-position:center;border-radius:16px;min-height:330px;display:flex;align-items:flex-end}
.vod-hero-inner{display:flex;gap:25px;align-items:center;padding:30px;width:100%;background:linear-gradient(0deg,rgba(7,9,14,.95),transparent)}
.vod-detail-poster{width:170px;aspect-ratio:2/3;object-fit:cover;border-radius:12px;flex-shrink:0}
.vod-hero-copy{min-width:0;flex:1}.vod-hero-copy h2{font-size:clamp(25px,3vw,42px);margin:8px 0}.vod-hero-copy p{line-height:1.55;max-width:720px}.vod-meta{display:flex;flex-wrap:wrap;gap:12px;color:#e5c98c}.vod-credits{font-size:13px;color:#bec3cf}
.vod-seasons{padding:22px}.vod-season{margin:12px 0;border:1px solid #32343b;border-radius:10px;padding:12px}.vod-season summary{cursor:pointer;font-weight:700}.vod-episodes button{display:flex;align-items:center;gap:14px;width:100%}.vod-episodes button span{display:flex;flex-direction:column;gap:4px;flex:1}.vod-episodes button small{font-size:12px;color:#aeb6c3}.episode-art{width:100px;height:60px;object-fit:cover;border-radius:6px}
@media(max-width:650px){.vod-detail.cinematic{width:90vw}.vod-hero-inner{padding:15px;gap:12px}.vod-detail-poster{width:85px}.vod-hero{min-height:260px}.vod-seasons{padding:12px}}

/* VOD-only dialog sizing and safe wrapping. Does not affect player dialogs. */
#dialog:has(> .vod-detail.cinematic){box-sizing:border-box;width:min(1060px,calc(100vw - 48px))!important;max-width:calc(100vw - 48px)!important;max-height:min(88dvh,900px)!important;overflow-y:auto;overflow-x:hidden;padding:20px!important}
#dialog:has(> .vod-detail.cinematic)>.dialog-close{position:sticky;top:0;float:right;margin:0 0 -42px 0;z-index:20}
#dialog>.vod-detail.cinematic{box-sizing:border-box;display:block;width:100%!important;max-width:100%!important;min-width:0;max-height:none!important;overflow:visible!important;clear:both}
#dialog .vod-detail .vod-hero{min-width:0;width:100%;overflow:hidden}
#dialog .vod-detail .vod-hero-inner{box-sizing:border-box;min-width:0;max-width:100%;align-items:center}
#dialog .vod-detail .vod-hero-copy{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
#dialog .vod-detail .vod-hero-copy h2{max-width:100%;overflow-wrap:anywhere;white-space:normal;line-height:1.12}
#dialog .vod-detail .vod-hero-copy p,#dialog .vod-detail .vod-credits{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#dialog .vod-detail .vod-meta{max-width:100%;white-space:normal;flex-wrap:wrap}
@media(max-width:700px){#dialog:has(> .vod-detail.cinematic){width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 24px)!important;margin:auto!important;padding:12px!important;border-radius:16px!important}#dialog .vod-detail .vod-hero-inner{flex-direction:column;align-items:flex-start;padding:18px 14px}#dialog .vod-detail .vod-detail-poster{width:110px}#dialog .vod-detail .vod-hero-copy h2{font-size:clamp(22px,6vw,32px)}#dialog .vod-detail .vod-hero{min-height:0}}
