/* =========================================================
   LOST DEVICE MAP

   GLOBAL RESPONSIVE STYLESHEET

   This file contains:

   - Global website styles
   - Header
   - Header logo
   - Navigation
   - Footer
   - Responsive desktop/tablet/mobile behaviour
   - Shared content logo styles

   Page-specific styles remain in the individual HTML pages.

   ========================================================= */


/* =========================================================
   GLOBAL RESET
   ========================================================= */

* {
    box-sizing: border-box;
}


html {
    margin: 0;
    padding: 0;
    width: 100%;
    scroll-behavior: smooth;
}


body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background: #f3f4f6;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    color: #111827;
    overflow-x: hidden;
}


/* =========================================================
   LINKS
   ========================================================= */

a {
    text-decoration: none;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    width: 100%;
    min-height: 72px;
    background: #111827;
    display: flex;
    align-items: center;
    padding:
        0 28px;
    position: relative;
    z-index: 100;
    box-sizing: border-box;
}


/* =========================================================
   HEADER WEBSITE LOGO

   Header logo:
       48px desktop

   It is kept separate from the larger logos used
   inside page content.
   ========================================================= */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}


/*
   Header logo container.

   Desktop:
   48px × 48px

   This matches the grumpy face size.
*/

.header-logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}


.header-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


/* =========================================================
   MAIN NAVIGATION
   ========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-wrap: nowrap;
}


.main-nav a {
    color: white;
    text-decoration: none;
    padding:
        9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.main-nav a:hover {
    background: #374151;
}


/* =========================================================
   LOGOUT FORM
   ========================================================= */

.logout-form {
    margin: 0;
    padding: 0;
    display: inline-flex;
}


.logout-button {
    color: #fecaca;
    background: transparent;
    border: none;
    padding:
        9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.logout-button:hover {
    background: #374151;
    color: #fee2e2;
}


/* =========================================================
   GRUMPY FACE
   ========================================================= */

.grumpy-face {
    margin-left: 14px;
    font-size: 30px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   MAIN PAGE CONTENT
   ========================================================= */

.page-content {
    width: 100%;
    min-height: 0;
}


/* =========================================================
   COMMON CONTENT LOGO

   These are deliberately LARGER than the header logo.

   Header logo:
       48px desktop
       43px mobile

   Content logo:
       Can be 60px, 80px, 110px, etc.

   ========================================================= */

.phone-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.phone-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


/* =========================================================
   CONTENT LOGO SIZES
   ========================================================= */

.phone-logo-small {
    width: 50px;
    height: 50px;
}


.phone-logo-medium {
    width: 65px;
    height: 65px;
}


.phone-logo-large {
    width: 85px;
    height: 85px;
}


.phone-logo-xl {
    width: 110px;
    height: 110px;
}


/* =========================================================
   COMMON CONTENT CARD
   ========================================================= */

.content-card {
    background: white;
    border:
        1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.07);
}


/* =========================================================
   COMMON BUTTON
   ========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding:
        10px 16px;
    border: none;
    border-radius: 9px;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition:
        background 0.2s ease,
        transform 0.1s ease;
}


.button:active {
    transform:
        translateY(1px);
}


/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.button-primary {
    background: #2563eb;
    color: white;
}


.button-primary:hover {
    background: #1d4ed8;
    color: white;
}


/* =========================================================
   SECONDARY BUTTON
   ========================================================= */

.button-secondary {
    background: #e5e7eb;
    color: #374151;
}


.button-secondary:hover {
    background: #d1d5db;
    color: #111827;
}


/* =========================================================
   COMMON FORM ELEMENTS
   ========================================================= */

input,
select,
textarea,
button {
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


input,
select,
textarea {
    max-width: 100%;
}


input:focus,
select:focus,
textarea:focus {
    outline: none;
}


/* =========================================================
   COMMON SITE FOOTER
   ========================================================= */

.site-footer {
    width: 100%;
    margin-top: 40px;
    padding:
        25px 20px;
    background: #111827;
    color: #d1d5db;
    text-align: center;
}


/* =========================================================
   FOOTER LINKS
   ========================================================= */

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 12px;
}


.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    transition:
        color 0.2s ease;
}


.footer-links a:hover {
    color: white;
    text-decoration: underline;
}


/* =========================================================
   FOOTER TEXT
   ========================================================= */

.footer-text {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}


/* =========================================================
   TABLET / SMALL LAPTOP

   Approx. 851px–1100px
   ========================================================= */

