﻿/*text*/

td, tr {
    font-family: opensans;
    font-size: 16px;
}

/*icons*/

.icon.cmsicon {
    font-family: cmsicons;
}

/*wrapper*/

.cmsWrapper {
    width: 100vw;
    height: 100vh;
    background-color: rgb(240,240,240);
}

.cmsWrapper h1, a, p, span, label, .cmsWrapper h2 {
    font-family: opensans;
    color: rgb(51,51,51);
}

/*Nav*/

.cmsNav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0px;
    float: left;
    width: 270px;
    height: 100vh;
    padding: 40px 30px 40px 30px;
    background-color: rgb(255,255,255);
    box-shadow: 3px 0px 6px rgba(0,0,0,0.16);
    overflow-y: auto;
    z-index: 10;
}

.cmsNav section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: solid 1px rgb(190,190,190);
}

.cmsNav section:first-of-type, .cmsNav section:last-of-type {
    padding-bottom: 0;
    margin-bottom: 30px;
    border-bottom: none;
}

.cmsNav section a {
    display: block;
    height: 40px;
    line-height: 40px;
    width: 100%;
}

.cmsNav a.active {
    width: calc(100% + 60px);
    padding: 0px 30px 0px 30px;
    background-color: rgb(221,221,221);
    margin: 0px -30px 0px -30px;
}

.cmsNav section a .icon {
    float: left;
    padding-left: 0;
    padding-right: 20px;
    max-width: 40px;
    font-size: 18px;
}

.cmsNav .userMenu .avatar, .cmsNav .userMenu p {
    float: left;
    margin-right: 30px;
}

.cmsNav .userMenu .avatar {
    height: 65px;
    width: 65px;
    background-size: cover;
    background-position: 50%;
    border-radius: 50%;
}

@media only screen and (max-width: 768px) {
    .cmsNav {
        width: initial;
        padding: 40px 10px 40px 10px;
    }

    .cmsNav section {
        flex-direction: column;
    }

    .cmsNav section a .icon {
        padding-right: 0;
        width: 40px;
        text-align: center;
    }

    .cmsNav section a span {
        display: none;
    }

    .cmsNav .userMenu p {
        display: none;
    }

    .cmsNav .userMenu .avatar {
        width: 40px;
        height: 40px;
        margin: 0;
    }

    .cmsNav a.active {
        width: calc(100% + 20px);
        padding: 0px 10px 0px 10px;
        background-color: rgb(220,220,220);
        margin: 0px -10px 0px -10px;
    }
}

/*Canvas*/

.cmsCanvas {
    width: 100vw;
    height: 100vh;
    padding: 0px 40px 40px 310px;
    overflow-y: scroll;
}

.menuTitle {
    display: flex;
    align-items: center;
    height: 105px;
    width: calc(100% + 80px);
    margin: 0px -40px 30px -40px;
    padding: 40px 0px 0px 40px;
}

@media only screen and (max-width: 768px) {
    .cmsCanvas {
        padding: 0px 30px 40px 90px;
    }

    .menuTitle {
        height: 80px;
        width: calc(100% + 60px);
        padding: 30px 0px 0px 30px;
        margin: 0px -30px 30px -30px;
    }
}

/*CMS toolbar*/

.cmsToolbar {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(100% + 80px);
    background-color: rgb(220,220,220);
    padding: 10px 40px 10px 40px;
    margin: 0px -40px 40px -40px;
    overflow-x: auto;
    z-index: 9;
}

.cmsToolbar .left {
    margin-right: auto;
}

.cmsToolbar .right {
    margin-left: auto;
}

/*Table*/

.tableWrapper {
    border-top: 4px solid rgb(220,220,220);
    border-bottom: 2px solid rgb(220,220,220);
    border-radius: 4px;
    overflow-x: auto;
    max-width: initial;
    margin-top: initial;
}

table {
    width: 100%;
    max-width: initial;
    border-collapse: collapse;
}

table thead td {
    background-color: rgb(220,220,220);
    padding-top: 6px;
}

table tr {
    border-bottom: 1px solid rgb(220,220,220);
}

