/* ============================================================
   TBANav
   GLOBAL / APPLICATION CSS
   ============================================================

   Responsibilities:
   - Global reset
   - Body
   - Navigation Operations Centre header
   - TBA logo
   - Header metadata
   - Main application layout
   - Footer

   Dashboard-specific styling belongs in:
       dashboard.css

   River Level styling belongs in:
       tbanav-river-level-card-v1.css

   ============================================================ */


/* ============================================================
   1. GLOBAL RESET
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html,
body {
    min-height: 100%;
}


body {
    font-family: Arial, Helvetica, sans-serif;

    color: #102a50;

    background: #eef2f6;

    font-size: 13px;
}


a {
    text-decoration: none;
    color: inherit;
}


/* ============================================================
   2. NAVIGATION OPERATIONS CENTRE HEADER
   ============================================================ */

.frozen-header {
    width: 100%;

    height: 64px;
    min-height: 64px;
    max-height: 64px;

    box-sizing: border-box;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 0 20px 0 18px;

    background: #ffffff;

    border-bottom: 1px solid #dbe2ea;

    overflow: hidden;

    position: relative;

    z-index: 20;
}


/* ============================================================
   3. HEADER BRAND
   ============================================================ */

.frozen-brand {
    min-width: 0;

    height: 100%;

    display: flex;

    align-items: center;

    flex: 1 1 auto;

    overflow: hidden;
}


/* ------------------------------------------------------------
   TBA LOGO

   IMPORTANT:
   The logo is deliberately constrained here.

   The source image may contain transparent/canvas space,
   therefore both the container and rendered image are
   explicitly constrained.
   ------------------------------------------------------------ */

.frozen-tba-logo {
    width: 58px;
    height: 50px;

    min-width: 58px;
    max-width: 58px;

    min-height: 50px;
    max-height: 50px;

    flex: 0 0 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #ffffff;

    margin: 0;
    padding: 0;

    position: relative;
}


.frozen-tba-logo img {
    display: block;

    width: 46px;
    height: 46px;

    min-width: 46px;
    max-width: 46px;

    min-height: 46px;
    max-height: 46px;

    flex: none;

    object-fit: contain;

    object-position: center;

    margin: 0;
    padding: 0;

    border: 0;

    position: static;

    transform: none;
}


/* ============================================================
   4. HEADER DIVIDER
   ============================================================ */

.frozen-divider {
    width: 1px;
    height: 36px;

    min-width: 1px;

    flex: 0 0 1px;

    margin: 0 10px 0 7px;

    background: #b7c3d0;
}


/* ============================================================
   5. HEADER TITLE
   ============================================================ */

.frozen-heading {
    min-width: 0;

    overflow: hidden;

    flex: 1 1 auto;
}


