@font-face {
    font-display: swap;
    font-family: 'Patua One';
    font-style: normal;
    font-weight: 400;
    src: url('./patua-one-v20-latin-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Cutive Mono';
    font-style: normal;
    font-weight: 400;
    src: url('./cutive-mono-v21-latin-regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Ostrich Sans';
    font-style: normal;
    font-weight: 800;
    src: url('./OstrichSans-Heavy.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'London Underground';
    font-style: normal;
    font-weight: 700;
    src: url('./London-Underground-Heavy.woff2') format('woff2');
}

/* London Underground Bold.woff2 */

:root {
    --font-family-heading: 'Patua One';
    --font-family-code: 'Cutive Mono';

    --font-size-multiplier: 1.5;
    --font-size-2xs: calc(var(--font-size-multiplier) * 0.6875rem);
    --font-size-xs: calc(var(--font-size-multiplier) * 0.75rem);
    --font-size-m: calc(var(--font-size-multiplier) * 1rem);
    --font-size-l: calc(var(--font-size-multiplier) * 1.25rem);
    --font-size-xl: calc(var(--font-size-multiplier) * 1.625rem);

    --color-ol: #ED8B00;
    --color-bl: #003DA5;
    --color-rl: #DA291C;
    --color-gl: #00843D;
    --color-bus: #FFC72C;
    --color-ferry: #008EAA;
    --color-cr: #80276C;
    --color-sl: #7C878E;
    --color-theride: #59BEC9;
}

body {
    font-family: sans-serif;
}

.transit-ol {
    --transit-color: var(--color-ol);
}

.transit-bl {
    --transit-color: var(--color-bl);
}

.transit-rl {
    --transit-color: var(--color-rl);
}

.transit-gl {
    --transit-color: var(--color-gl);
}

.transit-bus {
    --transit-color: var(--color-bus);
}

.transit-cr {
    --transit-color: var(--color-cr);
}

/*.alert.severity-1 {*/
/*    border-width: 0.3rem;*/
/*}*/

/*.alert.severity-2 {*/
/*    border-width: 0.3rem;*/
/*}*/

/*.alert.severity-3 {*/
/*    border-width: 0.3rem;*/
/*}*/

/*.alert.severity-4 {*/
/*    border-width: 0.6rem;*/
/*}*/

/*.alert.severity-5 {*/
/*    border-width: 0.6rem;*/
/*}*/

/*.alert.severity-6 {*/
/*    border-width: 0.6rem;*/
/*}*/

/*.alert.severity-7 {*/
/*    border-width: 0.75rem;*/
/*}*/

/*.alert.severity-8 {*/
/*    border-width: 0.9rem;*/
/*}*/

/*.alert.severity-9 {*/
/*    border-width: 0.9rem;*/
/*}*/

/*.alert.severity-10 {*/
/*    border-width: 1.2rem;*/
/*}*/

.alert {
    margin-bottom: 1.5rem;
    padding: 0.4rem;
    border-style: solid;
    border-width: 0.3rem;
    border-radius: 1%;
    border-color: var(--transit-color);
    /*border-image: linear-gradient(45deg, var(--transit-color), color-mix(in srgb, var(--transit-color) 20%, transparent)) 1;*/
    /*display: flex;*/

    .emoji {
        line-height: 1.5;
        vertical-align: text-bottom;
    }
}

.alert h1 {
    display: inline;
    margin: 0;
    font-weight: normal;
}

.alert h1, .alert summary {
    font-family: var(--font-family-heading), serif;
    font-size: var(--font-size-xl);
}

details summary {
    /* could make this scoped to ::marker after https://github.com/w3c/csswg-drafts/issues/6203 */
    cursor: pointer;
}

details > div {
    font-family: var(--font-family-code), monospace;
    font-size: var(--font-size-l);
    white-space: break-spaces;
}

details img {
    max-width: 100%;
    margin: 1rem auto;
}

body {
    margin: 0.75rem 1.5rem;
}

#root {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

header {
    width: 100%;
    margin-bottom: 1rem;
    font-size: var(--font-size-m);

    .logo {
        min-height: 3rem;
        max-height: min(10vw, 10vh);
    }

    svg.logo {
        path {

        }
    }
}

main {
    margin-bottom: 3rem;
    flex-grow: 1;
    max-width: 100vw;
}

footer {
    width: 100%;
    border-style: dashed;
    border-width: 0.2rem;
    /*border-radius: 1%;*/
    border-color: #666;
    margin-top: auto;
    margin-bottom: 1rem;
    padding: 0.25rem;

    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    row-gap: 1rem;
    column-gap: 1rem;

    nav {
        flex-grow: 1;
    }

    nav a:not(:last-child) {
        margin-right: 1rem;
    }

    .details {
        font-style: italic;
        text-align: right;
        font-size: var(--font-size-2xs);
    }

    a[role="button"] {
        text-decoration: none;
    }
}

.overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: opacity 500ms;
    visibility: hidden;
    opacity: 0;

    h3, h4 {
        margin: 1rem 0 0.25rem 0;
    }
}

.overlay:target {
    visibility: visible;
    opacity: 1;
}

.popup {
    margin: 5vh auto;
    padding: 20px;
    background: #fff;
    width: 85vw;
    max-width: 800px;
    position: relative;
    transition: all 2s ease-in-out;
}

.popup .close {
    content: '&times;';
    position: absolute;
    top: 20px;
    right: 30px;
    transition: all 200ms;
    font-size: 30px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

@media (width <= 50rem) {
    body {
        margin: 0.25rem;
    }

    header {
        margin-bottom: 0;
    }
}

/*FIRE*/

/*.fire {*/
/*    animation: burn 1.5s linear infinite alternate;*/
/*}*/

@keyframes burn {
    from {
        text-shadow: -.1em 0 .3em #fefcc9, .1em -.1em .3em #feec85, -.2em -.2em .4em #ffae34, .2em -.3em .3em #ec760c, -.2em -.4em .4em #cd4606, .1em -.5em .7em #973716, .1em -.7em .7em #451b0e;
    }
    45% {
        text-shadow: .1em -.2em .5em #fefcc9, .15em 0 .4em #feec85, -.1em -.25em .5em #ffae34, .15em -.45em .5em #ec760c, -.1em -.5em .6em #cd4606, 0 -.8em .6em #973716, .2em -1em .8em #451b0e;
    }
    70% {
        text-shadow: -.1em 0 .3em #fefcc9, .1em -.1em .3em #feec85, -.2em -.2em .6em #ffae34, .2em -.3em .4em #ec760c, -.2em -.4em .7em #cd4606, .1em -.5em .7em #973716, .1em -.7em .9em #451b0e;
    }
    to {
        text-shadow: -.1em -.2em .6em #fefcc9, -.15em 0 .6em #feec85, .1em -.25em .6em #ffae34, -.15em -.45em .5em #ec760c, .1em -.5em .6em #cd4606, 0 -.8em .6em #973716, -.2em -1em .8em #451b0e;
    }
}

.predictions {
    --font-size-multiplier: 1.25;
    font-size: var(--font-size-l);

    h2 {
        margin: 0;
        padding-top: 3rem;
        text-decoration: underline solid var(--transit-color) 0.5rem;
        font-family: 'Ostrich Sans', sans-serif;
        font-size: calc(var(--font-size-multiplier) * 3.25rem);
    }

    h3 {
        letter-spacing: 0.4rem;
        text-decoration: underline solid #333333 0.2rem;
        font-family: 'Ostrich Sans', sans-serif;
        font-size: calc(var(--font-size-multiplier) * 2.5rem);

        /*&:after {*/
        /*    content: "\00a0\00a0";*/
        /*}*/
    }

    relative-time {
        font-family: 'London Underground', monospace;
    }

    .route-group {
        margin-bottom: 2rem;
        padding: 0 0 2rem 0.5rem;
        /*padding: 0.4rem;*/
        /*border-left-style: solid;*/
        /*border-left-width: 0.3rem;*/
        /*border-radius: 1%;*/
        /*border-left-color: var(--transit-color);*/

        &:not(:last-child) {
            border-bottom-style: dashed;
            border-bottom-width: 0.3rem;
            border-bottom-color: #333333;
        }
    }

    .eta-group {
        max-width: 100vw;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        gap: calc(var(--font-size-multiplier) * 4rem);
        line-height: calc(var(--font-size-multiplier) * 4rem);
        margin: 0 2.5rem 4rem 2.5rem;

        relative-time {
            flex-wrap: wrap;
            display: inline-flex;
        }

        relative-time:nth-child(1) {
            font-size: calc(var(--font-size-multiplier) * 4rem);
        }

        relative-time:nth-child(2) {
            font-size: calc(var(--font-size-multiplier) * 3rem);
        }

        relative-time:nth-child(3) {
            font-size: calc(var(--font-size-multiplier) * 2rem);
        }

        relative-time:nth-child(4) {
            font-size: calc(var(--font-size-multiplier) * 1.6rem);
        }
    }

    .transit-bus {
        --font-size-multiplier: 0.75;
    }

    .transit-cr {
        --font-size-multiplier: 0.85;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #222;
        color: #ccc;
    }

    a {
        color: rgb(238, 155, 238);
    }

    a:visited {
        color: rgb(155, 155, 238);
    }

    .popup {
        background-color: #444;
        color: #eee;

        max-height: 80vh;
        overflow: scroll;

        a.close {
            color: #bbb;
        }
    }

    header .logo {
        text {
            stroke: #fff;
            stroke-width: 1rem;
        }
        path {
            stroke: #fff;
            stroke-width: 1.25rem;
        }
    }
}