table td {
    padding: 10px;
    font-family: opensans;
    font-size: 16px;
    min-width: 220px;
}

table td:first-child {
    padding-left: 20px;
}

table td:last-child {
    padding-right: 20px;
}

table tr td:first-of-type {
    min-width: 150px;
}

table td .icon {
    font-size: 16px;
    vertical-align: initial;
    cursor: pointer;
    padding-left: 0;
    padding-right: 20px;
}

table tfoot td {
    background-color: rgb(220,220,220);
    padding: 2px 10px 0px 0px;
}

/*pageIndex*/

.pageIndex .button {
    height: 30px;
    width: 30px;
    padding: 0;
    line-height: 29px;
    margin: 2px 10px -2px 0px;
}

.pageIndex .button .chevron {
    margin: 4px 0px 0px 3px;
}

/*pageSize*/

.pageSize form {
    width: initial;
    float: right;
}

.pageSize form input {
    width: 60px;
    float: right;
}

.pageSize form label {
    max-width: calc(100% - 60px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    float: left;
    padding: 0px 20px 0px 0px;
    line-height: 30px;
}

/*window*/

.cmsWindow {
    position: fixed;
    top: -350px;
    background-color: white;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 50px;
    border-radius: 0px 0px 10px 10px;
    box-shadow: 0px 5px 6px rgba(0,0,0,0.16);
    transition: all 0.4s;
    z-index: 11;
}

.cmsWindow.active {
    top: 0px;
    max-width: 400px;
}

.cmsWindow.active .cmsWindowContent {
    max-height: calc(100vh - 58px);
    overflow-y: auto;
}

.cmsWindow.detail.active {
    max-width: 600px;
}

.cmsWindowContent {
    padding: 20px;
    max-height: 0px;
    overflow-y: hidden;
    transition: all 0.4s;
}

.cmsWindowContent p {
    line-height: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmsWindowContent p b {
    display: inline-block;
    width: 130px;
}

.cmsWindow.active .cmsWindowContent p span.multiline {
    white-space: initial;
    overflow: initial;
    text-overflow: initial;
}

.cmsWindowContent label {
    font-weight: bold;
}

.cmsWindowContent form input, .cmsWindowContent form textarea {
    max-width: initial;
}

.cmsWindowContent form .inputGroup:last-of-type {
    padding-bottom: 0;
}

.cmsWindowActions {
    width: 100%;
    padding: 10px 20px 10px 20px;
    float: right;
    background-color: rgb(220,220,220);
    border-radius: 0px 0px 10px 10px;
}

.cmsWindowActions .button {
    float: right;
    margin-left: 15px;
}

@media only screen and (max-width: 768px) {
    .cmsWindowActions .button {
        width: 50%;
        border-radius: 0px;
        margin: 0;
    }

    .cmsWindowActions.single .button:last-child, .cmsWindowActions.single .button:first-child {
        border-radius: 4px;
        width: 100%;
    }

    .cmsWindowActions .button:last-child {
        border-radius: 4px 0px 0px 4px;
    }

    .cmsWindowActions .button:first-child{
        border-radius: 0px 4px 4px 0px;
    }
}

/*searchinput*/

.searchInput {
    float: left;
    max-width: 250px;
}

.searchInput label, .searchInput input {
    float: left;
}

body .searchInput input {
    border-radius: 4px 0px 0px 4px;
    max-width: calc(100% - 31px);
}

body .searchInput label {
    padding: 6px;
    height: 31px;
    width: 31px;
    border-radius: 0px 4px 4px 0px;
}

.searchInput label .icon {
    font-size: 16px;
    padding: 0px;
}

/*dashboard grid*/

.dashboardGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
}

.dashboardSection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: rgb(255,255,255);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0px 3px 6px rgba(0,0,0,0.16);
}

