/* General styles */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body, html {
    font-size: 16px;
}

body {
    font-family: 'Ubuntu', sans-serif;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: auto;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

strong {
    font-weight: bold;
}

em {
    font-weight: 400;
    font-style: italic;
}

p {
    line-height: 150%;
}

.print-only {
    display: none;
}

.loading-icon {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.07);
    display: none;
    z-index: 100;
}

.loading-icon-outer {
    display: table;
    position: absolute;
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
}

.loading-icon-inner {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.loading-icon-inner img {
    display: inline-block;
    width: 64px;
    background-color: white;
    padding: 8px;
    border-radius: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
}

.popup-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none;
}

.content-top-stripe {
    height: 1rem;
    overflow: hidden;
    white-space: nowrap;
    background-color: #ed1c24;
    background-color: #b18804;
}

.image-outer {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    height: 0px;
}

.image-outer img {
    display: block;
    width: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
}

.full-bleed-image {
    top: -1.2rem;
    width: calc(100% + 1.6rem);
    left: -0.8rem;
}

.flashed-messages {
    position: fixed;
    width: 100vw;
    left: 0;
    top: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.message-error,
.message-success {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    background-color: #e6e6e6;
    border: 1px solid #d9d9d9;
    color: #4f4f4f;
    border-radius: 0.375em;
    padding: 0.9em;
    padding-left: 2.7em;
    padding-right: 2.5em;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.10);
    margin-top: -8em;
    opacity: 0.0;
    transition: margin-top 0.2s, opacity 0.2s;
    text-align: left;
    position: relative;
    max-width: 35rem;
    line-height: 120%;
}

.flashed-messages.visible .message-error,
.flashed-messages.visible .message-success {
    margin-top: 1em;
    opacity: 1.0;
}

.message-error {}

.message-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.message-error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.message-success::before,
.message-error::before {
    content: ' ';
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 1em;
    width: 1em;
    height: 1em;
    display: block;
    position: absolute;
    left: 1em;
    top: 1em;
}

.message-success::before {
    background-image: url(../images/success_icon.svg);
}

.message-error::before {
    background-image: url(../images/error_icon.svg);
}

