/* =========================================
   DISPLAY.CSS - FINAL FIX
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-color: #f0f2f5;
    --text-color: #1a1a1a;
    --header-bg: #ffffff;
    --header-text: #2c3e50;
    --card-bg: #ffffff;
    --card-text: #2c3e50;
    --sub-text: #6c757d;
    --shadow: 0 4px 20px rgba(0,0,0,0.05);
    --clock-bg: #f8f9fa;
    --empty-border: #e0e0e0;
    --empty-bg: rgba(255,255,255,0.4);
    --font-stack: 'Inter', sans-serif;
}

body.display-view {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 2vh 3vw;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-stack);
    display: flex;
    flex-direction: column;
}

.display-wrapper { width: 100%; height: 100%; display: flex; flex-direction: column; }

/* HEADER */
.top-bar {
    background: var(--header-bg);
    padding: 1.5vh 2vw;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; margin-bottom: 2vh;
    box-sizing: border-box;
}

#mainTitle { font-size: 3.5vh; font-weight: 800; color: var(--header-text); margin: 0; }

/* VÄDER & KLOCKA */
#weatherWidget {
    font-size: 3vh;
    font-weight: 700;
    color: var(--header-text);
    margin-right: 20px;
}

#clock { 
    font-size: 4.5vh; 
    font-weight: 900; 
    color: var(--header-text); 
    background: var(--clock-bg); 
    padding: 0.2vh 1.5vw; 
    border-radius: 8px; 
}

/* MARQUEE */
#marqueeContainer {
    display: none; 
    background: #ffeb3b; 
    color: #000; 
    padding: 1vh; 
    margin-bottom: 2vh; 
    border-radius: 8px; 
    font-weight: bold; 
    text-align: center; 
    font-size: 2.5vh; 
    box-shadow: var(--shadow);
}

/* GRID LAYOUT */
#mainContainer { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-evenly; }

.time-header-row, .display-row {
    display: grid;
    gap: 1.5vw;
    padding: 0 10px;
    align-items: stretch;
}

.display-row { margin-bottom: 1.2vh; min-height: 8vh; }
.time-header-row { margin-bottom: 1vh; }

.time-header {
    font-size: 2.2vh; font-weight: 700; color: var(--sub-text);
    text-transform: uppercase; letter-spacing: 1px; text-align: center;
}

/* KORT & ETIKETTER */
.station-label {
    background-color: var(--station-color, #fff); 
    color: var(--contrast-color, #000);
    font-size: 2.8vh; font-weight: bold; border-radius: 12px;
    display: flex; align-items: center; justify-content: flex-start;
    padding-left: 1.5vw; box-shadow: var(--shadow); height: 100%;
    border-left: 8px solid rgba(0,0,0,0.1); 
}

.shift-card {
    background-color: var(--card-bg);
    color: var(--card-text);
    border-radius: 12px;
    font-size: 3vh;
    font-weight: 700;
    box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    text-align: center; height: 100%;
    border-bottom: 4px solid var(--station-color, transparent);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shift-card.empty {
    background-color: var(--empty-bg) !important;
    border: 2px dashed var(--empty-border) !important;
    box-shadow: none !important;
    color: transparent;
    border-bottom: none;
}

/* TOAST (Popup) */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 10000; pointer-events: none; }
.toast {
    background-color: #333; color: #fff; padding: 12px 24px; border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); opacity: 0; transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s; font-weight: 500; margin-top: 10px;
    pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background-color: #4CAF50; border-left: 5px solid #2E7D32; }
.toast.error   { background-color: #f44336; border-left: 5px solid #c62828; }
.toast.info    { background-color: #2196F3; border-left: 5px solid #1565C0; }