.frozen-title {
    display: block;

    margin: 0;

    color: #073c82;

    font-size: 17px;

    line-height: 1.05;

    font-weight: 900;

    letter-spacing: .2px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.frozen-subtitle {
    display: block;

    margin-top: 3px;

    color: #153d70;

    font-size: 10px;

    line-height: 1.1;

    font-weight: 500;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* ============================================================
   6. HEADER META
   ============================================================ */

.frozen-meta {
    display: flex;

    align-items: center;

    gap: 14px;

    flex: 0 0 auto;

    white-space: nowrap;
}


.frozen-online,
.frozen-clock,
.frozen-source-button {
    display: flex;

    align-items: center;

    gap: 8px;
}


/* ------------------------------------------------------------
   Meta headings
   ------------------------------------------------------------ */

.frozen-online strong,
.frozen-clock strong,
.frozen-source-button strong {
    display: block;

    color: #064b26;

    font-size: 11px;

    line-height: 1.1;

    font-weight: 900;
}


.frozen-clock strong,
.frozen-source-button strong {
    color: #064b26;
}


/* ------------------------------------------------------------
   Meta secondary text
   ------------------------------------------------------------ */

.frozen-online small,
.frozen-clock small,
.frozen-source-button small {
    display: block;

    margin-top: 2px;

    color: #16355e;

    font-size: 9px;

    line-height: 1.1;
}


/* ============================================================
   7. STATUS DOT
   ============================================================ */

.dot {
    display: inline-block;

    width: 9px;
    height: 9px;

    flex: 0 0 9px;

    border-radius: 50%;
}


.dot.green,
.green-dot {
    background: #079658;
}


/* ============================================================
   8. HEADER DIVIDERS
   ============================================================ */

.frozen-meta-divider {
    width: 1px;
    height: 32px;

    flex: 0 0 1px;

    background: #c7d0da;
}


/* ============================================================
   9. HEADER ICONS
   ============================================================ */

.clock-icon,
.source-icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    color: #0a3e86;

    font-size: 21px;

    line-height: 1;

    flex: 0 0 auto;
}


/* ============================================================
   10. DATA SOURCES BUTTON
   ============================================================ */

.frozen-source-button {
    min-height: 40px;

    padding: 6px 11px;

    border: 1px solid #e0e6ed;

    border-radius: 8px;

    background: #ffffff;

    box-shadow: 0 2px 7px rgba(15, 40, 70, .05);

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.frozen-source-button:hover {
    border-color: #c4d0dc;

    box-shadow: 0 3px 9px rgba(15, 40, 70, .08);
}


/* ============================================================
   11. MAIN APPLICATION LAYOUT
   ============================================================ */

.operations-layout {
    width: 100%;

    min-height: calc(100vh - 64px);

    display: grid;

    grid-template-columns:
        240px
        minmax(0, 1fr);

    gap: 0;
}


/* ============================================================
   12. MAIN CONTENT
   ============================================================ */

.operations-content {
    min-width: 0;

    padding: 12px 16px 14px;
}


/* ============================================================
   13. DASHBOARD WIDTH
   ============================================================ */

.frozen-dashboard {
    width: 100%;

    max-width: none;

    margin: 0 auto;
}


/* ============================================================
   14. FOOTER
   ============================================================ */

.site-footer {
    min-height: 38px;

    box-sizing: border-box;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 26px;

    padding: 8px 12px;

    background: #06386d;

    color: #ffffff;

    font-size: 11px;

    line-height: 1.2;

    text-align: center;
}


.site-footer::before {
    content: '';
}


.site-footer p {
    margin: 0;
}


/* ============================================================
   15. MEDIUM DESKTOP
   ============================================================ */

@media (max-width: 1150px) {

    .frozen-header {
        padding-left: 12px;
        padding-right: 14px;

        gap: 12px;
    }


    .frozen-meta {
        gap: 10px;
    }


    .frozen-source-button {
        display: none;
    }


    .operations-layout {
        grid-template-columns:
            210px
            minmax(0, 1fr);
    }


    .operations-content {
        padding: 10px 12px;
    }


    .frozen-title {
        font-size: 15px;
    }


    .frozen-subtitle {
        font-size: 9px;
    }

}


/* ============================================================
   16. TABLET
   ============================================================ */

@media (max-width: 800px) {

    .frozen-header {
        height: auto;

        min-height: 64px;
        max-height: none;

        padding: 8px 12px;

        align-items: center;
    }


    .frozen-brand {
        height: 48px;
    }


    .frozen-tba-logo {
        width: 52px;
        min-width: 52px;
        max-width: 52px;

        height: 44px;
        min-height: 44px;
        max-height: 44px;

        flex-basis: 52px;
    }


    .frozen-tba-logo img {
        width: 40px;
        height: 40px;

        min-width: 40px;
        max-width: 40px;

        min-height: 40px;
        max-height: 40px;
    }


    .frozen-divider {
        height: 32px;

        margin-left: 5px;
        margin-right: 7px;
    }


    .frozen-title {
        font-size: 12px;

        white-space: normal;
    }


    .frozen-subtitle {
        font-size: 8px;

        white-space: normal;
    }


    .frozen-meta {
        display: none;
    }


    .operations-layout {
        display: block;

        min-height: auto;
    }


    .operations-content {
        padding: 10px;
    }


    .site-footer {
        min-height: auto;

        padding: 10px;

        flex-wrap: wrap;
    }

}


/* ============================================================
   17. SMALL MOBILE
   ============================================================ */

@media (max-width: 480px) {

    .frozen-header {
        min-height: 58px;

        padding: 7px 9px;
    }


    .frozen-brand {
        height: 44px;
    }


    .frozen-tba-logo {
        width: 46px;
        min-width: 46px;
        max-width: 46px;

        height: 40px;
        min-height: 40px;
        max-height: 40px;

        flex-basis: 46px;
    }


    .frozen-tba-logo img {
        width: 36px;
        height: 36px;

        min-width: 36px;
        max-width: 36px;

        min-height: 36px;
        max-height: 36px;
    }


    .frozen-divider {
        height: 28px;

        margin-left: 4px;
        margin-right: 6px;
    }


    .frozen-title {
        font-size: 10px;
    }


    .frozen-subtitle {
        font-size: 7px;

        margin-top: 2px;
    }


    .operations-content {
        padding: 8px;
    }

}