/*
CSS for etf_dashboard
    Version: 1.2.250707
*/

body {
    width 100vw;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

.top-banner {
    background-color: black;
    color: white;
    text-align: center;
    padding: 1em;
    font-size: 2em;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dashboard-content {
    width: 100vw;            /* 100% ?  */
    margin: 0;
}

.league-banner {
    width: 100vw;
    box-sizing: border-box;
    background-color: maroon;
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    padding: 0.5em;
    margin-top: 1em;
    text-align: center; /* Center league titles */
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    padding: 1em;
}

.panel {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 350px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 0.5em;
    font-weight: bold;
    font-size: 1.1em;
    text-align: left;
}

.panel-footer {
    background-color: #fff;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em;
    border-top: 1px solid #ddd;
    font-weight: bold;
}

.stock-even-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.4em 0;
    border-bottom: 1px solid #eee;
    padding: 0 0.5em;
    background-color: azure;
}

.stock-odd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.4em 0;
    border-bottom: 1px solid #eee;
    padding: 0 0.5em;
}

.stock-name {
    flex: 1;
    font-size: 0.95em;
}

.stock-change {
    display: flex;
    align-items: center;
    font-size: 0.95em;
}

.change-indicator {
    margin-right: 0.3em;
    font-size: 1em;
}

.change-indicator.up {
    color: green;
}

.change-indicator.down {
    color: red;
}

.change-indicator.no-data {
    color: gray;
}

/* Ticker Container */

.top-banner {
    width: 100%;
    background-color: black;
    overflow: hidden;
    height: 1.8em;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0;
}


/* Push main content down below fixed ticker */
.dashboard-content {
    margin-top: 3.5em;   /* same height as .top-banner */
}



/* Ticker Text */

.ticker-text {
    display: inline-block;
    color: limegreen;
    font-size: 1.5em;
    font-family: Arial, sans-serif;
    margin-right: 4rem;               /* spacing between repeats */
}



/* Mobile responsiveness */


@media (max-width: 768px) {

    .dashboard-content {
        margin-top: 2.75em;           /* push content below ticker */
    }

    /* Ticker Text */
    .ticker-text {
        font-size: 1.0em;
    }

    .container {
        display: flex;                /* ensure flex */
        flex-direction: column;       /* stack vertically */
        flex-wrap: nowrap;            /* no wrapping */
        align-items: stretch;         /* stretch children */
        justify-content: center;
        /* gap: 0.75em; */
        padding: 1em;
    }

    .panel {
        width: 100%;
    }

    .stock-row {
        flex-direction: column;
        align-items: flex-start;
        /* margin-bottom: 0.25em; */
        padding-left: 1.25em;
        padding-right: 1.25em;
    }

    .stock-name {
        font-size: 0.5em;
        font-weight: 600;
        /* margin-bottom: 0.5em; */
        text-align: left;
    }

    .stock-change {
        margin-top: 0;
        font-size: 0.5em;
        display: flex;
        align-items: center;
    }

    .panel-header, .panel-footer {
        text-align: left;
        font-size: 0.8em;
        padding-left: 0.8em;
        padding-right: 0.8em;
    }

    .top-banner {
        font-size: 1.3em;
        height: 2.2em;
    }

    .league-banner {
        font-size: 1.2em;
    }
}