// Normalization
body,
h1,
h2,
h3 {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

// App styles
.k-drawer-container {
    background-color: $background-color;
    min-height: 100%;

    .k-drawer {
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);

        &.k-drawer-start {
            border-right-width: 0;
        }
    }

    &.k-drawer-push .k-drawer {
        position: sticky;
        top: 80px;
        height: calc(100vh - 80px);
    }

    .k-drawer-item {
        user-select: none;
    }

    .k-drawer-content {
        overflow: hidden;
    }
}

.card-container {
    min-height: 100%;
    background-color: $white;
    padding: 40px 0;
    text-align: center;

    .card-header-wrapper {
        display: flex;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

    &.grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        column-gap: 10px;
        row-gap: 1em;
    }

    .card-buttons {
        .k-button {
            min-width: 105px;
        }
    }

    .card-ranges .k-dateinput {
        width: 105px;
    }

    .chart-tooltip {
        text-align: center;
        font-size: 15px;
        font-weight: bold;
    }

    .card-ranges .k-i-calendar {
        color: #656565;
        cursor: pointer;
        margin-right: 5px;
    }

    .card-ranges {
        white-space: nowrap;

        .k-daterangepicker {
            .k-textbox-container,
            .k-floating-label-container {
                padding-top: 0;
                min-width: 105px;
            }

            .k-label {
                display: none;
            }
        }
    }

    .card-component {
        grid-column: 1 / -1;
        overflow: hidden;
    }
}

@media (min-width: 480px) {
    .content-wrapper > .column.menu{
        display: none;
    }
    .card-container {
        text-align: initial;
        padding: 30px;

        &.grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .card-title {
            grid-column: 1 / 2;
            grid-row: 1;
        }

        .card-buttons {
            text-align: center;
            grid-column: 1 / -1;
            grid-row: 2;
        }

        .card-ranges {
            text-align: right;
            grid-column: 2 / 3;
            grid-row: 1;
        }
    }
}

@media (min-width: 768px) {
    .content-wrapper > .column.menu{
        display: inherit;
    }
    .card-container {
        margin: 25px;
        border-radius: 5px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);

        &.grid {
            grid-template-columns: repeat(3, 1fr);
        }

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

        .card-ranges {
            text-align: right;
            grid-column: 3 / 4;
        }

        .card-component {
            grid-column-start: 1;
            grid-column-end: -1;
        }
    }
}

@media (min-width: 900px) {
    .card-container {
        .card-buttons {
            text-align: center;
            grid-column: 2 / 3;
            grid-row: 1;
        }
    }
}

@media (max-width: 900px) {
    .card-header-wrapper {
        flex-direction: column;

        .card-buttons,
        .card-ranges {
            margin-top: 1rem;
            text-align: left;
        }
    }
}

// Dashboard page
.dashboard-page {
    .k-grid-toolbar .k-textbox {
        margin-bottom: 10px;
    }
}

@media (min-width: 480px) {
    .dashboard-page {
        .k-grid-toolbar .k-textbox {
            margin-bottom: 0;
            float: left;
        }

        .k-grid-toolbar .k-button {
            float: right;
        }
    }
}

