/* Definisjon av blinkanimasjon */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

/* UNIVERSAL REGEL: Sikrer at padding og border INKLUDERES i bredden/høyden */
* {
    box-sizing: border-box;
}

body {
    background-color: #000; 
    color: #FFF; 
    font-family: 'Arial', sans-serif; 
    margin: 0; 
    padding: 0; 
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Garanterer 100% av viewport dimensjoner, fjerner scrollbars */
    min-height: 100vh; 
    width: 100vw;
    overflow: hidden; 
}

/* --- Hovedinnhold (Gir tilbake paddingen innvendig for luft rundt innholdet) --- */
.header-bar, .departure-board-container, .footer-bar, .logo-center-bar {
    width: 95%; 
    max-width: 1880px; 
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Header og Klokke --- */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; 
    margin-top: 30px;
    margin-bottom: 20px;
}

h1 {
    font-size: 3em; 
    font-weight: bold;
    color: #FFD700; /* Gul/Gull */
}

.english-header {
    color: #FFF; 
    font-size: 0.8em;
    font-weight: normal;
    margin-left: 10px;
}

.clock {
    font-size: 3em; 
    color: #FFD700;
    padding: 0;
    font-weight: bold;
}

/* --- Tabell og Board --- */
.departure-board-container {
    flex-grow: 1; 
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.8em; 
}

th, td {
    padding: 15px 15px; 
    text-align: left;
    border-bottom: 1px solid #333; 
    white-space: nowrap; 
}

thead th {
    background-color: #000;
    color: #FFF;
    font-size: 0.8em; 
    text-transform: uppercase;
    font-weight: normal;
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Kolonnebredder for 6 kolonner */
.col-tid { width: 10%; }           
.col-flight-num { width: 15%; }    
.col-horse { width: 20%; }         
.col-destination { width: 25%; }   
.col-gate { width: 10%; }          
.col-status { width: 20%; }        

/* --- Rader og Status --- */

tbody tr {
    background-color: #000;
    color: #FFF; /* Standard tekstfarge for ikke-event rader */
}

/* --- Status som blinker (Gjelder kun SPAN-elementet inne i TD) --- */
.status-forsinket,
.status-take-off-show-pågår-,
.status-boarding-pågår { 
    /* Dette er SPAN-klassen som er isolert */
    font-weight: bold; 
    animation: blink 1s linear infinite; /* Animert opasitet */
}

/* Spesifikke blinkfarger (Må settes på SPAN) */
.status-forsinket { color: #FF9900; } 
.status-take-off-show-pågår- { color: #FF00FF; }
.status-boarding-pågår { color: #FFD700; } 


/* --- Øvrige statuser og styling --- */

/* Event-highlight (Uten blinking) */
.event-highlight {
    background-color: #1a1a1a !important; 
    font-weight: bold;
    border-top: 1px solid #FFD700;
    border-bottom: 1px solid #FFD700;
}
/* Setter farge på all TEKST i event-rader */
.event-highlight td {
    color: #FFD700 !important; 
}

/* Statuser uten blinking (Må settes på SPAN for å overstyre fargen i event-rader) */
.status-servering-pågår,
.status-bordning-fullført,
.status-underholdning-pågår { color: #FFD700; } 

.status-closed { color: #FF0000; } 
.status-sporbytte { color: #FFD700; font-weight: bold; }
.status-avgått { color: #999; font-style: italic; } 
.status-on-time { color: #FFF; }

/* Ikon Styling */
.horse-icon {
    color: #FFD700; 
    font-size: 0.8em; 
    margin-right: 8px; 
    font-weight: bold;
}

/* --- LOGO KONTEINER (SENTRERT) --- */
.logo-center-bar {
    width: 100%; 
    text-align: center; 
    padding-top: 20px; 
    padding-bottom: 10px; 
}

.footer-logo {
    height: 150px; 
    max-width: 100%; 
    object-fit: contain; 
}

/* --- Footer Bar --- */
.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; 
    padding-bottom: 10px; 
    margin-bottom: 10px; 
    font-size: 1.1em;
    color: #999;
}

.airport-name {
    font-size: 1.3em; 
    color: #FFD700; 
    font-weight: bold;
}

/* Media Query for mindre skjermer (kun for fallback) */
@media (max-width: 768px) {
    .header-bar, .departure-board-container, .footer-bar, .logo-center-bar {
        padding-left: 10px;
        padding-right: 10px;
    }
    h1 { font-size: 1.5em; letter-spacing: 2px; }
    .clock { font-size: 1.2em; }
    table { font-size: 1em; }
    th, td { padding: 10px 5px; }
}