/*!
 * Styles of the public site, on top of Bootstrap 5.
 *
 * The navbar and intro header started as code from Start Bootstrap's Clean Blog
 * v1.0.0 (http://startbootstrap.com), Copyright 2014 Start Bootstrap, Apache 2.0
 * license; modified by Michiel Van den Berghe for the Department of Geography,
 * Ghent University.
 */

:root {
    --brand-primary: #039BE5;               /* main blue */
    --brand-primary-rgb: 3, 155, 229;
    --brand-primary-dark: #027cb7;
    --brand-primary-soft: rgba(3, 155, 229, 0.4);
    --brand-secondary: #FF8C00;             /* main orange */
    --brand-secondary-focus: #FFB020;
    --brand-tertiary: #B2AC14;              /* third colour */
    --brand-tertiary-focus: #98930A;
    --brand-danger: #E91A31;

    /* Bootstrap's theme in the brand colours */
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: var(--brand-primary-rgb);
    --bs-danger: var(--brand-danger);
    --bs-danger-rgb: 233, 26, 49;
    --bs-link-color: var(--brand-primary);
    --bs-link-color-rgb: var(--brand-primary-rgb);
    --bs-link-hover-color: var(--brand-primary-dark);
    --bs-link-hover-color-rgb: 2, 124, 183;
    --bs-body-color: #292D36;
    --bs-body-font-family: 'Open Sans', sans-serif;
    --bs-body-font-size: 0.875rem;
}

.btn-primary {
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary-dark);
    --bs-btn-hover-border-color: var(--brand-primary-dark);
    --bs-btn-active-bg: var(--brand-primary-dark);
    --bs-btn-active-border-color: var(--brand-primary-dark);
    --bs-btn-disabled-bg: var(--brand-primary);
    --bs-btn-disabled-border-color: var(--brand-primary);
}

.form-control,
.form-select {
    border-color: var(--brand-primary);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--brand-primary-rgb), .25);
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* hide Alpine elements until Alpine has started */
[x-cloak] {
    display: none !important;
}

/* Page layout */

html {
    position: relative;
    min-height: 100%;
}

body {
    height: 100%;
    margin-bottom: 160px;
}

h3 {
    text-align: center;
}

/* links are underlined on hover only, as before Bootstrap 5; links styled as buttons never */
a {
    text-decoration: none;
}

a:not(.btn):hover,
a:not(.btn):focus {
    text-decoration: underline;
}

p {
    margin: 0 0 10px;
    line-height: 1.4em;
}

p.info {
    font-size: 0.9em;
    color: var(--brand-tertiary);
}

hr.small {
    width: 7em;
    margin-left: auto;
    margin-right: auto;
    border-top-width: 3px;
    opacity: 1;
}

.wrapper {
    padding-bottom: 10em;
}

.small-layout {
    margin-top: 5em;
}

.welcome {
    overflow: hidden;
    transition: height 0.2s ease;
}

.welcome h2 {
    text-align: center;
}

.brand-text,
.navbar-brand,
.page-heading h1 {
    font-family: 'Pacifico';
}

/* Navbar */

.navbar-custom {
    background-color: rgba(var(--brand-primary-rgb), 0.9);
    border-bottom: 1px solid color-mix(in srgb, var(--brand-primary), black 60%);
    --bs-navbar-color: #ddd;
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
    --bs-navbar-brand-color: #ddd;
    --bs-navbar-brand-hover-color: #fff;
    --bs-navbar-toggler-border-color: #ddd;
}

.navbar-custom .org-brand {
    --bs-navbar-brand-color: yellow;
    --bs-navbar-brand-hover-color: yellow;
}

@media only screen and (min-width: 1170px) {
    .navbar-custom {
        background-color: transparent;
        border-bottom: none;
        transition: background-color 0.3s;
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
    }

    .navbar-custom.is-fixed,
    .navbar-custom.condensed,
    .search-active .navbar-custom {
        background-color: rgba(var(--brand-primary-rgb), 0.9);
    }

    .navbar-custom.is-fixed {
        position: fixed;
        top: -61px;
        transition: transform .3s;
    }

    .navbar-custom.is-visible {
        transform: translate3d(0, 120%, 0);
    }
}

/* Big header of the home and learn more pages */

.intro-header {
    position: relative;
    overflow: hidden;
    background: #808080 url(/static/images/pictures/header/header-image-master.jpg) no-repeat center center;
    background-size: cover;
    margin-bottom: 1.4em;
    transition: max-height .3s ease;
    max-height: 450px;
}

.intro-header::before {
    position: absolute;
    inset: 0;
    background-color: var(--brand-primary);
    opacity: 0.7;
    content: '';
}

.intro-header .page-heading {
    position: relative;
    padding: 80px 0;
    color: white;
    text-shadow: 0.2em 0.2em 0.5em rgb(24, 55, 60);
    text-align: center;
}

