body {
    margin: 0;

    background-color: #eee;
    font-family: 'Righteous';
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

h1 {
    font-size: 30px;
    text-align: center;
    color: #777;
    font-weight: normal;
}

.h2-icon {
    color: #777;
    margin-right: 0.5em;
}

a {
    text-decoration: none;
    color: initial;
}

.btn {
    padding: 8px;

    border: none;
    border-radius: 2px;

    font-size: 16px;
    font-family: inherit;
    text-align: center;

    background-color: #ccc;

    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    background-color: #bbb;
}

.btn-primary {
    color: white;
    background-color: #000080;
}

.btn-primary:hover {
    background-color: #0080ff;
}

.btn-green {
    color: white;
    background-color: limegreen;
}

.btn-green:hover {
    background-color: lightgreen;
}

.btn-red {
    color: white;
    background-color: red;
}

.btn-red:hover {
    background-color: #ff7070;
}

a.icon-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.2em;
    height: 2.2em;
    color: #777;
    background-color: white;
    border-radius: 50%;
    box-shadow: 2px 2px 4px 1px #ccc;
}

a.icon-link:hover {
    transform: scale(1.05);
}

a.icon-link-primary {
    background-color: #000080;
    color: white;
}

a.icon-link-primary:hover {
    background-color: #0080ff;
}

a.icon-link-warning {
    background-color: red;
    color: white;
}

a.icon-link-warning:hover {
    background-color: #ff7070;
}

.overlay {
    padding: 30px;

    background-color: white;

    border: 1px solid lightgrey;
    box-shadow: 4px 4px 5px 0px #aaa;
}

header {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;

    font-size: 30px;

    background-color: #DD0000;
    color: white;
}

@media (max-width: 1000px) {
    header {
        padding: 0 15px;
    }
}

header .header-left-desktop, .header-right {
    display: flex;
    align-items: center;
    flex: 2;
    font-size: 18px;
}

@media (max-width: 1000px) {
    header .header-left-desktop {
        display: none;
    }
}

header .header-left-mobile {
    display: none;
}

header .header-left-mobile details summary {
    list-style: none;
    cursor: pointer;
    position: relative;
}

header .header-left-mobile nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 100%;
    padding: 5px 10px;
    left: 0;
    top: 60px;
    background-color: white;
    border-bottom: 1px solid #aaa;
    box-shadow: 0px 4px 5px 0px #aaa;
}

header .header-left-mobile nav .nav-item {
    border-radius: 0px;
    font-size: 20px;
    color: #777;
}

header .header-left-mobile nav .nav-item:hover:not(.disabled) .nav-item-icon,
header .header-left-mobile nav .nav-item:hover:not(.disabled) .nav-item-text {
    transform: translateX(5px);
    transition: transform 0.2s;
}

header .header-left-mobile nav .nav-item .nav-item-icon,
header .header-left-mobile nav .nav-item .nav-item-text {
    display: inline-block;
    transform: translateX(0px);
    transition: transform 0.2s;
}

header .header-left-mobile nav .nav-item .nav-item-icon {
    width: 1.25em;
}

header .header-left-mobile nav .nav-item:not(:last-child) {
    border-bottom: 1px solid #ccc;
    margin-right: 0px;
}

@media (max-width: 1000px) {
    header .header-left-mobile {
        display: flex;
        flex: 2;
    }
}

header .header-center {
    flex: 2;
    text-align: center;
}

@media (max-width: 1000px) {
    header .header-center .header-center-icon {
        display: none;
    }
}

header .header-right {
    justify-content: flex-end;
}

header .app-title {
    color: white;
}

@media (max-width: 1000px) {
    header .header-right .header-item {
        padding: 5px 0px;
    }

    header .header-right .search-form {
        margin-right: 10px;
    }

    header .header-right .search-form input {
        display: none;
    }
}

header .header-right a {
    display: flex;
    align-items: center;
    color: white;
}

header .header-right .fa-sign-out-alt {
    margin-left: 10px;
    font-size: 20px;
}

@media (max-width: 1000px) {
    header .header-right .logout-text {
        display: none;
    }

    header .header-right .fa-sign-out-alt {
        margin-left: 0px;
        font-size: 25px;
    }
}

header .nav-item,
header .header-item {
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
}

header .nav-item:not(:last-child) {
    margin-right: 5px;
}

header .header-left-desktop .nav-item:hover,
header .header-item:hover {
    transform: scale(1.1);
}

header .nav-item .nav-item-icon {
    margin-right: 3px;
}

.notification {
    display: flex;
    position: absolute;
    left: 100vw;
    width: 300px;
    top: 200px;
    padding: 20px;

    align-items: center;
    text-align: center;

    border: 1px solid #aaa;
    border-left: 5px solid;
    border-radius: 3px;
    box-shadow: 4px 4px 5px 0px #aaa;
    background-color: white;

    animation-duration: 0.75s, 1.5s, 0s;
    animation-name: slidein, fadeout, slideout;
    animation-delay: 0s, 4s, 5.5s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
}

