/*
 * GARF Eco Diary
 *
 * Main theme stylesheet.
 *
 * The theme deliberately has two simple presentation modes:
 *
 * 1. Logged-out visitors see a full-screen background image.
 * 2. Logged-in users see the application shell.
 *
 * The actual diary interface will be added later by the
 * GARF Eco Diary plugin.
 */


/*
 * -------------------------------------------------------------------------
 * Base
 * -------------------------------------------------------------------------
 */

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

html {
    background-color: #111;
}

body {
    min-height: 100vh;
    min-height: 100svh;

    margin: 0;

    background-color: #111;
    color: #222;

    font-family:
        system-ui,
        sans-serif;
}


/*
 * Make sizing predictable throughout the theme.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}


/*
 * -------------------------------------------------------------------------
 * Logged-out landing page
 * -------------------------------------------------------------------------
 *
 * The background image itself is supplied by the theme PHP.
 *
 * If no image has been selected, the page simply has a dark background.
 */

.garf-landing {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;

    background-color: #111;
    background-image: var(--garf-background-image, none);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}


/*
 * -------------------------------------------------------------------------
 * Logged-in application shell
 * -------------------------------------------------------------------------
 *
 * This is temporary presentation only. The diary application will
 * eventually replace the placeholder content.
 */

.garf-app {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;

    background-color: #f2f3f1;
    color: #222;
}


/*
 * Application header.
 */

.garf-app__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    padding: 1rem 1.5rem;

    background-color: #26372c;
    color: #fff;
}


.garf-app__title {
    margin: 0;

    font-size: 1.25rem;
    font-weight: 600;
}


.garf-app__user {
    font-size: 0.9rem;
}


.garf-app__user a {
    color: #fff;
}


/*
 * Main application content area.
 */

.garf-app__content {
    width: min(
        calc(100% - 2rem),
        70rem
    );

    margin: 2rem auto;
}


/*
 * Temporary placeholder panel.
 */

.garf-placeholder {
    padding: 2rem;

    background-color: #fff;
    color: #222;

    border-radius: 0.5rem;

    box-shadow:
        0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}


.garf-placeholder h1 {
    margin-top: 0;
}


/*
 * -------------------------------------------------------------------------
 * Small screens
 * -------------------------------------------------------------------------
 */

@media (max-width: 600px) {

    .garf-app__header {
        align-items: flex-start;
        flex-direction: column;

        padding: 1rem;
    }

    .garf-app__content {
        width: calc(100% - 1rem);

        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .garf-placeholder {
        padding: 1.25rem;
    }

}