.intro-header .page-heading h1 {
    margin-top: 0;
    font-size: 50px;
}

.intro-header .page-heading .subheading {
    display: block;
    font-weight: 600;
    font-size: 1.6em;
    line-height: 1.1;
    margin: 10px 0 0;
}

.btn-learn-more {
    --bs-btn-bg: var(--brand-secondary);
    --bs-btn-color: white;
    --bs-btn-hover-bg: var(--brand-secondary-focus);
    --bs-btn-hover-color: white;
    --bs-btn-active-bg: var(--brand-secondary-focus);
    --bs-btn-active-color: white;
    text-shadow: none;
    opacity: 0.9;
}

@media only screen and (min-width: 768px) {
    .intro-header .page-heading {
        padding: 150px 0;
    }

    .intro-header .page-heading h1 {
        font-size: 80px;
    }
}

@media only screen and (min-width: 1170px) {
    .intro-header .page-heading {
        padding: 140px 0;
    }
}

/* Footer */

footer {
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    padding-top: 10px;
    min-height: 140px;
    background-color: var(--brand-primary);
    color: #ddd;
}

footer a:link,
footer a:visited {
    color: #ddd;
    background-color: transparent !important;
    text-decoration: none;
}

footer a:hover,
footer a:active {
    color: #fff;
    text-decoration: none;
}

footer h4 {
    margin-top: 7px;
    margin-bottom: 1px;
    font-size: 1.1rem;
}

footer .li_row {
    display: inline-block;
    width: 30%;
    vertical-align: top;
}

footer #ugent_logo {
    margin-bottom: 5px;
    width: 100px;
}

@media only screen and (max-width: 760px) {
    footer {
        min-height: 0;
    }

    footer .li_row {
        display: block;
        width: 100%;
    }

    footer .small {
        font-size: 0.7em;
        margin-top: 5px;
        margin-bottom: 10px;
    }
}

/* Buttons */

.btn-create-route,
.btn-login {
    --bs-btn-bg: var(--brand-tertiary);
    --bs-btn-border-color: var(--brand-tertiary);
    --bs-btn-color: white;
    --bs-btn-hover-bg: var(--brand-tertiary-focus);
    --bs-btn-hover-border-color: var(--brand-tertiary);
    --bs-btn-hover-color: white;
    --bs-btn-active-bg: var(--brand-tertiary-focus);
    --bs-btn-active-border-color: var(--brand-tertiary);
    --bs-btn-active-color: white;
    transition: background-color 0.5s ease;
}

/* The UGent and Google login buttons on the login page; Google's is at most 400px wide */
.login-alternatives {
    max-width: 400px;
    margin: 0 auto;
}

/* Routes */

.directions {
    margin-top: 3ex;
    margin-bottom: 3ex;
}

.directions h2,
.directions-content h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 170%;
    font-weight: 500;
}

.directions-content h2 {
    color: var(--brand-primary);
}

.directions p {
    margin-top: 1em;
    margin-bottom: 1em;
    font-size: 16px;
}

.directions .details {
    color: #444;
    font-size: 90%;
}

.score-control {
    text-align: center;
}

.like {
    padding: 6px 12px;
    --bs-btn-hover-bg: inherit;
    --bs-btn-hover-color: inherit;
}

.like.liked {
    --bs-btn-bg: var(--brand-secondary);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--brand-secondary-focus);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-secondary-focus);
    --bs-btn-active-color: #fff;
}

.description {
    white-space: pre-line;
    font-size: 1.1em;
    margin-top: 0.8em;
    margin-bottom: 0.8em;
}

.route-details-page {
    padding-top: 30px;
}

.route-details-page #map {
    height: 360px;
}

.route-details-page .directions-content {
    position: relative;
}

/* New/update route form */

#starting_point {
    text-align: center;
}

.location-input {
    position: relative;
    display: block;
    margin-bottom: 2em;
}

.location-input .manual-location-map {
    height: 400px;
}

/* place search on the location picker's map (location-input.js) */
.places-search {
    width: 22rem;
    max-width: calc(100vw - 4rem);
}

.places-search-results {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 2px;
}

.places-search-results .list-group-item {
    padding: .35rem .6rem;
    text-align: left;
}

.route-details-page #map {
    z-index: 0;  /* below the navbar's dropdowns */
}

.blocked-location {
    text-align: center;
}

.blocked-location p {
    font-size: 1.2em;
    font-weight: 700;
}

.directions-form textarea {
    min-height: 30ex;
}

.directions-form button {
    width: 100%;
}

.errors {
    color: var(--brand-danger);
}

/* Search */

.search {
    transition: margin-top .3s ease;
}

.search-form .form-control {
    font-size: 17px;
}

