/* Milligram overrides */
:root {
    /* The following are official CakePHP colors */
    --color-cakephp-red: #e41749;
    --color-cakephp-gray: #404041;
    --color-cakephp-blue: #0676ed;
    --color-cakephp-lightblue: #34bdd7;

    /* These are additional colors */
    --color-lightgray: #606c76;
    --color-white: #fff;

    --color-main-bg: #f5f7fa;
    --color-links: var(--color-cakephp-blue);
    --color-links-active: #2a6496;
    --color-headings: #363637;

    --color-message-success-bg: #e3fcec;
    --color-message-success-text: #12c99b;
    --color-message-success-border: #51d88a;

    --color-message-warning-bg: #fffabc;
    --color-message-warning-text: #8d7b00;
    --color-message-warning-border: #d3b800;

    --color-message-error-bg: #fcebea;
    --color-message-error-text: #cc1f1a;
    --color-message-error-border: #ef5753;

    --color-message-info-bg: #eff8ff;
    --color-message-info-text: #2779bd;
    --color-message-info-border: #6cb2eb;
}


.top-nav-links,
.side-nav,
h1, h2, h3, h4, h5, h6 {
    font-family: "Raleway", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    color: var(--color-headings);
}

a {
    color: var(--color-links);
    transition: color 0.2s linear;
}

a:hover,
a:focus,
a:active {
    color: var(--color-links-active);
    transition: color 0.2s ease-out;
}

.side-nav a,
.top-nav-links a,
th a,
.actions a {
    color: var(--color-lightgray);
}

.side-nav a:hover,
.side-nav a:focus,
.actions a:hover,
.actions a:focus {
    color: var(--color-links-active);
}

/* Utility */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


th {
    white-space: nowrap;
}

/* Nav bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 112rem;
    padding: 2rem;
    margin: 0 auto;
}

.top-nav-title a {
    font-size: 2.4rem;
    color: var(--color-cakephp-red);
}

.top-nav-title span {
    color: var(--color-cakephp-gray);
}

.top-nav-links a {
    margin: 0 0.5rem;
}

.top-nav-title a,
.top-nav-links a {
    font-weight: bold;
}

.side-nav-item {
    display: block;
    padding: 0.5rem 0;
}

/* View action */
.view.content .text {
    margin-top: 1.2rem;
}

.related {
    margin-top: 2rem;
}

/* Flash messages */
.message {
    padding: .5rem 1rem;
    color: var(--color-message-info-text);
    border-color: var(--color-message-info-border);
    cursor: pointer;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.12);
    justify-content: center;
    display: flex;
}

.message.hidden {
    display: none;
}

.message.success {
    color: var(--color-message-success-text);
    border-color: var(--color-message-success-border);
    border-left: 15px solid var(--color-message-success-text);
    background-color: var(--color-message-success-bg);
}

.message.warning {
    color: var(--color-message-warning-text);
    border-color: var(--color-message-warning-border);
    border-left: 15px solid var(--color-message-warning-text);
}

.message.error {
    background-color: var(--color-message-error-bg);
    color: var(--color-message-error-text);
    border-color: var(--color-message-error-border);
    border-left: 15px solid var(--color-message-error-text);
}

.message.info {
    color: var(--color-message-info-text);
    border-color: var(--color-message-info-border);
    border-left: 5px solid #2185d0;
}

/* Forms */
.input.radio,
.input.checkbox,
.input.multicheckbox {
    margin-bottom: 0rem;
}

.input.radio input,
.input.checkbox input,
.input.multicheckbox input {
    margin: 0;
}

.input.radio label,
.input.checkbox label,
.input.multicheckbox label {
    margin: 0;
    display: flex;
    align-items: center;
}

.input.radio label > input,
.input.checkbox label > input,
.input.multicheckbox label > input {
    margin-right: 1.0rem;
}

input[type='color'] {
    max-width: 4rem;
    padding: 0.3rem .5rem 0.3rem;
}

/* Paginator */
.paginator {
    text-align: right;
}

.paginator p {
    margin-bottom: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
}

.pagination li {
    display: inline-block;
    margin: 0.25em;
    text-align: center;
}

.pagination a {
    color: var(--color-cakephp-blue);
    display: inline-block;
    font-size: 1.25rem;
    line-height: 3rem;
    min-width: 3rem;
    padding: 0;
    position: relative;
    text-decoration: none;
    transition: background .3s, color .3s;
}

.pagination li.active a,
.pagination a:hover {
    text-decoration: underline;
}

.pagination .disabled a {
    cursor: not-allowed;
    color: var(--color-lightgray);
    text-decoration: none;
}

.first a,
.prev a,
.next a,
.last a {
    padding: 0 .75rem;
}