@media only screen and (max-width: 1150px) {
    .dashboardGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 640px) {
    .dashboardGrid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/*dashboard user card*/

.dashboardUserCard {
    grid-column-start: 1;
    grid-column-end: 3;
}

.dashboardUserCard .avatar {
    height: 100px;
    width: 100px;
    float: left;
    margin-right: 30px;
    background-size: cover;
    background-position: 50%;
    border-radius: 50%;
}

.dashboardUserCard .userActions {
    width: calc(100% - 130px);
}

.dashboardUserCard .userActions h2 {
    width: 100%;
    padding-bottom: 7px;
    border-bottom: 1px solid rgb(180,180,180);
}

.dashboardUserCard .userActions a {
    display: inline-block;
    padding-right: 20px;
    margin-top: 10px;
}

.dashboardUserCard .userActions a:hover {
    text-decoration: underline;
}

@media only screen and (max-width: 640px) {
    .dashboardUserCard {
        position: relative;
        grid-column-end: 2;
    }

    .dashboardUserCard .userActions {
        width: 100%;
    }

    .dashboardUserCard .avatar {
        display: none;
    }
}

/*statistics card*/

.dashboardSection.statistics h1, .dashboardSection.statistics span, .dashboardSection.statistics a {
    display: block;
    width: 100%;
    text-align: center;
}

/*editPage*/

.editPageWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    float: left;
    padding-bottom: 40px;
    width: 100%;
}

/*editgroup*/

.editPageGroup .contentWrapper {
    max-height: 0px;
    overflow: hidden;
    margin-bottom: 20px;
}

.editPageGroup.show .contentWrapper {
    max-height: initial;
}

.editPageGroup.show .showContentSwitch {
    margin-bottom: 20px;
}

.editPageGroup .contentWrapper form {
    margin: 0;
    max-width: initial;
}

.editPageGroup .contentWrapper form .formGroup {
    width: calc((100% / 3) - 20px);
    margin-left: 20px;
    border-bottom: none;
}

.editPageGroup .contentWrapper form .formGroup:first-child {
    width: calc(100% / 3);
    margin-left: 0px;
}

@media only screen and (max-width: 768px) {
    .editPageGroup .contentWrapper form .formGroup {
        width: calc(50% - 20px);
    }

    .editPageGroup .contentWrapper form .formGroup:first-child {
        width: 50%;
    }
}

@media only screen and (max-width: 520px) {
    .editPageGroup .contentWrapper form .formGroup {
        width: 100%;
        margin-left: 0px;
        border-bottom: 1px solid rgb(112,112,112);
    }

    .editPageGroup .contentWrapper form .formGroup:first-child {
        width: 100%;
    }
}

/*contentItem*/

.contentItem {
    position: relative;
    padding: 10px;
    margin: 20px 0px 20px 0px;
    float: left;
    width: 100%;
    max-width: 950px;
}

.contentItem:first-child {
    margin-top: 0px;
}

/*contentItem contents*/

.contentItem .spanImage {
    margin: 0;
}

.contentItem .contentList {
    padding-bottom: 0;
}

.contentItem .contentArticle :last-child {
    padding-bottom: 0;
}

/*contentitem actions*/

