/* themes/base.css */

/* =========================================================
   1. GLOBALE VARIABLER OG GRUNNOPPSETT
   ========================================================= */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #004b79;
    --accent-color: #e60000;
    --text-dark: #004b79;
    --text-light: #ffffff;
    --font-main: Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* Forhindrer scrollbars på TV-utgangen */
    font-family: var(--font-main);
    background-color: transparent; /* Klar for OBS/vMix alpha channel */
}

/* Skjuler elementer mykt */
.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* =========================================================
   2. SCOREBOARD OG KLOKKE
   ========================================================= */
.scoreboard-container {
    position: absolute;
    top: 50px;
    left: 50px;
    display: flex;
    align-items: stretch;
    height: 50px;
    font-family: var(--font-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
}

.team-box {
    background-color: var(--bg-primary);
    color: var(--text-dark);
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 24px;
    text-transform: uppercase;
}

.score-box {
    background-color: var(--bg-secondary);
    color: var(--text-light);
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-weight: 900;
    font-size: 28px;
}

.scoreboard-clock {
    background-color: #000000;
    color: #ffffff;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
}

/* =========================================================
   3. NAVNESKILT (LOWER THIRD)
   ========================================================= */
.lt-container {
    position: absolute;
    bottom: 100px; /* Plassert over tickeren */
    left: 100px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
    border-radius: 8px;
    overflow: hidden;
}

.lt-image-container {
    width: 120px;
    height: 120px;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lt-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lt-text-group {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    padding: 20px 40px;
    height: 120px;
    box-sizing: border-box;
    justify-content: center;
    border-left: 8px solid var(--accent-color);
}

.lt-name-text {
    color: var(--text-light);
    font-size: 42px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 5px;
    line-height: 1;
}

.lt-title-text {
    color: var(--text-light);
    font-size: 24px;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1;
}

/* =========================================================
   4. PUBLIKUM Q&A
   ========================================================= */
.qna-container {
    position: absolute;
    bottom: 100px;
    right: 100px;
    width: 500px;
    background-color: var(--bg-primary);
    border-top: 10px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qna-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
}

.qna-question {
    font-size: 28px;
    font-weight: 500;
    color: #333333;
    line-height: 1.4;
}

/* =========================================================
   5. BUGS (CORNER LOGO & DIREKTE)
   ========================================================= */
.corner-logo {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 150px;
    height: 80px;
    background-size: contain;
    background-position: right top;
    background-repeat: no-repeat;
    z-index: 200;
}

.direkte-bug-base {
    position: absolute;
    top: 50px;
    right: 220px; /* Plassert til venstre for kanallogoen */
    background-color: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 200;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.direkte-dot {
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* =========================================================
   6. NYHETSTICKER
   ========================================================= */
.ticker-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 60px;
    background-color: var(--bg-secondary);
    color: var(--text-light);
    display: flex;
    align-items: stretch;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
}

.ticker-side-block {
    background-color: var(--accent-color);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

.ticker-scroll-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-scroll-content {
    white-space: nowrap;
    font-size: 24px;
    font-weight: 500;
    padding-right: 100px;
    will-change: transform; /* Ytelsesoptimalisering for animasjon */
}

/* =========================================================
   7. RULLETEKST (CREDITS)
   ========================================================= */
.credit-logo-img {
    max-width: 300px;
    max-height: 150px;
    display: block;
    margin: 30px auto; /* Gir god plass rundt logoen i rulleteksten */
    object-fit: contain;
}