/* Canal Motor Jukeboks: original 2004–2013 PowerPoint broadcast artwork */
*{box-sizing:border-box}
html{background:#000824}
body{margin:0;color:#f5f9ff;font-family:Arial,Helvetica,sans-serif;background:#000824}
.broadcast{position:relative;width:min(100%,1440px);aspect-ratio:4/3;margin:0 auto;overflow:hidden;background:#00103b url('/canal-motor-original.jpg?v=20261028ny') center center/100% 100% no-repeat;box-shadow:0 0 35px #0068cb}
.tv-layout{position:absolute;inset:0;display:block;margin:0;padding:0}
.left-side,.right-side{display:contents}
.screen-frame{position:absolute;left:1.05%;top:1.55%;width:69.35%;height:64.0%;margin:0;border:0;background:#000;overflow:hidden}
.screen-frame video{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.screen-corner{display:none}
.brand-panel{position:absolute;top:2.5%;right:1.0%;width:27.2%;height:13.2%;background:linear-gradient(155deg,#eafaff 0%,#b5ecf7 62%,#d8f8ff 100%);display:flex;align-items:center;justify-content:center;overflow:hidden;clip-path:polygon(0 0,100% 0,100% 100%,12% 100%,0 77%)}
.brand-panel::after{content:"";position:absolute;inset:0;border-bottom:2px solid #1e6ac0;pointer-events:none}
.brand-panel::before{content:"";position:absolute;inset:0;background:url("/canal-motor-logo-current.png") center/contain no-repeat;z-index:1}
.brand-logo,.brand-stripes{display:none} /* current logo overlaid above old logo */
.chat-panel{position:absolute;top:18.3%;left:74.5%;width:24.2%;height:75.2%;overflow:hidden;background:transparent;border:0;padding:0}
.chat-title{display:none}
.chat-messages{height:100%;overflow:hidden;padding:1.2% 2.8%;font-size:clamp(11px,1.5vw,20px);line-height:1.27}
.chat-item{margin:0 0 1em;background:transparent}
.chat-nickname{font-weight:700;background:linear-gradient(90deg,#075aa7,#064090);padding:.25em .5em}
.chat-item p{margin:.35em .5em .3em;overflow-wrap:anywhere}
.chat-empty{padding:.7em;font-size:.85em;color:#d4edff}
.chat-note{display:none}
.playlist-panel{position:absolute;top:70.5%;left:3.1%;width:67.3%;height:23.5%;background:transparent;border:0;overflow:hidden;padding:0}
.playlist-heading{height:19%;display:flex;align-items:center;gap:1.1%;font-size:clamp(11px,1.6vw,23px);white-space:nowrap}
.playlist-heading h2{margin:0;font-size:1em;font-weight:700}
.playlist-heading small{font-size:1em}
.circle-icon,.poll-icon{color:#4ee4ff}
.vote-instruction{font-size:.7em;margin-left:1%;color:#d9eaff}
.playlist-list{position:relative;margin-top:1.1%;height:78%;width:90%;overflow:hidden;border:1px solid #0871c6;background:rgba(0,5,52,.40)}
.video-row{display:flex;align-items:center;min-height:22%;padding:.3em .8em;gap:.6em;font-size:clamp(10px,1.35vw,19px);border-bottom:1px solid rgba(27,115,221,.5);background:rgba(0,23,95,.48)}
.video-row:nth-child(even){background:rgba(0,80,168,.40)}
.video-row.active{color:#a3ff4d;background:rgba(0,55,133,.68)}
.play-indicator{font-size:.9em;color:#71d9ff}
.video-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.video-status{font-size:.7em;white-space:nowrap;color:#c9e5ff}
.empty-state{margin:.6em}
.rally-decoration{display:none}
#mms-gallery{position:absolute;top:76.2%;left:75.0%;width:23.3%;height:17.4%;background:rgba(0,14,73,.30);border:0;padding:0;overflow:hidden}
.mms-heading{display:none}
.mms-grid{display:grid;grid-template-columns:1fr 1fr;gap:7%;height:100%;padding:3% 4%}
.mms-slot{min-width:0;text-align:center;font-size:clamp(9px,1.05vw,15px);font-weight:700}
.mms-slot img{display:block;width:100%;height:78%;object-fit:cover;border:2px solid #26b6f8;background:#001238}
.mms-slot div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-top:.25em}
.ticker{position:absolute;left:0.7%;right:0.7%;bottom:.75%;height:3.4%;border:0;overflow:hidden;display:flex;align-items:center;background:rgba(0,3,29,.75);font-size:clamp(10px,1.4vw,20px);white-space:nowrap}
.flag{display:none}
.ticker-window{overflow:hidden;width:100%}
.ticker-moving{display:inline-block;white-space:nowrap;padding-left:100%;animation:cm-marquee 34s linear infinite}
@keyframes cm-marquee{to{transform:translateX(-100%)}}
@media(max-width:680px){.broadcast{width:100%;min-width:0}.chat-messages{font-size:1.7vw}.video-row{font-size:1.6vw}.playlist-heading{font-size:1.6vw}.video-status{display:none}.mms-slot{font-size:1.3vw}.ticker{font-size:1.5vw}}
@media(prefers-reduced-motion:reduce){.ticker-moving{animation:none;padding-left:0}}

/* TV-retting: beholder originalgrafikkens koordinater */
.playlist-panel{left:2.8%;top:70.0%;width:21.8%;height:23.8%;padding:0 1% 0 0}
.playlist-heading{height:16%;font-size:clamp(10px,1.25vw,18px);gap:4px}
.playlist-heading small{font-size:.76em}
.vote-marquee{height:15%;overflow:hidden;white-space:nowrap;font-size:clamp(9px,1vw,14px);background:rgba(0,14,58,.55);color:#e6f4ff}
.vote-marquee span{display:inline-block;padding-left:100%;animation:cm-marquee 23s linear infinite}
.playlist-list{margin-top:1%;height:67%;width:100%;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#39bfff #001842}
.video-row{min-height:25%;font-size:clamp(9px,1.05vw,15px);padding:.25em .4em;gap:.3em}
.video-status{display:none}
#mms-gallery{top:71.6%;left:29.0%;width:41.4%;height:21.8%;background:transparent;padding:0;border:0}
.mms-grid{height:100%;padding:2% 5% 2% 8%;gap:5%}
.mms-slot img{height:81%;object-fit:contain}
.chat-panel{top:18.3%;left:74.5%;width:24.2%;height:75.2%}
.chat-messages{height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#39bfff #001842}
@media(max-width:680px){.playlist-heading{font-size:1.3vw}.vote-marquee{font-size:1.1vw}.video-row{font-size:1.1vw}}

/* Canal Motor - korrigert TV-plassering */

/* Dekk gammel logo helt */
.brand-panel {
  top: 0;
  right: 0;
  width: 29%;
  height: 18.2%;
  clip-path: none;
  background: linear-gradient(145deg,#c8eff9,#8bc9e6);
}
.brand-panel::before {
  background-image: url('/canal-motor-logo-current.png');
  background-position: center;
  background-size: 92% auto;
  background-repeat: no-repeat;
}

/* Videoliste høyere opp med scrolling */
.playlist-panel {
  top: 69%;
  left: 2.8%;
  width: 21.8%;
  height: 24.5%;
}
.playlist-list {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

/* MMS i BILDER-feltet */
#mms-gallery {
  top: 71.6%;
  left: 29%;
  width: 41.4%;
  height: 21.8%;
}

/* Chat langs hele høyresiden */
.chat-panel {
  top: 18.3%;
  left: 74.5%;
  width: 24.2%;
  height: 75.2%;
}


/* Canal Motor TV: rettet plassering */
.cm-vote-strip {
    position: absolute;
    left: 1%;
    top: 66%;
    width: 69.5%;
    height: 4%;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: transparent;
    color: white;
    z-index: 5;
    white-space: nowrap;
    font-size: clamp(10px, 1.35vw, 19px);
}

.cm-vote-moving {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: cm-vote-scroll 25s linear infinite;
}

@keyframes cm-vote-scroll {
    to { transform: translateX(-100%); }
}

/* Fjern gammel overskrift og gammel rulletekst */
.playlist-heading,
.vote-marquee {
    display: none !important;
}

/* Videolisten i AVSTEMMING-feltet */
.playlist-panel {
    top: 73%;
    left: 3%;
    width: 21.5%;
    height: 20.5%;
    overflow: hidden;
}

.playlist-list {
    height: 100%;
    width: 100%;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* MMS-bilder i BILDER-feltet */
#mms-gallery {
    top: 72%;
    left: 29%;
    width: 41.4%;
    height: 21.5%;
}

/* Chat: kun meldinger fra admin og SMS */
.chat-panel {
    top: 18.3%;
    left: 74.5%;
    width: 24.2%;
    height: 75.2%;
}

.chat-note,
.chat-title,
.chat-panel input,
.chat-panel textarea,
.chat-panel button {
    display: none !important;
}

/* CANAL MOTOR – logo på original TV-grafikk */
.brand-panel {
    position: absolute !important;
    top: 2.0% !important;
    right: 2.5% !important;
    width: 23% !important;
    height: 11.5% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    clip-path: none !important;
    overflow: visible !important;
    z-index: 10;
}

.brand-panel::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: url('/canal-motor-logo-current.png')
                center center / contain no-repeat !important;
}

.brand-panel::after {
    display: none !important;
}

/* Behold original TV-bakgrunn */
.broadcast {
    background-image: url('/canal-motor-original.jpg?v=20261028ny') !important;
}

/* Chatten viser bare meldinger */
.chat-panel input,
.chat-panel textarea,
.chat-panel button {
    display: none !important;
}


/* Skjul gammel logo og CMC 1933 i TV-grafikken */
.brand-panel {
    top: 0 !important;
    right: 0 !important;
    width: 29% !important;
    height: 18% !important;
    background: linear-gradient(
        160deg,
        #d9f5ff 0%,
        #b8edfa 55%,
        #d7f6ff 100%
    ) !important;
    clip-path: polygon(
        0 0,
        100% 0,
        100% 100%,
        12% 100%,
        0 77%
    ) !important;
    overflow: hidden !important;
}

.brand-panel::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: url('/canal-motor-logo-current.png')
                center center / 78% auto no-repeat !important;
    z-index: 2;
}

.brand-panel::after {
    display: none !important;
}


/* Fjern ekstra bakgrunnsplate bak logo */
.brand-panel { background: transparent !important; clip-path: none !important; }