@media (max-width: 1100px) {

    .header {
        padding-left: 20px;
        padding-right: 20px;
    }


    .main-nav a,
    .logout-button {
        padding:
            8px 9px;
        font-size: 13px;
    }


    .grumpy-face {
        margin-left: 10px;
        font-size: 28px;
    }

}


/* =========================================================
   MOBILE / TABLET

   850px and below
   ========================================================= */

@media (max-width: 850px) {

    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    .header {
        min-height: auto;
        padding:
            10px 16px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }


    /* -----------------------------------------------------
       HEADER LOGO

       Same general size as the grumpy face.
       ----------------------------------------------------- */

    .logo {
        font-size: 18px;
        gap: 8px;
    }


    .header-logo-icon {
        width: 43px;
        height: 43px;
    }


    /* -----------------------------------------------------
       GRUMPY FACE
       ----------------------------------------------------- */

    .grumpy-face {
        margin-left: auto;
        font-size: 26px;
    }


    /* -----------------------------------------------------
       MOBILE NAVIGATION

       Navigation moves onto its own row.
       ----------------------------------------------------- */

    .main-nav {
        width: 100%;
        order: 3;
        margin-left: 0;
        margin-top: 10px;
        padding-top: 10px;
        border-top:
            1px solid #374151;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }


    .main-nav a,
    .logout-button {
        padding:
            8px 10px;
        font-size: 13px;
    }


    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    .site-footer {
        margin-top: 30px;
        padding:
            22px 16px;
    }


    .footer-links {
        gap: 12px;
    }


    .footer-links a {
        font-size: 13px;
    }


    .footer-text {
        font-size: 12px;
    }


    /* -----------------------------------------------------
       CONTENT LOGO

       Still larger than the header logo.
       ----------------------------------------------------- */

    .phone-logo-small {
        width: 44px;
        height: 44px;
    }


    .phone-logo-medium {
        width: 58px;
        height: 58px;
    }


    .phone-logo-large {
        width: 75px;
        height: 75px;
    }


    .phone-logo-xl {
        width: 90px;
        height: 90px;
    }

}


/* =========================================================
   SMALL MOBILE PHONES

   600px and below
   ========================================================= */

@media (max-width: 600px) {

    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    .header {
        padding:
            9px 12px;
    }


    .logo {
        font-size: 17px;
        gap: 7px;
    }


    .header-logo-icon {
        width: 43px;
        height: 43px;
    }


    .grumpy-face {
        font-size: 24px;
    }


    /* -----------------------------------------------------
       NAVIGATION
       ----------------------------------------------------- */

    .main-nav {
        margin-top: 9px;
        padding-top: 9px;
        gap: 3px;
    }


    .main-nav a,
    .logout-button {
        padding:
            7px 8px;
        font-size: 12px;
    }


    /* -----------------------------------------------------
       CONTENT LOGOS
       ----------------------------------------------------- */

    .phone-logo-small {
        width: 42px;
        height: 42px;
    }


    .phone-logo-medium {
        width: 55px;
        height: 55px;
    }


    .phone-logo-large {
        width: 70px;
        height: 70px;
    }


    .phone-logo-xl {
        width: 85px;
        height: 85px;
    }


    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    .site-footer {
        padding:
            20px 12px;
    }


    .footer-links {
        gap: 10px;
    }


    .footer-links a {
        font-size: 12px;
    }


    .footer-text {
        font-size: 11px;
    }

}


/* =========================================================
   VERY SMALL PHONES

   400px and below
   ========================================================= */

@media (max-width: 400px) {

    /* -----------------------------------------------------
       HEADER
       ----------------------------------------------------- */

    .header {
        padding:
            8px 10px;
    }


    .logo {
        font-size: 16px;
    }


    .header-logo-icon {
        width: 43px;
        height: 43px;
    }


    .grumpy-face {
        font-size: 22px;
    }


    /* -----------------------------------------------------
       NAVIGATION
       ----------------------------------------------------- */

    .main-nav {
        justify-content: stretch;
    }


    .main-nav a,
    .logout-form,
    .logout-button {
        flex: 1;
    }


    .main-nav a,
    .logout-button {
        text-align: center;
        padding:
            7px 5px;
        font-size: 11px;
    }


    /* -----------------------------------------------------
       CONTENT LOGO
       ----------------------------------------------------- */

    .phone-logo-medium {
        width: 52px;
        height: 52px;
    }


    .phone-logo-large {
        width: 65px;
        height: 65px;
    }


    .phone-logo-xl {
        width: 78px;
        height: 78px;
    }

}


/* =========================================================
   ACCESSIBILITY

   Respect users who prefer reduced animation.
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }


    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}