.message-success::after,
.message-error::after {
    content: ' ';
    background-image: url(../images/close_x_black.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 1.5em;
    width: 1.5em;
    height: 1.5em;
    display: block;
    position: absolute;
    right: 0.8em;
    top: 0.8em;
    opacity: 0.6;
    cursor: pointer;
}

.message-success:hover::after,
.message-error:hover::after {
    opacity: 1.0;
}

@media all and (min-width: 900px) {
    .full-bleed-image {
        width: calc(100% + 3rem);
        left: -1.5rem;
    }

    html.admin body {
        max-width: none;
        width: 95%;
    }
}

@media all and (min-width: 1400px) {
    body, html {
        font-size: 18px;
    }

    html.admin body, html.admin {
        font-size: 16px;
    }
}

@media all and (min-width: 1700px) {
    body, html {
        font-size: 20px;
    }

    html.admin body, html.admin {
        font-size: 16px;
    }
}


/* Saving status icon */

.saving-status {
    width: 5.6rem;
    padding: 0.2rem;
    text-align: right;
    position: absolute;
    top: 0;
    right: 0;
    vertical-align: middle;
    border-bottom-left-radius: 0.5rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.05s;
    background-color: #ffffffc7;
    white-space: nowrap;
}

.saving-status.visible {
    opacity: 1.0;
}

.saving-status span {
    display: inline-block;
    vertical-align: middle;
    font-size: 0.875rem;
    margin-right: 0.3em;
}

.saving-status img {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    animation-name: spin;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* Site top */

.site-top {
    padding: 0.8rem;
    padding-bottom: 1rem;
}

.top-left-area {}

.logo-link {
    display: block;
}

.logo-link img {
    display: block;
    width: 100%;
    max-width: 375px;
}

.top-right-area {
    display: none;
}

.system-title {
    text-align: right;
    font-weight: 300;
    font-size: 1.125rem;
    margin-top: 0.9em;
}

.nav-inner .system-title {
    color: white;
    padding-right: 0.8rem;
}

.top-right-area h2 {
    font-weight: 700;
    text-align: left;
    margin-left: 23vw;
    font-size: 6vw;
    margin-top: 0.2em;
}


@media all and (min-width: 400px) {
    .top-right-area h2 {
        margin-left: 92px;
        font-size: 1.25rem;
    }
}

@media all and (min-width: 700px) {
    .site-top {
        display: table;
        width: 100%;
    }

    .top-left-area {
        display: table-cell;
        width: 375px;
    }

    .top-right-area {
        display: table-cell;
        vertical-align: top;
        padding-top: 0.6rem;
    }

    .top-right-area h2 {
        margin-left: 0;
        text-align: right;
        margin-top: 0.3em;
    }
}

@media all and (min-width: 900px) {
    .site-top {}

    .nav-inner .system-title {
        display: none;
    }
}


/* Navigation */

.nav-outer {
    position: fixed;
    left: -100vw;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 100%;
    width: calc(100% - 0.5rem);
    max-width: 25rem;
    background-color: #636359;
    transition: left 0.22s;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    z-index: 5;
}

.nav-outer.visible {
    left: 0rem;
}

.nav-close-icon {
    position: absolute;
    display: none;
    width: 2.8rem;
    top: 0.8rem;
    right: 0.8rem;
    opacity: 0.3;
}

.nav-close-icon img {
    width: 100%;
    display: block;
}

.hamburger {
    display: block;
    position: fixed;
    left: 0.8rem;
    bottom: 0.8rem;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background-color: #333;
    text-align: center;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.hamburger.opened {}

.hamburger img {
    width: 70%;
    padding-top: 15%;
    padding-bottom: 15%;
    display: inline-block;
}

.hamburger .close-icon {
    display: none;
}

.hamburger.opened .open-icon {
    display: none;
}

.hamburger.opened .close-icon {
    display: inline-block;
}

.nav-inner {
    position: absolute;
    left: 1rem;
    top: 1rem;
    right: 1rem;
    bottom: 5rem;
    overflow-y: auto;
}

.nav-inner h2 {
    color: white;
    padding-left: 0.2rem;
    padding-right: 0.8rem;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0.4rem;
    text-align: right;
}

.nav-inner>ul a {
    text-decoration: none;
    color: white;
    line-height: 190%;
    font-size: 1.125rem;
    padding-left: 0.2em;
    padding-right: 0.2em;
    cursor: default;
}

.nav-inner>ul a.complete {
    position: relative;
}

.nav-inner>ul a.complete::after {
    content: ' ';
    position: absolute;
    display: block;
    right: -1.1em;
    top: 0.15em;
    width: 0.8em;
    height: 0.8em;
    background-image: url(../images/checkmark.svg?v=2);
    background-position: center center;
    background-size: 100%;
}

.nav-inner>ul {
    margin-top: 1.2em;
    transition: max-height 0.2s;
    overflow: hidden;
}

.nav-inner>ul.hidden {
    max-height: 0rem;
}

.nav-inner>ul li {
    background-color: transparent;
    transition: background-color 0.15s;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.nav-inner>ul li.current {
    background-color: #b18804;
}

.nav-inner>ul>li {
    position: relative;
}

.nav-inner>ul>li.with-back-arrow>a {
    background-image: url(../images/arrow_left_line.svg);
    background-repeat: no-repeat;
    background-position: right -0.1em;
    background-size: 1.5em;
    padding-right: 2.9rem;
}

.nav-inner>ul>li.expandable::after,
.nav-inner>ul>li.expanded::after {
    content: ' ';
    position: absolute;
    display: block;
    right: 1.1em;
    top: 0.3em;
    width: 1.6em;
    height: 1.6em;
    background-image: url(../images/expand.svg?v=2);
    background-position: center center;
    background-size: 100%;
    opacity: 1;
}

.nav-inner>ul>li.expanded::after {
    transform: rotate(180deg);
}

.nav-inner>ul>li>a {
    font-weight: 700;
}

.nav-inner>ul ul {
    overflow: hidden;
    transition: max-height 0.3s;
}

.nav-inner>ul>li.expanded ul {
    max-height: 27rem;
}

.nav-inner>ul>li.expandable ul {
    max-height: 0rem;
}

.nav-inner>ul ul>li {
    padding-left: 0.7rem;
    position: relative;
}

.nav-inner>ul ul>li:last-child {
    margin-bottom: 0.7em;
}

.nav-inner>ul ul>li>a {
    font-weight: 300;
}

@media all and (min-width: 900px) {
    .hamburger {
        display: none;
    }

    .site-middle {
        display: table;
        table-layout: fixed;
        width: 100%;
    }

    .nav-outer {
        display: table-cell;
        table-layout: fixed;
        vertical-align: top;
        position: static;
        box-shadow: none;
        left: auto;
        top: auto;
        right: auto;
        bottom: auto;
        width: 20rem;
        box-sizing: border-box;
        min-width: 20rem;
        padding-left: 1rem;
        padding-bottom: 4rem;
    }

    .nav-inner {
        position: static;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: visible;
        padding-top: 1rem;
    }

    .nav-inner h2 {
        display: none;
    }

    .nav-inner>ul {
        margin-top: 0;
    }

    .nav-inner>ul li {
        cursor: pointer;
    }

    .nav-inner>ul a {
        cursor: pointer;
    }

    .nav-inner>ul li.expandable:hover,
    .nav-inner>ul li:hover,
    .nav-inner>ul li.current {
        background-color: #b18804;
    }

    .nav-inner>ul>li.expanded:hover {
        background-color: transparent;
    }
}


/* Site middle - overall layout */

.site-middle {}

.main-content {
    background-color: #eeefea;
}

.main-content-inner {
    padding: 0.8rem;
    padding-top: 1.2rem;
    position: relative;
}

.main-content p {
    font-weight: 400;
    font-size: 1rem;
    margin-top: 1em;
    margin-left: auto;
    margin-right: auto;
}

.main-content p.light {
    font-weight: 300;
}


.main-content p.intro {
    font-weight: 300;
    width: 90%;
    text-align: center;
}

@media all and (min-width: 600px) {
    .main-content p {}

    .main-content p.intro {
        font-size: 1.125rem;
        width: 80%;
    }
}

@media all and (min-width: 900px) {
    .main-content {
        display: table-cell;
        vertical-align: top;
    }

    .main-content-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}


/* Form layouts */

.form-page {
    display: none;
    min-height: 60vh;
}

.edit-view .form-page {
    min-height: unset;
    padding-bottom: 1rem;
}

.edit-view .form-page,
.filter-form {
    max-width: 60rem;
}


.form-page.visible {
    display: block;
    opacity: 1.0;
    transition: opacity 0.18s;
}

.form-page.faded-out {
    opacity: 0.0;
}

.layout-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.layout-row.bottom-aligned {
    align-items: flex-end;
}

.layout-row.space-above {
    margin-top: 1.2rem;
}

.col-100, .col-50, .col-25 {
    margin-bottom: 0.8rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.col-100 {
    flex: 2 90%;
}

.col-50 {
    flex: 2 90%;
}

.col-25 {
    flex: 1 45%;
}

.centered,
html body .centered {
    text-align: center;
}

.edit-view .centered {
    text-align: left;
}

.form-page-buttons-outer {
    visibility: hidden;
}

.form-page-buttons-outer.visible {
    visibility: visible;
    opacity: 1.0;
    transition: opacity 0.18s;
}

.form-page-buttons-outer.faded-out {
    opacity: 0;
}

.form-page-buttons {
    display: table;
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}


.form-page-buttons .buttons-left {
    display: table-cell;
    width: 33%;
    text-align: left;
}

.form-page-buttons .buttons-right {
    display: table-cell;
    width: 50%;
    text-align: right;
}

.form-page-buttons .buttons-right .btn {
    margin-left: 0.8em;
}

.form-page h2 {
    font-weight: 700;
    margin-top: 1em;
    line-height: 125%;
    font-size: 1.25rem;
    text-align: center;
}

.form-page h3 {
    font-weight: 700;
    margin-top: 1em;
    line-height: 125%;
    font-size: 1.125rem;
}

.form-page h3 .heading-note {
    font-weight: 300;
    font-size: 1rem;
    margin-left: 0.5em;
}

.hideable {
    overflow: hidden;
    transition: max-height 0.2s;
    max-height: 7em;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.hideable.large {
    max-height: 60em;
}

.hideable.hidden {
    max-height: 0em;
}

@media all and (min-width: 550px) {
    .col-100 {
        flex: 4 90%;
    }

    .col-50 {
        flex: 2 45%;
    }

    .col-25 {
        flex: 1 21.4%;
    }
}


/* Form content sections */

.content-section {}

.content-section p {
    text-align: left;
    width: 100%;
    font-size: 1rem;
    font-weight: 300;
}

.content-section ol {}

.content-section ol {
    list-style-type: decimal;
    padding-left: 1.1rem;
}

.content-section ol.roman {
    list-style-type: upper-roman;
}

.content-section ol.roman>li {
    font-weight: 700;
}

.content-section ol.upper-alpha {
    list-style-type: upper-alpha;
}

.content-section ol>li {
    padding-left: 0.5rem;
    padding-top: 1rem;
    font-weight: 300;
    line-height: 125%;
}

.content-section ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.content-section ul>li {
    margin-top: 1em;
    font-weight: 300;
    line-height: 150%;
}

.content-section ul ul {
    list-style-type: circle;
}

.content-section ul ul>li {}

.content-section a {
    color: #ed1c24;
}

.verified-checkmark {
    padding-top: 0.2em;
    margin-top: 1em;
}

.verified-checkmark img {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: -0.1em;
}


/* Form control styles */

.layout-row label {
    display: block;
    margin-top: 0.6em;
    color: #212529;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.layout-row label.tabular-prompt {
    line-height: 150%;
    margin-top: 0.4em;
}

.layout-row input,
.layout-row select,
.layout-row textarea {
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.layout-row input[type="text"],
.layout-row input[type="password"],
.layout-row select,
.layout-row textarea {
    display: block;
    width: 100%;
    margin-top: 0.5em;
    padding: .375em .75em;
    font-size: 1rem;
    font-weight: 400;
    font-family: inherit;
    line-height: 1.5;
    color: #212529;
    background-color: white;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.layout-row input[type="text"]::placeholder,
.layout-row input[type="password"]::placeholder,
.layout-row select::placeholder,
.layout-row textarea::placeholder {
    font-weight: 300;
    color: #999;
}

.layout-row input[type="radio"],
.layout-row input[type="checkbox"] {
    display: inline-block;
    vertical-align: top;
    width: 1em;
    height: 1em;
    font-size: 1rem;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid rgba(0, 0, 0, .25);
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: contain;
}

.layout-row input[type="radio"] {
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}


.layout-row input[type="checkbox"] {
    border-radius: 0.25em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}


.layout-row input[type="radio"]:checked,
.layout-row input[type="checkbox"]:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.layout-row select {
    padding: 0.375em 2.25em 0.375em 0.75em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75em center;
    background-size: 16px 12px;
}

.layout-row textarea {
    resize: vertical;
    min-height: calc(1.5em + .75rem + 2px);
}

.layout-row input:focus,
.layout-row .btn:focus,
.layout-row select:focus,
.layout-row textarea:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
}

.layout-row input:disabled,
.layout-row select:disabled,
.layout-row textarea:disabled {
    background-color: #e9ecef;
}

.layout-row .checkbox-list {}

.layout-row .checkbox-list-item {
    display: inline-block;
    margin-right: 2em;
    white-space: nowrap;
}

.layout-row .checkbox-list-item input,
.layout-row .checkbox-list-item label {
    margin-top: 0.7em;
    white-space: normal;
    line-height: 125%;
}

.layout-row .checkbox-list-item label {
    display: inline-block;
    vertical-align: top;
    padding-left: 0.3em;
    margin-top: 0.6em;
}

.layout-row .btn {
    display: inline-block;
    padding: 0.375em 0.75em;
    margin-top: 0.5em;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5;
    color: #444;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    border: 1px solid #444;
    border-radius: 0.375em;
    background-color: transparent;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

div.validation {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 1em;
}

.layout-row .checkbox-list-item.error input,
.layout-row input.error,
.layout-row select.error,
.layout-row textarea.error {
    border-color: #dc3545;
}

.layout-row .checkbox-list-item.error input:focus,
.layout-row input.error:focus,
.layout-row select.error:focus,
.layout-row textarea.error:focus {
    box-shadow: 0 0 0 0.25em rgb(220 53 69 / 25%);
}

.layout-row .checkbox-list-item.error label {
    color: #dc3545;
}

@media (hover: hover) {
    .layout-row .btn:hover {
        color: white;
        background-color: #444;
    }
}

.layout-row .btn-primary {
    color: white;
    background-color: #ed1c24;
    border-color: #ed1c24;
}

@media (hover: hover) {
    .layout-row .btn-primary:hover {
        background-color: #cb181f;
        border-color: #cb181f;
    }
}

.layout-row .btn-minor {
    border-color: transparent;
}

@media (hover: hover) {
    .layout-row .btn-minor:hover {
        background-color: #d5d5d5;
        color: black;
    }
}

.layout-row .btn.back-arrow {
    background-image: url(../images/arrow_back.svg);
    background-repeat: no-repeat;
    background-size: 0.8em;
    background-position: 0.5em center;
    padding-left: 1.4em;
}

.layout-row .btn.back-arrow:hover {}

.layout-row .btn.forward-arrow {
    background-image: url(../images/arrow_forward_white.svg);
    background-repeat: no-repeat;
    background-position: right 0.45em center;
    background-size: 0.8em;
    padding-right: 1.6em;
}

.layout-row .btn.forward-arrow:hover {}

.layout-row .btn.forward-arrow-black {
    background-image: url(../images/arrow_forward.svg);
    background-repeat: no-repeat;
    background-position: right 0.45em center;
    background-size: 0.8em;
    padding-right: 1.6em;
}

.layout-row .btn.forward-arrow-black:hover {
    background-image: url(../images/arrow_forward_white.svg);
}

.layout-row .btn.down-arrow {
    background-image: url(../images/arrow_down.svg);
    background-repeat: no-repeat;
    background-position: right 0.45em center;
    background-size: 1.3em;
    padding-right: 1.9em;
}

.layout-row .btn.down-arrow:hover {
    background-image: url(../images/arrow_down_white.svg);
}

@media all and (min-width: 900px) {

    .layout-row .checkbox-list-item input,
    .layout-row .checkbox-list-item label {
        cursor: pointer;
    }
}


/* Medication form */

.medication-table {
    width: 100%;
    max-width: 42em;
    table-layout: fixed;
    font-size: 0.875rem;
}

.medication-table tr {}

.medication-table th, .medication-table td {
    box-sizing: border-box;
}

.medication-table th {
    font-weight: 300;
    padding-right: 0.5rem;
    vertical-align: bottom;
    line-height: 125%;
    text-align: left;
}

.medication-table td {
    padding-right: 0.5rem;
    vertical-align: middle;
    opacity: 1.0;
    transition: opacity 0.4s;
}

.medication-table tr.hidden td {
    opacity: 0;
}

.medication-table th:nth-child(1) {
    width: 50%;
}

.medication-table th:nth-child(2) {
    width: 20%;
    width: calc(25% - 1.5em);
}

.medication-table th:nth-child(3) {
    width: 20%;
}

.medication-table th:nth-child(4) {
    width: 1.5em;
}

.medication-table td:last-child img {
    width: 1.3em;
    height: 1.3em;
    margin-top: 0.5em;
    cursor: pointer;
}

.layout-row .medication-table td input {
    font-size: 0.875rem;
}

@media all and (min-width: 550px) {
    .medication-table th:nth-child(1) {
        width: auto;
    }

    .medication-table th:nth-child(2) {
        width: 8em;
    }

    .medication-table th:nth-child(3) {
        width: 8em;
    }

    .medication-table th:nth-child(4) {}
}

@media all and (min-width: 1000px) {
    .medication-table {
        font-size: 1rem;
    }
}


/* Footer */

.footer {
    text-align: center;
    padding: 0.8rem;
    padding-top: 2rem;
    padding-bottom: 7rem;
    font-size: 0.875rem;
    color: gray;
}

.support-contact {
    line-height: 125%;
}

.copyright {
    font-style: italic;
    margin-top: 0.8em;
}

.footer a {
    color: gray;
    transition: color 0.15s;
}

.footer a:hover {
    color: #ed1c24;
}

@media all and (min-width: 900px) {
    .footer {
        padding-left: 21rem;
    }
}


/* List views */

.list-view-outer {
    position: relative;
}

.list-view-inner {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
}

.list-view-outer::after {
    content: ' ';
    position: absolute;
    right: 0;
    top: 0;
    width: 0rem;
    height: 100%;
    background-image: linear-gradient(to right, transparent, #eeefea);
    transition: width 0.05s;
}

.list-view-outer::before {
    content: ' ';
    position: absolute;
    left: 0;
    top: 0;
    width: 0rem;
    height: 100%;
    background-image: linear-gradient(to right, #eeefea, transparent);
    transition: width 0.05s;
}

.list-view-outer.has-left-scrollable-content::before {
    width: 0.8rem;
    pointer-events: none;
}

.list-view-outer.has-right-scrollable-content::after {
    width: 0.8rem;
    pointer-events: none;
}

.list-view {
    margin-top: 1em;
    border-collapse: collapse;
    min-width: 100%;
}

.ellipsis-overflow {
    max-width: 25ch;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.compact-list {
    font-size: 90%;
}

.compact-list td a {}

.compact-list td a:hover {
    text-decoration: underline;
}

.compact-list td input[type=button] {
    padding-top: 1%;
    padding-bottom: 1%;
}

.list-view tr:nth-child(even) td {
    background-color: white;
}

.list-view tr:nth-child(odd) td {
    background-color: #f6f7f3;
}

.list-view td, .list-view th {
    border-bottom: 1px solid #ddd;
    padding: 0.5em;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    vertical-align: middle;
    text-align: left;
    line-height: 125%;
    background-color: #f4f5ee;
    font-size: 1rem;
}


.list-view th:first-child {
    position: sticky;
    left: 0px;
    z-index: 3;
}

.list-view td:first-child {
    position: sticky;
    left: 0px;
    z-index: 2;
}

.list-view .nowrap {
    white-space: nowrap;
}

.list-view th {
    font-weight: bold;
    white-space: nowrap;
    border-top: none;
    border-bottom: 1px solid #ddd;
    background-color: #636359;
    padding-top: 0.4em;
    padding-bottom: 0.4em;
    position: sticky;
    top: 0;
}

.list-view th img {
    opacity: 1.0;
    vertical-align: middle;
    width: 1.3rem;
    height: 1.3rem;
    display: inline-block;
    position: relative;
    top: -0.1rem;
}

.list-view th a {
    color: white;
    text-decoration: none;
}

.list-view td:last-child {
    white-space: nowrap;
}

.list-view input[type=button] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    vertical-align: middle;
    background-color: white;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 0.29em;
    box-sizing: border-box;
    padding: 0.14em 0.8em;
    line-height: 143%;
    font-size: 0.875rem;
    font-family: Ubuntu, sans-serif;
    transition: background-color 0.1s;
}

.list-view input[type=button]:hover {
    background-color: #f1f1f1;
}

p.record-count {
    text-align: left;
    width: auto;
    font-size: 1rem;
}

.pager {
    margin-top: 1em;
}

.pager span {
    display: inline-block;
    line-height: 23px;
    margin-right: 10px;
}

.pager a {
    display: inline-block;
    margin-right: 7px;
    margin-bottom: 7px;
    text-decoration: none;
    color: #383f4f;
    border-radius: 3px;
    width: 23px;
    line-height: 23px;
    text-align: center;
}

.pager a:link, .pager a:visited {
    background-color: white;
}

.pager a:hover, .pager a:active {
    background-color: #ddd;
}

.pager a.current {
    background-color: #ccc;
    border: 1px solid #aaa;
    line-height: 21px;
    box-sizing: border-box;
    cursor: default;
}

.pager a.inactive {
    cursor: default;
}

.pager a.arrow-disabled {
    background-color: white;
    color: #ccc;
    cursor: default;
}

@media all and (min-width: 900px) {
    /*.list-view-inner {
        overflow-y: visible;
        max-height: none;
    }*/

    .list-view-outer.has-left-scrollable-content::before {
        display: none;
    }

    .list-view-outer.has-right-scrollable-content::after {
        width: 2rem;
    }
}