/*
   RPD InnoTech Projects - Blue Cover Six app
   Copyright (c) 2026 Blue Cover Six LLC / John Molt
   An unlimited license is granted to the Reno Police Department
   and the City of Reno in perpetuity.

   06/19/2026 8:12 AM

   wwwroot/styles/app.css

   Layout primitives and shell structure. Component-specific CSS
   (cards, form modal, FAB, dialog, collapsible) lives in each
   component's own style block per BUS section 7.

   Token source: theme.css must load before this file.
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------------------------------------------------------------
   HEADER - mobile-first
   Three pieces: left text block, center RPD badge, right hamburger.
   On mobile the badge is absolutely centered so its centering is
   independent of the side cells. At 600px+ we switch to a 3-column grid.
*/
header {
    background: var(--dark);
    border-bottom: 2px solid var(--cyan-dim);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 60px;
}

.header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.header-title-main {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    font-size: 16px;
    letter-spacing: 1.5px;
}

.header-title-main span {
    color: var(--cyan);
}

.header-subtitle {
    font-family: var(--font-mono);
    color: var(--gray);
    text-transform: uppercase;
    margin-top: 2px;
    font-size: 8px;
    letter-spacing: 1px;
}

.header-badge-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    pointer-events: none;
}

.header-badge-wrap img {
    height: 100%;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    max-height: 44px;
    min-height: 32px;
}

/* -------------------------------------------------------------------------
   MAIN
*/
main {
    flex: 1;
    width: 100%;
}

/* -------------------------------------------------------------------------
   GLOBAL FORM INPUTS
   Base styles for inputs used across the app. Component-specific
   overrides live in the component style blocks.
*/
input[type="text"],
input[type="email"],
input[type="password"],
select {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 8px 10px;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    border-color: var(--cyan-dim);
}

input::placeholder {
    color: var(--gray-dim);
}

/* -------------------------------------------------------------------------
   FOOTER
*/
footer {
    background: var(--dark);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray-dim);
    line-height: 1.8;
}

footer span {
    color: var(--cyan);
}

/* Hide Alpine-controlled elements before boot */
[x-cloak] { display: none !important; }

/* -------------------------------------------------------------------------
   DESKTOP - 600px and up
*/
@media (min-width: 600px) {
    header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .header-left  { justify-self: start; }
    .header-right { justify-self: end;   }

    .header-badge-wrap {
        position: static;
        top: auto; right: auto; bottom: auto; left: auto;
        margin: 0;
        width: auto;
        height: auto;
        justify-self: center;
        pointer-events: auto;
        justify-content: flex-end;
    }

    .header-title-main {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .header-subtitle {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .header-badge-wrap img {
        max-height: 52px;
        min-height: 36px;
    }
}