body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Carousel */
.carousel-caption p {
    font-size: 20px;
    line-height: 1.4;
}

/* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] {
    width: 100%;
}

/* QR code generator */
#qrCode {
    margin: 15px;
}

/* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) {
    /* Hide captions */
    .carousel-caption {
        display: none;
    }
}

/* Hours summary grid on the Time Entries page */
.hours-summary .panel-heading .label {
    display: inline-block;
    margin: 6px 4px 0 0;
}
.hours-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
}
.hours-grid th {
    font-size: 12px;
    color: #777;
}
.hours-grid .hours-week {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
    padding-right: 8px;
}
.hours-grid .hours-total,
.hours-grid .hours-variance {
    text-align: right;
    white-space: nowrap;
    padding: 0 6px;
}
.hours-grid tfoot td {
    border-top: 1px solid #ddd;
    padding-top: 6px;
    font-weight: bold;
}
.project-hours {
    margin-top: 12px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}
.project-hours summary {
    cursor: pointer;
    color: #337ab7;
}
.project-hours table {
    margin: 8px 0 0;
}
.hours-cell {
    min-width: 48px;
    height: 46px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.hours-cell-date {
    display: block;
    font-size: 11px;
    opacity: .75;
}
.hours-cell-hours {
    display: block;
    text-align: right;
    font-weight: bold;
}
.hours-cell.complete { background: #dff0d8; color: #3c763d; }
.hours-cell.short { background: #f2dede; color: #a94442; border-color: #ebccd1; }
.hours-cell.weekend { background: #d9edf7; color: #31708f; }
.hours-cell.upcoming { color: #777; border: 1px dotted #ddd; }
.hours-cell.weekend.empty { background: none; color: #777; border: 1px dashed #ddd; }
.hours-cell.out { border: 1px dashed #ddd; opacity: .35; }
.hours-cell[role=button] { cursor: pointer; }

/* Keep the new-entry form in view beside a long entries list. 70px clears the 50px fixed navbar. */
@media (min-width: 992px) {
    .new-entry-column {
        position: sticky;
        top: 70px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* Entries list on the Time Entries page: Week > Day > Entry, each level indented,
   with a guide line tying a day's entries to its row and no dividers between them. */
.entries-list > tbody > tr > td {
    vertical-align: middle;
}

.entries-list > tbody > tr.week-head > th {
    background: #e3edf7;
    border-top: 2px solid #337ab7;
    color: #245580;
    font-size: 12px;
    letter-spacing: .05em;
    padding: 7px 12px;
    text-transform: uppercase;
}

.entries-list > tbody > tr.day-head > th {
    background: #f5f5f5;
    padding-left: 28px;
}

/* Clears the fixed navbar when a grid cell scrolls the list to a day. */
.entries-list > tbody > tr.day-head {
    scroll-margin-top: 70px;
}

/* A short day's missing time: thin grey stripes on the row, so they run on across cells, from the entry
   indent to the table's right edge. The indent stays plain, with the guide line, so the row reads as part of the day. */
.entries-list > tbody > tr.missing-time {
    background: repeating-linear-gradient(-45deg, #e8e8e8 0 4px, #fff 4px 8px);
    color: #777;
    cursor: pointer;
    font-size: 12px;
}

.entries-list > tbody > tr.missing-time:hover,
.entries-list > tbody > tr.missing-time:focus {
    background: repeating-linear-gradient(-45deg, #d5d5d5 0 4px, #fff 4px 8px);
    color: #333;
}

.entries-list > tbody > tr.missing-time:focus {
    outline: 2px solid #66afe9;
    outline-offset: -2px;
}

/* No borders above or below: the row's stripes would show through them in the plain indent. */
.entries-list > tbody > tr.missing-time > td,
.entries-list > tbody > tr.missing-time + tr.entry > td {
    border-top: 0;
}

.entries-list > tbody > tr.missing-time > td {
    background-color: transparent;
    padding-bottom: 2px;
    padding-top: 2px;
}

.entries-list > tbody > tr.missing-time > td:first-child {
    background: linear-gradient(#ddd, #ddd) 34px 0 / 2px 100% no-repeat, linear-gradient(#fff, #fff) 0 0 / 52px 100% no-repeat;
}

.entries-list > thead > tr > th:first-child,
.entries-list > tbody > tr.entry > td:first-child {
    padding-left: 52px;
}

.entries-list > tbody > tr.entry > td {
    border-top-color: transparent;
}

.entries-list > tbody > tr.entry > td:first-child {
    background-image: linear-gradient(#ddd, #ddd);
    background-position: 34px 0;
    background-repeat: no-repeat;
    background-size: 2px 100%;
}

/* The project cell takes the spare width, and max-width: 0 lets its notes truncate to it rather than widen the table. */
.entries-list > tbody > tr.entry > td:first-child {
    max-width: 0;
    width: 100%;
}

.entry-notes {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-charge {
    margin-left: 4px;
}

.no-charge > svg {
    vertical-align: -1px;
}

.entries-list-meta {
    float: right;
    font-weight: normal;
    letter-spacing: 0;
    text-transform: none;
}

/* Above the footer and page content, below Bootstrap's modals and popovers. */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1030;
}
