/* PlayNorio Discovery CSS V2.9
   Scoped to /releases, /live and /deals only. Does not target global navigation,
   video players, adverts, admin, home, profiles or footer. Loaded AFTER V2.8. */

/* Consistent sizing, typography and clipping of long source labels. */
body[data-page="releases"] :is(.release-tools,.contenttop,.release-list,#calendar-container),
body[data-page="deals"] :is(.deal-search,.contenttop,.deal-layout),
body[data-pn63-route="live.html"] :is(.live-top,.live-section,.live-layout,.live-state){
  width:100%;max-width:100%;min-width:0;
}
body[data-page="releases"] :is(.release-tools,.contenttop,.release-list) *,
body[data-page="deals"] :is(.deal-search,.contenttop,.deal-layout) *,
body[data-pn63-route="live.html"] :is(.live-top,.live-section,.live-layout,.live-state) *{
  box-sizing:border-box;min-width:0;
}

/* Release Radar: predictable filter layout and flexible action buttons. */
body[data-page="releases"] .release-tools{
  display:grid;grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,1fr));
  gap:14px;align-items:end;margin:22px 0 24px;
}
body[data-page="releases"] .release-tools .field,
body[data-page="deals"] .deal-search .field{width:100%;min-width:0}
body[data-page="releases"] .release-tools :is(input,select),
body[data-page="deals"] .deal-search :is(input,select){
  width:100%;max-width:100%;min-height:46px;line-height:1.35;
}
body[data-page="releases"] .contenttop,
body[data-page="deals"] .contenttop{align-items:flex-start;gap:14px;margin:20px 0}
body[data-page="releases"] .contenttop h2,
body[data-page="deals"] .contenttop h2{
  margin:0 0 6px;line-height:1.25;overflow-wrap:anywhere;
}
body[data-page="releases"] .contenttop .filters{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
}
body[data-page="releases"] .contenttop .filters .smalltab{
  min-height:42px;display:inline-flex;justify-content:center;align-items:center;
  padding:9px 14px;line-height:1.3;white-space:normal;text-align:center;
}
body[data-page="releases"] .release-list{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
body[data-page="releases"] .release-list[hidden]{display:none!important}
body[data-page="releases"] .release{
  display:grid;grid-template-columns:76px minmax(0,1fr) minmax(155px,auto);
  align-items:start;gap:18px;margin:0;max-width:100%;
}
body[data-page="releases"] .release > :nth-child(2){min-width:0;overflow-wrap:anywhere}
body[data-page="releases"] .release :is(h3,p,a){overflow-wrap:anywhere}
body[data-page="releases"] .release .datedisc{
  min-width:0;width:76px;min-height:76px;padding:9px 5px;text-align:center;
}
body[data-page="releases"] .release .right{
  display:flex;flex-direction:column;align-items:stretch;gap:9px;
  justify-content:flex-start;min-width:0;
}
body[data-page="releases"] .release .right :is(a,button){
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;
  max-width:100%;text-align:center;white-space:normal;line-height:1.4;
}
body[data-page="releases"] #release-list > .empty{
  border:1px solid #385b6c;border-radius:16px;padding:25px;
  background:linear-gradient(140deg,#122c39,#0b202e);color:#c7dce5;
  min-height:0;max-width:100%;line-height:1.7;
}
/* The calendar needs seven usable columns, not microscopic dates on phones. */
body[data-page="releases"] #calendar-container{max-width:100%;min-width:0}
body[data-page="releases"] .calendar-header{gap:12px;flex-wrap:wrap}
body[data-page="releases"] .calendar :is(.day,.dayhead){min-width:0;overflow-wrap:anywhere}

/* Live Hub: sensible cards, wrapped labels and clear source-status panels. */
body[data-pn63-route="live.html"] .live-top{
  display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:18px;align-items:stretch;
}
body[data-pn63-route="live.html"] .live-banner{
  min-width:0;padding:clamp(20px,2.4vw,30px);
}
body[data-pn63-route="live.html"] .live-banner h2{
  font-size:clamp(22px,2.5vw,31px);line-height:1.2;overflow-wrap:anywhere;
}
body[data-pn63-route="live.html"] .live-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body[data-pn63-route="live.html"] .live-kpi{min-width:0;padding:clamp(14px,1.5vw,20px);overflow-wrap:anywhere}
body[data-pn63-route="live.html"] .live-kpi strong{line-height:1.2;font-size:clamp(20px,2.2vw,28px)}
body[data-pn63-route="live.html"] .live-section-head{
  display:flex;flex-wrap:wrap;gap:12px;align-items:baseline;
}
body[data-pn63-route="live.html"] .live-section-head h2{margin:0;line-height:1.3;overflow-wrap:anywhere}
body[data-pn63-route="live.html"] .live-layout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
body[data-pn63-route="live.html"] .live-locked{
  min-height:0;grid-column:1/-1;padding:24px;overflow-wrap:anywhere;
}
body[data-pn63-route="live.html"] .live-state{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body[data-pn63-route="live.html"] .live-state article,
body[data-pn63-route="live.html"] .live-item{min-width:0;overflow-wrap:anywhere}
body[data-pn63-route="live.html"] .live-section > .pn61-card{max-width:100%;margin-top:14px}

/* PC Deals: consistent search controls and properly contained empty state. */
body[data-page="deals"] .deal-search{
  display:grid;grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,1fr));
  gap:14px;align-items:end;
}
body[data-page="deals"] .deal-layout{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;align-items:stretch;margin:18px 0 35px;
}
body[data-page="deals"] .deal-card{min-width:0;height:100%;overflow-wrap:anywhere}
body[data-page="deals"] .deal-card .row{min-width:0;flex-wrap:wrap;gap:10px}
body[data-page="deals"] .deal-card .bottom a{min-height:44px;display:grid;place-items:center;line-height:1.4}
body[data-page="deals"] .deal-empty{
  display:block;grid-column:1/-1;margin:0;min-height:0;
  width:100%;max-width:100%;padding:28px 30px;overflow-wrap:anywhere;
  border:1px solid #3b6071;border-radius:16px;
  background:linear-gradient(140deg,#102b3b,#0d2130);color:#c8dfe6;
}
body[data-page="deals"] .deal-empty strong{color:#f5fcfe;line-height:1.4}
body[data-page="deals"] #deal-status{overflow-wrap:anywhere;line-height:1.7}

@media(max-width:1020px){
  body[data-pn63-route="live.html"] .live-top{grid-template-columns:minmax(0,1fr)}
  body[data-pn63-route="live.html"] .live-state{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-page="deals"] .deal-layout{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-page="releases"] .release{grid-template-columns:76px minmax(0,1fr)}
  body[data-page="releases"] .release .right{
    grid-column:2;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;
  }
  body[data-page="releases"] .release .right :is(a,button){flex:0 1 auto}
}
@media(max-width:760px){
  body[data-page="releases"] .release-tools,
  body[data-page="deals"] .deal-search{
    grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
  }
  body[data-page="releases"] .release-tools > :first-child,
  body[data-page="deals"] .deal-search > :first-child{grid-column:1/-1}
  body[data-page="releases"] .contenttop .filters{width:100%}
  body[data-pn63-route="live.html"] .live-layout{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  body[data-page="releases"] .release-tools,
  body[data-page="deals"] .deal-search{grid-template-columns:minmax(0,1fr);gap:12px}
  body[data-page="releases"] .release-tools > :first-child,
  body[data-page="deals"] .deal-search > :first-child{grid-column:auto}
  body[data-page="releases"] .release{grid-template-columns:62px minmax(0,1fr);gap:12px;padding:16px}
  body[data-page="releases"] .release .datedisc{width:62px;min-height:65px;padding:7px 4px}
  body[data-page="releases"] .release .datedisc strong{font-size:23px}
  body[data-page="releases"] .release .right{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  body[data-page="releases"] .release .right :is(a,button){width:100%;min-height:44px}
  body[data-page="releases"] #calendar-container{overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:8px}
  body[data-page="releases"] #calendar-container :is(.calendar,.calendar-header){min-width:630px}
  body[data-page="releases"] .calendar .day{min-height:76px;padding:8px}
  body[data-page="releases"] .calendar .day small{font-size:10px}
  body[data-pn63-route="live.html"] .live-layout,
  body[data-pn63-route="live.html"] .live-state,
  body[data-page="deals"] .deal-layout{grid-template-columns:minmax(0,1fr)}
  body[data-pn63-route="live.html"] .live-banner{padding:20px}
  body[data-pn63-route="live.html"] .live-locked,
  body[data-page="deals"] .deal-empty{padding:20px}
  body[data-pn63-route="live.html"] .live-kpis{gap:9px}
  body[data-pn63-route="live.html"] .live-kpi{padding:13px}
  body[data-page="releases"] .contenttop .filters .smalltab{flex:1 1 125px}
}
@media(prefers-reduced-motion:reduce){
  body[data-page="releases"] #calendar-container{scroll-behavior:auto}
}