@media (min-width: 768px) {
    .dashboard-page {
        .card-container:last-of-type {
            padding-top: 30px;
        }
    }
}
// Planning page
.planning-page {
    .card-container,
    .personal-card {
        grid-template-columns: repeat(1, 1fr);
    }

    .personal-card {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        grid-row-gap: 1em;
        row-gap: 1em;
    }

    .k-card-header {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card-title {
        grid-column: 1 / -1;
    }
    .k-hbox {
        padding: 0 20px;
        background: transparent;
        align-items: center;
    }
    .k-card-title {
        font-size: 15px;
        margin-bottom: -6px;
        text-align: left;
    }
    .k-card-subtitle {
        margin-top: 0;
        text-transform: uppercase;
        font-size: 11px;
    }
    .disabled {
        opacity: 0.5;
    }
}

@media (min-width: 480px) {
    .planning-page {
        .card-container,
        .personal-card {
            grid-template-columns: repeat(2, 1fr);
        }

        .k-hbox {
            padding-left: 0;
        }
    }
}

@media (min-width: 768px) {
    .planning-page {
        .k-hbox {
            border-width: 0;
        }
    }
}

@media (min-width: 960px) {
    .planning-page {
        .card-container {
            grid-template-columns: repeat(3, 1fr);
        }

        .personal-card {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

@media (min-width: 1130px) {
    .planning-page {
        .personal-card {
            grid-template-columns: repeat(3, 1fr);
        }
    }
}

@media (min-width: 1360px) {
    .planning-page {
        .card-container {
            grid-template-columns: repeat(5, 1fr);
        }
    }
}

@media (min-width: 1770px) {
    .planning-page {
        .personal-card {
            grid-template-columns: repeat(5, 1fr);
        }
    }
}

// Profile page
.profile-page {
    .card-container {
        text-align: left;
    }

    .k-form .k-form-field {
        display: block;
        padding: 0 15px;
        margin-top: 1.5rem;
    }

    .k-form .k-label {
        text-align: right;
    }

    .k-form-field:first-of-type .k-form-field-wrap {
        margin: auto;
    }

    .k-form-field:first-of-type .k-avatar {
        margin: 0 auto 1rem;
    }

    hr {
        margin-top: 2rem;
        opacity: 0.2;
    }

    .k-form .k-form-buttons {
        justify-content: center;

        & > * {
            min-width: 140px;
        }
    }
}

@media (min-width: 480px) {
    .profile-page {
        .k-form .k-form-field {
            display: flex;
        }

        .k-form-field:first-of-type .k-avatar {
            margin: 0;
        }
    }
}

@media (min-width: 768px) {
    .profile-page {
        .k-form {
            margin: 0 auto;
            padding: 0;
        }
        .k-form .k-form-field {
            padding: 0;
        }
    }
}

// Info page
.info-page {
    background-color: #06163e;
    background-image: url('./assets/images/info-bg.png');
    background-position: right 0px top 0px;
    color: $white;
    background-repeat: no-repeat;
    opacity: 0.9;

    h1,
    h2,
    h3,
    .component-link {
        font-family: Metric, Helvetica, Arial, sans-serif;
    }
    a:not(.k-button) {
        color: $link-color;
    }

    .content {
        padding-top: 40px;
        margin: 0 auto;
        position: relative;
        background-image: url('./assets/images/info-bg-line.png');
        background-repeat: repeat-y;
    }

    .section-1 {
        text-align: center;
        h1 {
            font-size: 48px;
            font-weight: bold;
        }

        h2 {
            font-size: 30px;
            margin-bottom: 53px;
        }

        .button-group {
            margin-bottom: 30px;

            .k-button {
                display: block;
                margin: 10px auto;
                min-width: 145px;
                width: 60%;
            }
        }

        .github-link {
            display: inline-flex;
            flex-direction: row;
            align-items: center;
            align-content: center;

            .github-text {
                margin-left: 15px;
            }
        }
    }

    .section-2 {
        text-align: center;
        margin-top: 40px;
        padding: 0 15px;
    }

    .section-3 {
        column-count: 2;
        margin-top: 40px;
        padding: 0 15px;
        text-align: center;

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

    .package-item {
        display: inline-block;
        margin-top: 20px;
    }

    .package-title a {
        font-size: 17px;
        color: #cccccc;
        text-transform: uppercase;
    }

    .component-link {
        padding: 5px 0;

        a {
            font-size: 20px;
        }
    }

    .footer {
        background-image: url('./assets/images/info-waves.svg');
        background-repeat: no-repeat;
        height: 320px;
        background-size: cover;
    }
}

@media (min-width: 480px) {
    .info-page {
        .content {
            padding: 40px 40px 40px;
        }

        .section-1 {
            h1 {
                font-size: 71px;
            }

            h2 {
                font-size: 38px;
            }

            .button-group {
                .k-button {
                    display: inline-block;
                    margin-right: 10px;
                    width: auto;
                }
            }
        }
    }
}

@media (min-width: 992px) {
    .info-page {
        .section-3 {
            column-count: 3;
        }
    }
}

@media (min-width: 1370px) {
    .info-page {
        .content {
            padding: 120px 40px 0;
        }
        .section-1,
        .section-2 {
            text-align: left;
            padding: 0;
        }
        .section-3 {
            text-align: left;
            column-count: 4;
            padding: 0;
        }
    }
}

// IE11 Adjustments
@media all and (-ms-high-contrast: none) {
    .k-drawer-container {
        &.k-drawer-push .k-drawer {
            position: static;
            height: auto;
        }
    }

    .planning-page {
        .card-title {
            margin-bottom: 1rem;
            text-align: left;
        }

        .personal-card {
            display: block;
            margin-bottom: 1rem;
        }
    }
}