/* The site's own look on top of stock Bootstrap 5 - used by public-layout.pug, user-layout.pug and dashboard.pug.
   Theme rules come from the Start Bootstrap "Grayscale" theme the site was built on; Bootstrap components are styled through
   Bootstrap 5's own CSS variables, so a newer Bootstrap 5 download can be dropped in as it is. */

/* ---- Base ---- */
html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: Lora, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857;
    color: #fff;
    background-color: #000;
    -webkit-tap-highlight-color: rgba(255, 255, 255, .2);
}

/* Page width: the site was laid out for Bootstrap 3's containers (full width below 768px, then 750 / 970 / 1170px).
   Bootstrap 5 adds a 540px step at 576px and a 1320px step at 1400px; these keep the original widths. */
@media (min-width: 576px) { .container { max-width: none; } }
@media (min-width: 768px) { .container { max-width: 830px; } }
@media (min-width: 992px) { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1340px; } }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 35px;
    text-transform: uppercase;
    font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 1px;
}
h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p {
    margin: 0 0 25px;
    font-size: 18px;
    line-height: 1.5;
}
@media (min-width: 768px) {
    p {
        margin: 0 0 35px;
        font-size: 20px;
        line-height: 1.6;
    }
}

a {
    color: #42DCA3;
    text-decoration: none;
    transition: all .2s ease-in-out;
}
a:hover,
a:focus {
    color: #1d9b6c;
    text-decoration: none;
}

.light {
    font-weight: 400;
}

::-moz-selection {
    text-shadow: none;
    background: rgba(255, 255, 255, .2);
}
img::-moz-selection {
    background: transparent;
}

/* ---- Navbar (Bootstrap 5 .navbar markup in public-layout.pug) ---- */
.navbar-custom {
    --bs-navbar-padding-y: 0;
    --bs-navbar-color: #fff;
    --bs-navbar-hover-color: #dbdbdb;
    --bs-navbar-active-color: #fff;
    --bs-navbar-brand-color: #fff;
    --bs-navbar-brand-hover-color: #fff;
    --bs-navbar-brand-padding-y: 15px;
    --bs-navbar-brand-font-size: 18px;
    --bs-navbar-toggler-padding-y: 9px;
    --bs-navbar-toggler-padding-x: 10px;
    --bs-navbar-toggler-font-size: 12px;
    --bs-navbar-toggler-border-color: transparent;
    --bs-navbar-toggler-border-radius: 4px;
    --bs-navbar-toggler-focus-width: 0;
    --bs-navbar-nav-link-padding-x: 15px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .3);
    background-color: #000;
    text-transform: uppercase;
    font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    line-height: 20px;
}

.navbar-custom .navbar-toggler {
    margin: 8px 0;
    background-color: rgba(255, 255, 255, .2);
}

.navbar-custom .navbar-nav {
    --bs-nav-link-padding-x: 15px;
    --bs-nav-link-padding-y: 10px;
}

.navbar-custom .nav-link {
    line-height: 20px;
    transition: background .3s ease-in-out;
}

/* The section in view (Bootstrap 5 scrollspy puts .active on its link) */
.navbar-custom .nav-link.active {
    background-color: rgba(255, 255, 255, .3);
}

.navbar-custom .dropdown-menu {
    --bs-dropdown-link-hover-color: #67bdef;
    --bs-dropdown-link-active-color: #67bdef;
    --bs-dropdown-link-active-bg: transparent;
}
/* Menu icons the size of the navbar's (14px): Font Awesome 7's icons fill more of their box than v4's did */
.navbar-custom .dropdown-item .fa {
    font-size: .875em;
}

/* Wide screens: the menu sits on the intro image until the page is scrolled (public-site.js adds .top-nav-collapse) */
@media (min-width: 992px) {
    .navbar-custom {
        padding: 20px 0;
        border-bottom: none;
        letter-spacing: 1px;
        background: transparent;
        transition: background .5s ease-in-out, padding .5s ease-in-out;
    }
    .navbar-custom .navbar-nav {
        --bs-nav-link-padding-y: 15px;
    }
    .navbar-custom.top-nav-collapse {
        padding: 0;
        background: #000;
        border-bottom: 1px solid rgba(255, 255, 255, .3);
    }
}

/* Tablets: the open menu lays its items out in a row rather than a column */
@media (min-width: 625px) and (max-width: 991.98px) {
    .navbar-custom .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .navbar-custom .navbar-nav .nav-item {
        padding: 5px;
    }
}

@media (max-width: 388px) {
    .navbar-custom .navbar-brand {
        font-size: .9em;
    }
}
@media (max-width: 312px) {
    .navbar-custom .navbar-brand {
        font-size: .8em;
    }
}

/* ---- Homepage intro ---- */
.intro {
    display: table;
    width: 100%;
    height: auto;
    padding: 100px 0;
    text-align: center;
    color: #fff;
    background: url(../img/intro-bg_blue.jpg) bottom center no-repeat #000;
    background-size: cover;
}
.intro .intro-body {
    display: table-cell;
    vertical-align: middle;
}
.intro .intro-body .brand-heading {
    font-size: 40px;
}
.intro .intro-body .intro-text {
    font-size: 18px;
    font-family: 'Montserrat';
    text-shadow: 0 0 5px black;
}
@media (min-width: 768px) {
    .intro {
        height: 100%;
    }
    .intro .intro-body .brand-heading {
        font-size: 100px;
    }
    .intro .intro-body .intro-text {
        font-size: 26px;
    }
}

/* ---- Forms and data pages (logged-in pages; page stylesheets load after this and refine it) ---- */
/* Form labels are bold with a little space below */
label {
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: 700;
}

/* Field labels on the data forms (label.label): small, bold, white */
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}
.label:empty {
    display: none;
}

/* Scrolling panel for long tables and message lists */
.scroll-panel {
    max-height: 340px;
    overflow-y: scroll;
}

/* A collapsing panel clips everything inside it while it animates - including absolutely positioned content such as
   the custom tickboxes (.single-day, .zero-val on Journeys / AQI data). overflow: hidden only clips those when the
   panel is positioned; Bootstrap 5 doesn't position .collapsing (Bootstrap 3 did), so they stayed visible */
.collapsing {
    position: relative;
}

/* ---- Buttons: the theme's square, uppercase Montserrat buttons ---- */
.btn {
    --bs-btn-border-radius: 0;
    --bs-btn-font-weight: 400;
    text-transform: uppercase;
    font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
    transition: all .3s ease-in-out;
}

/* Round "scroll down" button on the intro (a Bootstrap 5 .btn, coloured through its variables) */
.btn-circle {
    --bs-btn-color: #fff;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: #fff;
    --bs-btn-border-width: 2px;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .1);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(255, 255, 255, .1);
    --bs-btn-active-border-color: #fff;
    --bs-btn-focus-box-shadow: none;
    /* flex-centred rather than padded: Font Awesome 7 icons are a fixed 1.25em wide, wider than the padded space was */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin-top: 15px;
    padding: 0;
    border-radius: 100%;
    font-size: 30px; /* v7's angles-down fills more of its box than v4's angle-double-down did at 40px */
    line-height: 1;
    transition: background .3s ease-in-out;
}
.btn-circle i.animated {
    transition-property: transform;
    transition-duration: 1s;
}
.btn-circle:hover i.animated {
    animation-name: pulse;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
