/**
 * Header and footer, brand layer: on top of css/header.css and
 * css/footer.css. Project styles (PPL Logistiikka).
 *
 * Header: logo left, menu, phone number and the quote button on the right.
 * The base theme centers the menu on the header; here the menu is long and
 * shares the row with a phone number and a button, so it sits in the flow on
 * the right. The number and the button are the GP element "Alternate header
 * with link button" (.quick-link, hidden on phones). On a phone the button
 * alone sits in the mobile header (.mobile-quote).
 *
 * Footer: p.footer-tagline is the brand line in display type; ul.footer-list
 * is a plain link list.
 */

.inside-header .site-logo {
    flex: none;
}

.site-header .site-logo img,
#mobile-header .site-logo img,
.main-navigation .site-logo img,
.navigation-branding img {
    /* GP writes the logo width from its settings; the height decides here */
    width: auto !important;
    max-width: none;
    height: 30px;
    margin: 0;
    padding: 0;
}

.inside-navigation .quick-link {
    flex: none;
    margin-left: 12px;
}

/* The number joins the row from 1280px; below that the menu needs the room */
.inside-navigation .quick-link .header-phone {
    display: none;
    margin: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.inside-navigation .quick-link .header-phone a {
    margin: 0;
    font-size: 0.9rem;
    color: var(--header-font-clr);
    text-decoration: none;
}

.inside-navigation .quick-link .header-phone a:hover {
    color: var(--header-link-hover-clr);
}

.inside-navigation .quick-link a.gb-button {
    margin: 0;
    padding: 0.62em 1em;
    font-size: 1rem;
    color: var(--btn-font-clr);
}

.inside-navigation .quick-link a.gb-button:hover {
    color: var(--btn-hover-font);
}

/* Phone: the quote button between the logo and the menu toggle (GP element
   "Mobile header: tarjousnappi", hook generate_inside_mobile_header) */
#mobile-header .mobile-quote {
    order: 1;
    margin: 0 12px 0 auto;
}

#mobile-header .mobile-quote a.gb-button {
    padding: 0.55em 0.8em;
    font-size: 0.85rem;
    white-space: nowrap;
}

#mobile-header .menu-toggle {
    order: 2;
}

#mobile-header .site-logo img {
    height: 24px;
}

/* ---- Footer ---- */
.site-footer .footer-tagline {
    margin-top: 14px;
    font-family: var(--title-font);
    font-size: 2em;
    font-weight: var(--heading-weight-large);
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--heading-clr);
}

.site-footer h4 {
    margin-bottom: 12px;
    font-family: var(--code-font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--accent-clr);
}

.site-footer p {
    margin-bottom: 6px;
}

.site-footer ul.footer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer ul.footer-list li {
    margin-bottom: 6px;
}

.site-footer .footer-list a,
.site-footer .footer-contact a {
    color: var(--font-clr);
    text-decoration: none;
}

.site-footer .footer-list a:hover,
.site-footer .footer-contact a:hover {
    color: var(--link-clr);
    text-decoration: underline;
}

@media (min-width: 768px) {
    #site-navigation .main-nav {
        position: static;
        transform: none;
        width: auto;
        max-width: none;
    }

    #site-navigation .inside-navigation {
        position: relative;
        justify-content: flex-end;
    }

    /* One row, also in the stuck bar (#sticky-navigation) */
    #site-navigation .inside-navigation,
    #sticky-navigation .inside-navigation {
        flex-wrap: nowrap;
        align-items: center;
    }

    #site-navigation .main-nav > ul,
    #sticky-navigation .main-nav > ul {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .main-navigation.navigation-stick .main-nav {
        margin-left: auto;
    }
}

/* The menu, the number and the button need the full row: tighter gaps until 1280px */
@media (min-width: 990px) {
    #site-navigation .main-nav > ul > li > a,
    #sticky-navigation .main-nav > ul > li > a {
        padding: 0 6px;
        font-size: 0.8rem;
        letter-spacing: 0.02em;
    }

    .site-header .site-logo img {
        height: 24px;
    }

    .inside-navigation .quick-link a.gb-button {
        font-size: 0.8rem;
    }
}

@media (min-width: 1280px) {
    #site-navigation .main-nav > ul > li > a,
    #sticky-navigation .main-nav > ul > li > a {
        padding: 0 10px;
        font-size: 0.9rem;
        letter-spacing: 0.04em;
    }

    .site-header .site-logo img {
        height: 30px;
    }

    .inside-navigation .quick-link a.gb-button {
        font-size: 0.88rem;
    }

    .inside-navigation .quick-link {
        margin-left: 20px;
    }

    .inside-navigation .quick-link .header-phone {
        display: block;
    }
}

/* Tablet (768px up to GP's mobile menu breakpoint): the mobile header is
   still in use. The desktop number and button (.quick-link) stay out of it:
   .mobile-quote is its button. The one-row rules above name #site-navigation
   and #sticky-navigation so they do not reach the mobile header or the
   slideout menu. */
#mobile-header .quick-link {
    display: none;
}


/* Dropdown (Meistä > Artikkelit): a white panel with a hairline, the items in
   the menu's own type; a small chevron marks the parent item */
@media (min-width: 1024px) {
    #site-navigation .main-nav ul ul,
    #sticky-navigation .main-nav ul ul {
        min-width: 180px;
        border: 1px solid var(--border-clr);
        background: var(--bg-clr);
        box-shadow: none;
    }

    #site-navigation.main-navigation .main-nav ul ul li a,
    #sticky-navigation.main-navigation .main-nav ul ul li a {
        padding: 12px 16px;
        font-size: 0.85rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    #site-navigation .main-nav > ul > li.menu-item-has-children > a::after,
    #sticky-navigation .main-nav > ul > li.menu-item-has-children > a::after {
        content: "";
        display: inline-block;
        width: 6px;
        height: 6px;
        margin-left: 7px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-3px) rotate(45deg);
    }
}