.notification-icon {
    margin: auto 15px auto 0px;

    font-size: 25px;
}

.error {
    border-left-color: red;
}

.error .notification-icon {
    color: red;
}

.success {
    border-left-color: lightgreen;
}

.success .notification-icon {
    color: lightgreen;
}

@keyframes slidein {
    from { transform: translateX(0px); }
    to   { transform: translateX(-400px); }
}

@keyframes fadeout {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes slideout {
    from { transform: translateX(-400px); }
    to   { transform: translateX(0px); }
}

.login-wrapper {
    margin: 100px auto;
    width: 360px;
}

.login-wrapper .row {
    margin-bottom: 20px;
}

.login-wrapper label {
    display: block;
    margin-bottom: 5px;
}

.login-wrapper input {
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    font-size: 16px;
    font-family: inherit;

    border: 1px solid #aaa;
    border-radius: 2px;
}

.login-wrapper button {
    width: 100%;
    margin-top: 20px;
}

.sub-header {
    display: flex;
    align-items: center;

    color: #777;
    font-size: 18px;

    margin: 20px 50px;
    padding: 10px 5px;

    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
}

@media (max-width: 1000px) {
    .sub-header {
        margin-left: 0px;
        margin-right: 0px;
    }
}

.sub-header > * {
    flex: 1;
}

.sub-header-title {
    font-size: 30px;
    text-align: center;
}

.sub-header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.sub-header a.sub-header-link {
    color: #777;
    margin-right: 50px;
}

.sub-header a.sub-header-link:hover {
    text-decoration: underline;
}

.sub-header a.icon-link {
    margin: 0 10px;
}

.empty-list {
    display: flex;
    justify-content: center;
    margin-top: 300px;
    color: #777;
    font-size: 25px;
}

/* Home */
section.home {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.tile {
    display: flex;
    flex-direction: column;
    background-color: white;
    width: 250px;
    height: 250px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 4px 4px 5px 0px #aaa;
    transform: translateY(0px);
    transition: transform 0.3s;
    text-align: center;
    margin: 20px 50px;
}

.tile:hover {
    transform: translateY(-5px);
    transition: transform 0.3s;
}

.tile .icon {
    display: flex;
    flex: 3;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: darkgrey;
}

.tile .text {
    flex: 2;
    font-size: 24px;
}

.tile .link {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

/* Search form */
.search-form {
    display: flex;
    align-items: center;
}

.search-form .search-icon {
    cursor: pointer;
    font-size: 24px;
    margin-right: 10px;
}

.search-form .search-icon:hover {
    transform: scale(1.1);
}

.search-form input {
    font-size: 16px;
    font-family: inherit;
    padding: 2px;
    width: 250px;
}

@media (max-width: 1000px) {
    header.search-focused .header-left-mobile {
        flex: 0;
    }

    header.search-focused input#searchInput {
        display: block;
        width: 100%;
    }

    header.search-focused .search-form {
        justify-content: flex-end;
        flex: 1;
        padding-left: 20px;
        padding-right: 5px;
    }

    header.search-focused .search-form form {
        animation: expand 0.5s ease-in-out;
        width: 100%;
    }

    @keyframes expand {
        from { width:   0%; }
        to   { width: 100%; }
    }

    header.search-focused .header-center {
        display: none;
    }
}

.add-overlay {
    max-width: 1000px;
    margin: 0 auto;
    margin-bottom: 50px;
}

.add-overlay input, textarea {
    font-size: 16px;
    width: 100%;
}

.add-overlay textarea {
    resize: none;
}

.add-overlay section {
    margin-bottom: 50px;
}

.button-row {
    display: flex;
    justify-content: center;
}

.button-row > * {
    margin: 0px 5px;
}

.list {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 20px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8em 0;
}

.list-item:not(:last-child) {
    border-bottom: 1px solid #ddd;
}

.list-item .main {
    display: flex;
    font-size: 1.2em;
    flex: 5;
}

.list-item .secondary {
    display: flex;
    flex: 1;
    flex-direction: column;
    text-align: center;
}

a.category,
.list-item .secondary * {
    color: #777;
    margin: 0.1em;
}

.list-item a:hover {
    transform: scale(1.1);
}

.view-overlay {
    max-width: 1000px;
    margin: 0 auto;
    margin-bottom: 20px;
}

.view-overlay p.formatted {
    font-family: 'Roboto';
    line-height: 1.5em;
    white-space: pre-line;
}

.view-overlay a.category {
    display: inline-block;
    margin: 0 5px;
}

.view-overlay a.category:hover {
    transform: scale(1.1);
}

.view-overlay section {
    border-bottom: 1px solid #aaa;
}