.disabled a:hover {
    background: initial;
    color: initial;
}

.asc:after {
    content: " \2193";
}

.desc:after {
    content: " \2191";
}

/* Error in non debug mode */
.error-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: center;
}

@media screen and (max-width: 640px) {
    /* Fix milligram not having a responsive column system */
    .row .column[class*='column-'] {
        flex: 0 0 100%;
        max-width: 100%
    }

    .top-nav {
        margin: 0 auto;
    }

    .side-nav {
        margin-bottom: 1rem;
    }

    .heading {
        margin-bottom: 1rem;
    }

    .side-nav-item {
        display: inline;
        margin: 0 1.5rem 0 0;
    }

    .asc:after {
        content: " \2192";
    }

    .desc:after {
        content: " \2190";
    }
}

.toast-notification {
    position: fixed;
    text-decoration: none;
    z-index: 999999;
    width: 30%;
    background-color: #fff;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    display: flex;
    padding: 10px;
    transform: translate(0, -150%);
    border-left: 5px solid #2185d0;
}

.toast-notification .toast-notification-wrapper {
    flex: 1;
    padding-right: 10px;
    overflow: hidden;
}

.toast-notification .toast-notification-wrapper .toast-notification-header {
    padding: 0 0 5px 0;
    margin: 0;
    font-weight: 500;
    font-size: 14px;
    word-break: break-all;
    color: #4f525a;
}

.toast-notification .toast-notification-wrapper .toast-notification-content {
    font-size: 14px;
    margin: 0;
    padding: 0;
    word-break: break-all;
    color: #4f525a;
}

.toast-notification .toast-notification-close {
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    line-height: 24px;
    padding-bottom: 4px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.2);
}

.toast-notification .toast-notification-close:hover {
    color: rgba(0, 0, 0, 0.4);
}

.toast-notification.toast-notification-top-center {
    transform: translate(calc(50vw - 50%), -150%);
}

.toast-notification.toast-notification-bottom-left, .toast-notification.toast-notification-bottom-right {
    transform: translate(0, 150%);
}

.toast-notification.toast-notification-bottom-center {
    transform: translate(calc(50vw - 50%), 150%);
}

.toast-notification.toast-notification-dark {
    background-color: #2d2e31;
}

.toast-notification.toast-notification-dark .toast-notification-wrapper .toast-notification-header {
    color: #edeff3;
}

.toast-notification.toast-notification-dark .toast-notification-wrapper .toast-notification-content {
    color: #edeff3;
}

.toast-notification.toast-notification-dark .toast-notification-close {
    color: rgba(255, 255, 255, 0.2);
}

.toast-notification.toast-notification-dark .toast-notification-close:hover {
    color: rgba(255, 255, 255, 0.4);
}

.toast-notification.toast-notification-success {
    border-left: 4px solid #51a775;
}

.toast-notification.toast-notification-success .toast-notification-wrapper .toast-notification-header {
    color: #51a775;
}

.toast-notification.toast-notification-success .toast-notification-wrapper .toast-notification-content {
    color: #51a775;
}

.toast-notification.toast-notification-success .toast-notification-close {
    color: rgba(0, 0, 0, 0.2);
}

.toast-notification.toast-notification-success .toast-notification-close:hover {
    color: rgba(0, 0, 0, 0.4);
}

.toast-notification.toast-notification-error {
    border-left: 4px solid #a75151;
}

.toast-notification.toast-notification-error .toast-notification-wrapper .toast-notification-header {
    color: #a75151;
}

.toast-notification.toast-notification-error .toast-notification-wrapper .toast-notification-content {
    color: #a75151;
}

.toast-notification.toast-notification-error .toast-notification-close {
    color: rgba(0, 0, 0, 0.2);
}

.toast-notification.toast-notification-error .toast-notification-close:hover {
    color: rgba(0, 0, 0, 0.4);
}

.toast-notification.toast-notification-verified {
    border-left: 4px solid #6097b8;
}

.toast-notification.toast-notification-verified .toast-notification-wrapper .toast-notification-header {
    color: #6097b8;
}

.toast-notification.toast-notification-verified .toast-notification-wrapper .toast-notification-content {
    color: #6097b8;
}

.toast-notification.toast-notification-verified .toast-notification-close {
    color: rgba(0, 0, 0, 0.2);
}

.toast-notification.toast-notification-verified .toast-notification-close:hover {
    color: rgba(0, 0, 0, 0.4);
}

.toast-notification.toast-notification-dimmed {
    opacity: .3;
}

.toast-notification.toast-notification-dimmed:hover, .toast-notification.toast-notification-dimmed:active {
    opacity: 1;
}