.contentItem .actions {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    position: absolute;
    background-color: rgba(255,255,255,0.9);
    z-index: 5;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.contentItem .actions.hidden {
    display: none;
}

.contentItem:hover .actions {
    opacity: 1;
    pointer-events: all;
}

.contentItem:hover .contentItem .actions {
    opacity: 0;
}

.contentItem .actions .action {
    height: 24px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgb(112,112,112);
    cursor: pointer;
}

.contentItem .actions .action:first-child {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.contentItem .actions .action img {
    height: 20px;
    padding-top: 2px;
}

.contentItem .actions .action.order {
    display: flex;
    align-items: center;
}

.contentItem .actions .action.order .chevron {
    float: left;
}

.contentItem .actions .action.order .chevron:first-child {
    margin-right: 15px;
}

/*add page content*/

.addPageContent {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 950px;
    float: left;
    padding: 10px;
    background-color: rgb(221,221,221);
    border-radius: 4px;
}

.addPageContent.emptyPage {
    border-radius: 4px;
    padding-bottom: 20px;
}

.addPageContent.emptyPage .emptyPageTitle {
    width: 100%;
    margin: 10px;
    text-align: center;
}

/*contentItemType*/

.contentItemType {
    display: flex;
    align-items: center;
    justify-content: center;
    float: left;
    height: 33px;
    min-width: 33px;
    padding: 0px 7px 0px 7px;
    margin-right: 15px;
    background-color: rgb(195,195,195);
    border-radius: 4px;
    cursor: pointer;
}

.contentItemType:last-of-type {
    margin-right: 0;
}

.contentItemType:hover {
    background-color: rgb(180,180,180);
}

.contentItemType img {
    height: 20px;
}

.contentItemType span {
    margin-left: 10px;
}

.contentItemTypeGroup {
    border-right: 1px solid rgb(112,112,112);
    padding-right: 20px;
    margin-right: 20px;
}

.contentItemTypeGroup:last-of-type {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

@media only screen and (max-width: 768px) {
    .contentItemType span {
        display: none;
    }
}

/*edit content*/

.editContent {
    position: relative;
    width: calc(100% + 20px);
    background-color: rgb(255,255,255);
    padding: 20px;
    border-radius: 4px;
    margin: 0px -10px 0px -10px;
    float: right;
    box-shadow: 0px 3px 6px rgba(0,0,0,0.16);
}

.editContent .editContentActions {
    width: calc(100% + 40px);
    padding: 10px 20px 10px 20px; 
    margin: 20px -20px -20px -20px;
    float: right;
    background-color: rgb(220,220,220);
}

.editContent .editContentActions .button {
    float: right;
    padding: 4px 10px 4px 10px;
}

/*editform*/

.editForm {
    display: flex;
    align-items: center;
    width: 100%;
    float: left;
    margin-top: 10px;
}

.editForm:first-of-type {
    margin-top: 0;
}

.editForm form {
    float: left;
    width: calc(100% - 170px);
}

.editForm form input, .editForm form textarea {
    margin: 0;
    max-width: initial;
    width: 100%;
}

.editForm form textarea {
    resize: vertical;
}

.editForm label {
    margin-bottom: 10px;
}

.editForm .editFormActions .action {
    display: flex;
    align-items: center;
    float: left;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgb(112,112,112);
    height: 24px;
    cursor: pointer;
}

.editForm .editFormActions .action img {
    height: 18px;
}

.editForm .order .chevron {
    float: left;
}

.editForm .order .chevron:first-child {
    margin-right: 15px;
}

.editForm form.imageInput {
    padding-top: 10px;
    padding-bottom: 10px;
}

.editForm form.spanImageInput {
    width: 100%;
}

.editForm form.imageInput .aButton {
    margin-bottom: 0;
    text-align: center;
    width: initial;
}

.editForm form.imageInput .filePreview img {
    margin-bottom: 20px;
    max-height: 250px;
}

/*file preview*/

.editForm .filePreview {
    width: 100%;
    float: left;
}

.editForm .filePreview:first-child {
    margin-top: 0;
}


.editForm .filePreview label {
    line-height: 30px;
    margin-bottom: 0;
}

.editForm .filePreview img {
    height: 30px;
    vertical-align: top;
    margin-right: 10px;
}

.editForm .filePreview .imgPreview img {
    max-height: 300px;
    max-width: 100%;
    height: initial;
    border-radius: 4px;
}

/*uploadbar*/

.uploadWindow {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255,255,255);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    border-radius: 4px;
}

.uploadWindow.active {
    opacity: 1;
}

.uploadWindow span:first-of-type {
    margin-bottom: 10px;
}

.uploadBar {
    position: relative;
    background-color: rgb(221,221,221);
    width: 100%;
    max-width: 200px;
    height: 10px;
    border-radius: 5px;
}

.uploadBar .fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: rgb(149,30,21);
    border-radius: 5px;
    transition: width 1s ease;
}


@font-face {
    font-family: opensans;
    src: url('../fonts/opensans.woff');
}


@font-face {
    font-family: icons;
    src: url('../fonts/icons.woff');
}

@font-face {
    font-family: cmsicons;
    src: url('../fonts/cmsicons.woff');
}