*:not(textarea):not(input) {
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -moz-touch-callout: none;
    -ms-touch-callout: none;
    touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body, html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    margin: 0;
    padding: 0;
}

body {
    overflow: auto;
    overflow-x: hidden;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

th {
    background: #ccc;
    color: #fff;
}

#LoginContainer, #AppMain {
    height: 100vh;
    display: none;
}

aside i {
    width: 25px;
    text-align: center;
}

/* Hide selections on tabs and such. Makes the app feel more app'ish */
a, p {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

a::selection, p::selection {
    background: transparent;
}

a::-moz-selection, p::-moz-selection {
    background: transparent;
}

/* Media queries to handle the background image properly */
@media screen and (min-width: 0) and (max-width: 640px) {
    body {
        background-image: url(../images/bg-640x1200.jpg);
    }
}

@media screen and (min-width: 641px) and (max-width: 960px) {
    body {
        background-image: url(../images/bg-960x1200.jpg);
    }
}

@media screen and (min-width: 961px) and (max-width: 1280px) {
    body {
        background-image: url(../images/bg-1280x1200.jpg);
    }
}

@media screen and (min-width: 1281px) {
    body {
        background-image: url(../images/bg-1920x1200.jpg);
    }
}

/** IPHONE 5 RESOLUTION */
@media only screen and (device-width: 320px) and (-webkit-min-device-pixel-ratio: 2) {
    body {
        background-image: url(../images/bg-iphone5.jpg);
    }
}

/** IPHONE 4 RESOLUTION */
@media only screen and (device-width: 640px) and (device-height: 960px) {
    body {
        background-image: url(../images/bg-iphone4.jpg);
    }
}

p {
    margin-bottom: 0;
}

h1 {
    color: #FFF;
    font-size: 1.125rem;
}

h2 {
    color: #FFF;
    text-shadow: #1B4469 1px 2px 1px;
    text-indent: 3px;
    font-weight: 400;
    font-size: 1.2rem;
}

h3 {
    font-size: 1.17em;
    margin-top: 0;
}

a {
    color: #3588C6;
}

table {
    width: 100%;
}

.page-content {
    padding-top: 10px;
    padding-bottom: 10px;
}

div.page, div.drilldown, div.replace {
    overflow: auto;
    width: 100%;
    position: absolute;
    top: 0;
    height: inherit;
}

.actionButtons li {
    padding-top: 0;
    padding-bottom: 5px;
}

.actionButtons .button {
    margin: 0;
    width: 100%;
}

.actionButtons .button > div {
    height: 24px;
    overflow: hidden;
}

#dynamic-page-container {
    height: 100%;
    position: relative;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-overflow-scrolling: touch;
}

/** EPICLY WEIRD ANDROID BUG: http://stackoverflow.com/questions/20409632/android-4-3-and-phonegap-cant-tap-link */
#dynamic-page-container > * {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

body.web #dynamic-page-container > *,
body.android #dynamic-page-container > * {
    padding-bottom: 40px;
}

#window-title {
    width: 100%;
    overflow: hidden;
    height: inherit;
    font-weight: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: center;
}

input {
    -webkit-user-select: auto !important;
    -khtml-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
}

input.readonly, textarea.readonly, select.readonly {
    border: 0;
}

