/*
    Fixes a foundation js error
*/
.foundation-data-attribute-namespace {
    font-family: false;
}

/*
    Zurb foundation uses this without !import, which causes IE11 to not
    apply the placeholder color.
*/
:-ms-input-placeholder {
    color: $input-placeholder-font-color !important;
}

/*
    Hyphenation for browsers which support it.
*/
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    @include prefix(hyphens, auto);
}

/*
    Get rid of the jump that is introduced when switching from a site with
    scrollbar to a site without (or vice versa)

    As a side-effect, this disables horizontal scrolling, but we don't have
    that anyway because of our mobile-first design.
*/
html {
    @media #{$medium-up} {
        overflow-x: hidden;
        width: 100vw;
    }
}

html,
body {
    height: 100%;
}

/*
    Rounded corners for panels.
*/
.panel {
    border-radius: 2px;

    // Zurb lacks a separate color for callout panels.
    &.callout {
        border-color: $callout-panel-border-color;
    }
}

/*
    Subtitles
*/
h2 small {
    display: block;
    line-height: 1.25;
}

/*
    Improve main navigation
*/

@media #{$medium-up} {
    header .main-navigation {
        margin: 0;

        .top-bar-section ul {
            display: flex;
            flex-wrap: wrap;
            width: 100%;

            li {
                flex: 1 1 auto;
                text-align: center;
                float: none !important;
                max-width: 11rem;

                a {
                    padding: 0 .5rem !important;
                    white-space: nowrap;

                    &:hover {
                        background: $primary-color !important;
                    }
                }
            }
        }
    }
}

/*
    General tweaks
*/

.small {
    font-size: 17px;
}

.header {
    height: 5rem;
}

.page-lead {
    font-size: 23px;
    line-height: 1.3;
}

input[data-street-search] {
    background: $input-bg-color;
    border: 0 inset $input-border-color;
    border-radius: 2px;
    box-shadow: $input-box-shadow;
    font-size: 1.1rem;
    font-weight: bold;
    height: 50px;
    padding: 10px;
}

form input[type="radio"] {
    margin: .55rem .5rem 0 0 !important;
}

input[data-street-search]::placeholder {
    color: $input-placeholder-color;
}


/*
    Our footer is kept at the bottom without being "sticky", thanks to this
    approach: https://dev.to/domysee/keeping-the-footer-at-the-bottom-with-css-flexbox-5h5f
*/
html,
body {
    height: 100%;
    width: 100%;
}

footer {
    margin-top: .5rem;
    padding: .5rem 0;
}

.ie-11-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
}

main {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

article {
    background: $white;
    flex-grow: 1;
}

header,
article,
footer {
    flex-shrink: 0;
}

.auth {
    .logout,
    .login {
        font-size: .875rem;
    }
}

.delivery-note {
    table {
        border-collapse: collapse;

        th,
        td {
            background-color: $white;
            border: 1px solid $black;

            &.orange {
                background-color: #f93;
            }

            &.red {
                background-color: #ff9f9f;
            }

            &.blue {
                background-color: #9cc;
            }

            &.yellow {
                background-color: #ff6;
            }

            &.green {
                background-color: #9c9;
            }

            &.top {
                vertical-align: top;
            }
        }
    }
}

.daily-list-boxes,
.daily-list-boxes-and-forms, {
    table {
        border-collapse: collapse;

        th,
        td {
            background-color: $white;
            border: 1px solid $black;

            &.red {
                background-color: #ff9f9f;
            }

            &.blue {
                background-color: #39c;
            }

            &.dark-blue {
                background-color: #36f;
            }

            &.light-blue {
                background-color: #cff;
            }

            &.green {
                background-color: #7a1;
            }

            &.dark-green {
                background-color: #396;
            }

            &.light-green {
                background-color: #9f9;
            }
        }
    }
}


/*
    Print Styles
*/
@media print {
    .alert-box,
    .date-range-selector,
    .date-range-selector-result {
        display: none;
    }

    html,
    body {
        height: 99%; // avoids blank pages at the end
    }

    body {
        font-size: 12px !important;
    }

    .field-display-block .field-display-label,
    .field-display-block .field-display-data,
    .field-display-block .field-display-data * {
        background-color: transparent;
        color: $body-font-color !important;
        font-size: 12px !important;
        margin: 0 !important;
        padding: 0;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        @include hairline;
        font-size: 1.2rem;
        margin-bottom: .25rem;
    }

    h3 {
        font-size: 1.1rem;
        margin-bottom: .15rem;
    }

    h4,
    h5,
    h6 {
        font-size: 1rem;
    }

    ul.breadcrumbs {
        padding: 0 0 .25rem 1rem;

        * {
            font-size: 9px;
        }
    }
}

$footer-header-color: $charcoal;
$footer-text-color: $steel;
$footer-font-size: 13px;
$footer-border-width: 0;

.footer-content {
    background-color: $topbar-bg-color;

    // accomplish the border with a box-shadow, as the border messes with
    // our fixed footer script height calculation
    box-shadow: 0 -2px 0 $primary-color;
    max-width: 100% !important;

    // please do not add a margin here, it will mess up the sticky footer!
    // instead add a margin-bottom to whatever is rendered before the footer.
    padding: 0;

    > .columns > .row {
        margin: 0 auto;
        max-width: $row-width;
    }

    * {
        background-color: $topbar-bg-color;
        color: $footer-text-color;
        font-size: $footer-font-size;
        line-height: 25px;
    }

    h2 {
        color: $footer-header-color;
        font-weight: 500;
        letter-spacing: 1px;
        margin-bottom: 13px;
        text-transform: uppercase;
    }

    .footer-columns {
        padding-bottom: .5rem;
        padding-top: 1.25rem;

        p {
            line-height: 1.5rem;
            margin-bottom: .5rem;
        }
    }

    .footer-links {
        padding: .5rem 0;
        position: relative;
        text-align: center;

        .columns {
            span + span::before {
                content: '•';
            }
        }
    }
}