#to {
    border-right: 0;
}

#clear-btn {
    background: transparent;
    color: rgb(85, 85, 85);
    border-color: var(--brand-primary);
    border-left: 0;
}

.location-status-summaries {
    margin-top: 8pt;
}

.location-status-summaries i {
    position: absolute;
    margin-top: 2pt;
}

.location-status-summaries p {
    padding-left: 2em;
}

.search-active .intro-header {
    max-height: 0;
}

.search-active .search {
    margin-top: 40pt;
}

.search-active .promo,
.search-active .social {
    display: none;
}

.search-active .no-results {
    margin-top: 4em;
    text-align: center;
}

#filter-overview label {
    font-weight: 500;
}

#filter-overview .row > label {
    font-size: 15px;
    padding-top: 7px;
}

#filter-overview .row {
    margin-bottom: 1.4ex;
}

/* the location button only shows the current choice */
#location-button {
    width: 100%;
    text-align: center;
}

#location-button span {
    display: none;
}

#location-button.state-GLOBAL .location-global,
#location-button.state-SPECIFIED .location-specified,
#location-button.state-DEVICE .location-device {
    display: inline;
}

#location-selection label {
    display: block;
    cursor: pointer;
    padding: 0;
    background-color: white;
    overflow: hidden;
}

#location-selection label i {
    position: absolute;
    color: #eee;
    margin-top: 8pt;
}

#location-selection label p {
    border: 1px solid transparent;
    border-left: none;
    border-right: none;
    padding: 1ex 1ex 1ex 2.4em;
}

#location-selection label .selection-options {
    transition: margin-bottom .3s ease;
}

#location-selection input[type="radio"] {
    display: none;
}

#location-selection input:checked + i {
    color: var(--brand-secondary);
}

#location-selection input:checked ~ p {
    border-top: 1px solid var(--brand-secondary);
    border-bottom: 1px solid var(--brand-secondary);
}

#location-selection input:not(:checked) ~ .selection-options {
    margin-bottom: -400px;
}

.promo-box {
    margin-top: 2em;
    text-align: center;
}

.promo-box hr {
    border-top: 1px solid var(--brand-primary);
    opacity: 0.3;
}

/* Learn more */

.learnmore .row {
    padding-top: 25px;
    padding-bottom: 35px;
}

.learnmore img {
    width: 200px;
    height: auto;
    margin-top: 30px;
    filter: drop-shadow(12px 12px 25px rgba(0, 0, 0, 0.5));
}

.learnmore p {
    line-height: 1.6em;
}

.learnmore h2 {
    font-size: 2.5em;
    line-height: 1.2em;
    padding-bottom: 20px;
}

.learnmore h2 span {
    font-size: 1.5em;
    display: block;
    font-weight: bold;
}

.learnmore h3 {
    text-align: left;
}

.learnmore .colored {
    background-color: var(--brand-primary-soft);
}

#learnmore_examples {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: flex-start;
}

#learnmore_examples .route {
    max-width: 50%;
    min-width: 350px;
    width: 100%;
}

#learnmore_examples h2 {
    font-size: 1.6em;
    margin-bottom: 0;
    padding-bottom: 0;
}

#learnmore_examples p {
    font-size: 1em;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin-top: 50px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Profiles */

.profile-info .description {
    color: var(--brand-primary);
    font-size: 18px;
    font-weight: 500;
}

.profile-info .info-section {
    margin-left: 10%;
    margin-right: 10%;
    padding-bottom: 2vh;
}

.profile-info .field {
    font-size: 16px;
    border-bottom: 1px solid #CCC;
    margin-bottom: 10px;
}

.user-page .nav-tabs {
    margin-top: 1.4em;
    margin-bottom: 1.8em;
    --bs-nav-link-color: #555555;
    --bs-nav-link-hover-color: #555555;
    --bs-nav-tabs-link-active-color: var(--brand-secondary);
}

.user-page .badge {
    background-color: #777;
}

.user-page .nav-link.active .badge {
    background-color: var(--brand-secondary);
}

/* Text pages (ciao/content) */

.page-content h1,
.page-content h2,
.page-content h3 {
    text-align: left;
}

.page-content h2 {
    padding-top: 1.2em;
}

.page-content .toctitle {
    font-weight: bold;
}

.page-content img.thumb {
    float: right;
    max-width: 40%;
    margin: 0 0 1em 1em;
}

/* Login and registration */

.security h2 {
    font-size: 1.4em;
    background-image: url('../images/logo/logo_soleway.gif');
    background-repeat: no-repeat;
    background-size: 30px;
    padding-left: 40px;
    height: 30px;
    vertical-align: middle;
    padding-top: 4px;
}

.security h3 {
    font-size: 1.2em;
    padding-top: 23px;
}

.security p {
    font-size: 0.85em;
}