button.black {
    background-color: #45484d;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#45484d), to(#000000));
    background-image: -webkit-linear-gradient(top, #45484d, #000000);
    background-image: -moz-linear-gradient(top, #45484d, #000000);
    background-image: -ms-linear-gradient(top, #45484d, #000000);
    background-image: -o-linear-gradient(top, #45484d, #000000);
    background-image: linear-gradient(to bottom, #45484d, #000000);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#45484d, endColorstr=#000000);
}

button.black:hover {
    background-color: #2d2f32;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#2d2f32), to(#1a1a1a));
    background-image: -webkit-linear-gradient(top, #2d2f32, #1a1a1a);
    background-image: -moz-linear-gradient(top, #2d2f32, #1a1a1a);
    background-image: -ms-linear-gradient(top, #2d2f32, #1a1a1a);
    background-image: -o-linear-gradient(top, #2d2f32, #1a1a1a);
    background-image: linear-gradient(to bottom, #2d2f32, #1a1a1a);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#2d2f32, endColorstr=#1a1a1a);
}

/* Make fontawesome icons on buttons larger */
a.button.btn-icon {
    padding: 0.66rem;
    width: 49%;
}

a.button.btn-icon i {
    font-size: 1.5rem;
    display: block;
    line-height: 1.8rem;
}

/** Page specifics */

/* Project */
.ProjectDate {
    font-size: .8rem;
}

#Project-Description {
    padding: .7rem;
}

.ProjectTitle {
    margin-bottom: 0.1rem;
}

.ProjectID {
    float: right;
    color: #666;
    font-size: .8rem;
}

.io {
    padding: 0 1em;
}

/* Project file archive */
@media only screen and (max-width: 40em) {
    .io {
        column-count: 2;
        -moz-column-count: 2;
        -webkit-column-count: 2;
    }
}

@media only screen and (min-width: 40.063em) and (max-width: 64em) {
    .io {
        column-count: 3;
        -moz-column-count: 3;
        -webkit-column-count: 3;
    }
}

@media only screen and (min-width: 64.063em) {
    .io {
        column-count: 4;
        -moz-column-count: 4;
        -webkit-column-count: 4;
    }
}

/* Invert colors on folders, making them easy to spot */
.io.folders a.file {
    background: #3087C8;
    color: #FFF;
    border-color: #3087C8;
}

.io a.th {
    box-shadow: none !important;
}

.io a.th.file {
    padding: 1rem;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.io a.th.file i {
    font-size: 60px;
    display: block;
    padding-bottom: 1rem;
}

/* Planning */
#Planning-Table h3 {
    margin-bottom: 0;
}

/* Project create/edit */
#ProjectCreate-SearchCustomer {
    position: relative;
}

#ProjectCreate-TypeAheadLoader {
    position: absolute;
    top: 17px;
    right: 22px;
    height: 1.59rem;
    width: 1.59rem;
}

@media screen and (max-width: 767px) {
    .ios.major-7 #ProjectCreate-SelectCustomer dl,
    .ios.major-8 #ProjectCreate-SelectCustomer dl {
        margin-top: 65px;
    }
}

@media screen and (min-width: 768px) {
    #ProjectCreate-SelectCustomer dl,
    #ProjectCreate-SelectCustomer > div {
        margin-top: 0;
    }
}

#AddinReveal {
    padding: 14px 0 14px 0;
}

/* MAPS */
.no-gps-position {
    background: #EEE;
    height: 100%;
    width: 100%;
    padding: 120px 20px 0;
    position: absolute;

}

.no-gps-position i {
    float: left;
    font-size: 5em;
    margin-right: 20px;
}

.no-gps-position .desc {
    padding-left: 4.3em;
}

/* Styles for ComeAndGo*/
#MM_ComeAndGo {
    color: #CCC;
    margin-bottom: 4px;
    font-size: 14px;
}

#MM_ComeAndGoSwitchContainer {
    padding: 5px;
    margin-top: 2px;
}

#MM_ComeAndGoSwitchContainer label {
    float: right;
    margin: 0;
}

.mm-custom-field-switch label {
    float: right;
    margin: 0;
}

#MM_ToggleTimeSubtractBreak label {
    margin: 0;
}

#MM_ToggleTime {
    font-size: 13px;
    width: 100%;
    padding: 0;
    margin: 5px 0 0 0;
    overflow: hidden;
    display: none;
    color: #FFF;
}

#MM_ToggleTimeSubtractBreak {
    display: none;
}

#MM_ToggleTimeNormalLabel,
#MM_ToggleTimeOvertimeLabel {
    text-overflow: ellipsis;
    overflow: hidden;
    padding-right: 0;
}

#MM_ToggleTime hr {
    border: 0;
    height: 1px;
    background: #262626;
    margin: 10px 0;
}

#MM_ToggleTimeStart,
#MM_ToggleTimeStop,
#MM_ToggleTimeTotal,
#MM_ToggleTimeBreakTime,
#MM_ToggleTimeTotalNormal,
#MM_ToggleTimeTotalOvertime {
    padding-right: 0;
}

#MM_ToggleTimeCancel,
#MM_ToggleTimeSave {
    margin: 0;
}

#MM_ToggleTimeButtonsContainer {
    float: right;
    margin: 5px;
}

#ProjectCreate-SearchCustomerCustomContainer {
    padding: 0 18px 18px 18px;
}

#project-menu .Map_Container {
    padding: 5px;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}

#project-menu .Map_Container label {
    float: right;
    margin: 0;
}

#Map_Menu li i {
    float: left;
    margin-top: 12px;
    margin-right: 5px;
}

.terms-of-trade {
    overflow: scroll;
    height: 100px;
    border-radius: 3px;
    border: 1px solid #ccc;
    padding: 0.1rem 0.5rem;
    margin-bottom: 1em;
    -webkit-overflow-scrolling: touch;
}

.terms-of-trade p {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.75);
}

#Calendar-DateInterval-Container {
    display: none;
}

label[for=Calendar-DateInterval] {
    float: left;
    margin-right: 10px !important;
    margin-bottom: 8px !important;
}

#Calendar-DateText {
    margin-top: 2px;
    float: left;
}

#TimeRegistration-Buttons a {
    margin-bottom: 6px;
}

#TimeRegistration-Buttons a:nth-child(even) {
    float: right;
}

#TimeRegistration-Buttons a:nth-child(odd) {
    float: left;
}

/* iPad boxoption renderer (See documentation in components/boxoption-renderer/definition.js) */
.boxoption-container {
    height: 213px;
    overflow: auto;
    padding: 5px;
    border: 1px solid #CCC;
    margin-bottom: 5px;
}

.boxoption-container label {
    line-height: 1.5;
    clear: left;
}

.boxoption-container label input {
    float: left;
    margin: 4px 10px 0 0;
}

.boxoption-container label.checked {
    background: #EEE;
}

.tag {
    display: inline-block;
    padding: 3px 11px;
    font-size: .9rem;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
}

ul.tags li.tag {
    margin: 1px;
    white-space: pre;
}

ul.tags {
    margin: 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-gap-5 {
    display: grid;
    grid-gap: 5px;
}
