/// Applies the micro clearfix hack popularized by Nicolas Gallagher.
// Include this mixin on a container if its children are all floated, to give
// the container a proper height.
/// @link http://nicolasgallagher.com/micro-clearfix-hack/

@mixin clearfix {
    &::before,
    &::after {
        content: ' ';
        display: table;
    }

    &::after {
        clear: both;
    }
}


// Global styles

html {
    font-size: 16px;
}

body {
    background-color: $page-background-color;
    color: $base-text-color;
    font-weight: normal;
    line-height: 1.5;
    margin: 0;
    padding: 0;

    -moz-osx-font-smoothing: grayscale;
     -webkit-font-smoothing: antialiased;
}

div {
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: inherit;
    font-style: normal;
    font-weight: normal;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    margin-top: 0;
    text-rendering: optimizeLegibility;
}

h1, h2 {
    color: $base-text-color;
    font-family: "Open Sans", sans-serif;
}

h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 48px;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 42px;
}

p {
    font-size: inherit;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-rendering: optimizeLegibility;
}

em, i {
    font-style: italic;
    line-height: inherit;
}

a {
    background-color: transparent;
    color: #2199e8;
    cursor: pointer;
    line-height: inherit;
    text-decoration: none;

    img {
        border: 0 none;
    }
}

img {
    border: 0 none;
    display: inline-block;
    height: auto;
    max-width: 100%;
    vertical-align: middle;

    -ms-interpolation-mode: bicubic;
}

button,
input,
optgroup,
select,
textarea {
    color: inherit;
    font: inherit;
    margin: 0;
}

input,
select,
textarea {
    box-sizing: border-box;
}

input {
    line-height: normal;
}

[type='text'],
[type='password'],
[type='date'],
[type='datetime'],
[type='datetime-local'],
[type='month'],
[type='week'],
[type='email'],
[type='number'],
[type='search'],
[type='tel'],
[type='time'],
[type='url'],
[type='color'],
textarea {
    background-color: #FEFEFE;
    border: 1px solid #CACACA;
    border-radius: 0;
    box-shadow: inset 0 1px 2px rgba(10,10,10,0.1);
    box-sizing: border-box;
    color: #0A0A0A;
    display: block;
    font-family: inherit;
    font-size: 1rem;
    height: 2.4375rem;
    margin: 0 0 1rem;
    padding: 0.5rem;
    transition: box-shadow 0.5s,border-color 0.25s ease-in-out;
    width: 100%;

    -webkit-appearance: none;
       -moz-appearance: none;
}

.text-left {
    text-align: left;
}

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

.text-right {
    text-align: right;
}

.clearer {
    @include clearfix;
}

#navigation {
    background-color: $hat-background-color;
    color: $hat-text-color;
    margin: 0;
    padding: 0;

    &::after {
        clear: both;
        content: ' ';
        display: table;
        flex-basis: 0;
        order: 1;
    }

    .navigation-inner {
        @include clearfix;

        height: 5rem;
        margin: 0 auto;
        padding: 0.3rem 0.75rem;

        /* IE10+ */
        background-image: -ms-linear-gradient(top left, #0185D3 0%, #036DAB 70%);
        /* Mozilla Firefox */
        background-image: -moz-linear-gradient(top left, #0185D3 0%, #036DAB 70%);
        /* Opera */
        background-image: -o-linear-gradient(top left, #0185D3 0%, #036DAB 70%);
        /* Webkit (Safari/Chrome 10) */
        background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0, #0185D3), color-stop(70, #036DAB));
        /* Webkit (Chrome 11+) */
        background-image: -webkit-linear-gradient(top left, #0185D3 0%, #036DAB 70%);
        /* W3C Markup */
        background-image: linear-gradient(to bottom right, #0185D3 0%, #036DAB 70%);
        /* IE <10 */
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF0185D3', endColorstr='#FF036DAB', GradientType=1);

        #logo-holder {
            float: left;
            margin: 0;
            padding: 0;
            width: 100%;

            .masthead {
                box-sizing: border-box;
                display: block;
                height: 1rem;
                margin: 0.3rem 0 0 1.5rem;
                opacity: 0.7;
                padding: 0;
            }

            .budget-wordmark {
                box-sizing: border-box;
                display: block;
                height: 2.5rem;
                margin: 0.4rem 0 0.25rem 1.5rem;
                padding: 0;
            }
        }

        #user-info-holder {
            float: right;
            font-weight: 500;
            height: 4.4rem;
            line-height: 1.9rem;
            margin: 0;
            padding: 2rem 1rem 0 0.5rem;
            width: 100%;

            .white {
                a {
                    color: #E0E0E0;
                    text-decoration: none;

                    &:hover {
                        color: #FFFFFF;
                        text-decoration: underline;
                    }
                }
            }
        }
    }

    .neon {
        color: $neon-color;
    }
}

.center-content {
    margin: 0 auto;
    max-width: $max-content-width;
    padding: 20px 10px;
}

#package-list {
    padding-top: 0;

    .package-empty-view {
        font-family: 'Roboto', sans-serif;
        margin: 18px 6.33333% 0;
        width: 87.33334%;

        h3 {
            color: #3C3C3C;
            font-family: 'Roboto', sans-serif;
            font-size: 27px;
            font-weight: 700;
            line-height: 40px;
            margin: 0 0 3px;
        }
        p {
            color: #616161;
            font-size: 14px;
            line-height: 24px;
        }
    }
}

@media screen and (min-width: 30em) {
    #navigation {
        .navigation-inner {
            #logo-holder,
            #user-info-holder {
                width: auto;
            }
        }
    }
}
