/*
 * -- BASE STYLES --
 * Most of these are inherited from Base, but I want to change a few.
 */
html,
body {
    height: 100%;
}

body {
    color: #333;
}

a {
    text-decoration: none;
    color: #1b98f8;
}

h1 {
    width: 100%;
}

img.expandable {
    cursor: pointer;
}

.homepage-content {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 200px;
    min-height: calc(100vh - 90px);
    font-size: 22px;
    font-weight: 100;
}

.homepage-updates {
    font-size: 16px;
}

.lightbox {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #252a3b96;
    z-index: 100;
    opacity: 0;

    &.open {
        display: block;
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    border-radius: 50%;
    padding: 5px;
    background-color: #99cdd8;
    width: 40px;
    color: #252a3b;
    line-height: 0;
    cursor: pointer;

    &:hover {
        background-color: #5a90a9;
    }
}

.lightbox-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.lightbox-image {
    max-height: 100%;
}

.collapsable {
    transition: height 0.25s 0.25s linear;

    &.closed {
        .collapsable-content {
            height: 0;
            opacity: 0;
        }

        .btn-open {
            display: inline-block;
        }

        .btn-close {
            display: none;
        }
    }

    .collapsable-trigger {
        cursor: pointer;
    }

    .btn-open {
        display: none;
    }

    .collapsable-content {
        overflow: hidden;
        height: 100%;
        opacity: 1;
        transition: opacity 0.25s linear, height 0.25s 0.25s linear;
    }
}

.section-heading,
.list-heading {
    border-bottom: 1px solid #666;
    padding-bottom: 1em;
}

.section-heading {
    position: sticky;
    top: 40px;
    display: grid;
    grid-template-columns: min-content 1fr min-content;
    grid-template-rows: 1fr min-content;
    column-gap: 1em;
    background-color: #d1eef2;
    border-color: #4b7197;
    border-radius: 0 0 25px 25px;
    padding: 0.25em 1em 1em;
    z-index: 2;
    overflow: hidden;

    &.collapsed {
        h1 {
            font-size: 22px;
        }
    }

    + .pure-form {
        flex-grow: 1;
    }

    .collapsable {
        transition: opacity 0.25s linear, height 0.25s 0.25s linear;

        &.collapsed {
            height: 0px !important;
            opacity: 0;
        }
    }
}

.no-list .section-heading {
    display: flex;
    align-items: center;
}

.section-heading h1 {
    grid-column-start: 2;
    transition: font-size 0.25s linear;

    .thread-status-icon {
        display: inline-block;
        width: 20px;
    }
}

.section-heading-character {
    .section-admin {
        grid-row: 1;
        grid-column: 3;
        align-self: center;
    }
}

.section-heading-character-nickname {
    grid-column: 2;
    margin-top: -1em;
}

.section-heading-profile-image {
    width: 100px;
    height: 100px;
    grid-row-start: 1;
    grid-row-end: none;
    align-self: center;
    object-fit: cover;
    transition: height 0.25s linear;

    .collapsed & {
        height: 75px;
    }
}

.section-subheading {
    position: sticky;
    top: 80px;
    display: flex;
    align-items: center;
    margin-top: -2.5em;
    margin-bottom: auto;
    border-bottom: 1px solid darkslateblue;
    border-radius: 0 0 25px 25px;
    padding: 2.5em 1em 1em;
    background-color: #d3c6df;
    z-index: 1;
}

.section-content {
    display: inline-block;
    flex-grow: 1;

    &.center {
        text-align: center;
    }
}

.list-heading {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1em;
}

.list-heading h1 {
    width: auto;
}

.list-table,
.list-grid {
    border-collapse: collapse;
    width: 100%;

    &.tag-list {
        svg {
            max-height: 30px;
        }
    }
}

.list-table thead,
.list-grid-head {
    color: #333;
}

.list-table thead tr,
.list-grid-head {
    background-color: lavender;
}

.list-table th,
.list-table td,
.list-grid-head span,
.list-grid-item {
    padding: .5em .75em;
    text-align: left;
    border-bottom: 1px solid lavender;
}

.list-grid-head span {
    display: inline-block;
    padding: 1em .5em;
    font-weight: 600;
}

.list-grid-head.filters {
    align-items: center;

    .list-grid-filters {
        display: flex;
        grid-column: 2 / span 4;
        align-content: space-around;
        flex-wrap: wrap;
        gap: 3px;
        padding: 3px 3px 3px 0;

        select {
            flex-grow: 1;
            border-color: #beacd9;
            border-radius: 3px;
            background: #f8f8ff;
            padding: 2px;
            color: #252a3b;
        }
    }
}

.list-grid-head, 
.list-grid-item {
    display: grid;
    justify-content: space-around;
    justify-items: start;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 10px;
}

.list-grid-item {
    position: relative;
    color: #333;
}

.thread-index-grid {
    .list-grid-item {
        grid-template: repeat(3, min-content) / repeat(3, 1fr);
    }

    .list-grid-title {
        display: inline-block;
        width: 100%;
        grid-column: 1;

        .title {
            display: block;
        }
    }

    .thread-info {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 3px;
    }

    .thread-type-label {
        color: #9882ad;
        border: 1px solid #9882ad;
        border-radius: 5px;
        padding: 0 4px;
        font-weight: 200;
        font-size: 10px;
    }

    .thread-status-icon {
        width: 13px;
        line-height: 0;
    }

    .thread-description {
        grid-column: 2 / span 3;
        grid-row: 1 / span 2;
    }

    .thread-characters {
        grid-row: 2;
        margin-top: 0;
    }

    .last-updated {
        grid-column: 1 / span 4;
        grid-row: 3;
        color: #888;
        font-size: 0.75em;
    }
}

.list-table tr {
    position: relative;
    height: 55px;
}

.list-table tbody tr:nth-child(odd) {
    position: relative;
    height: 55px;
    background-color: ghostwhite;
}

.list-grid-item:nth-child(odd) {
    background-color: ghostwhite;
}

.list-table tr a::after,
.list-grid-item a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    border: 0 solid transparent;
    transform: translateY(-50%);
    transition: border-width 0.05s linear;
}

.list-table tr.item-selected a::after,
.list-table tr:not(.item-selected) a:hover::after,
.list-grid-item.item-selected a::after,
.list-grid-item:not(.item-selected) a:hover::after {
    border-width: 20px;
    border-right: 20px solid #ddd;
}

.list-table tr:not(.item-selected) a:hover::after,
.list-grid-item:not(.item-selected) a:hover::after {
    border-right-color: #f3f3f3;
}

.list-table tr a,
.list-grid-item a {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: -webkit-fill-available;
    height: 100%;

    & > svg {
        position: absolute;
        top: 50%;
        right: 20px;
        height: 30px;
        transform: translateY(-50%);
    }
}

.list-table-title,
.list-grid-title {
    font-weight: bold;
}

.list-grid-item > div {
    padding: 0.5em;
}

.list-grid-item-bottom {
    grid-column: 2 / span 4;
    grid-row: 2;
    font-weight: 600;
}

.subsection-container {
    width: auto;
    background: lavender;
    border-radius: 25px 25px 0 0;
    padding: 0 1em 2em;
    margin-bottom: -2.25em;
    border-top: 2px solid plum;
    box-shadow: 0px -55px 30px -30px inset plum;
}

.subsection-container:nth-of-type(2n) {
    background: lightsteelblue;
    border-top-color: #4b7197;
    box-shadow: 0px -55px 30px -30px inset #4b7197;
}

.subsection-container:last-child {
    margin-bottom: -3em;
}

.subsection-container .subsection-heading {
    color: #3b3242;
    text-transform: uppercase;
}

.subsection-container:nth-of-type(2n) .subsection-heading {
    color: #252a3b;
}

.section-subheading-title {
    display: flex;
    width: 100%;
    justify-content: space-between;

    h2 {
        margin-top: 0;
    }
}

.subsection-description {
    color: #525252;
    font-size: .9em;
    margin-top: -1em;
}

.subsection-list {
    margin: 1em;
    padding: 0;
    border: 1px solid #333;
    border-width: 1px 0;
    list-style-type: none;
}

.prompts-list-item,
.relations-list-item {
    padding: 1em 1em 0.5em;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.prompts-list-item,
.relations-list-item:nth-child(odd) {
    background: rgba(0, 0, 255, 0.075);
}

.prompts-list-item {
    display: grid;
    grid-template-columns: 4fr 1fr;

    .prompts-list-item-copy {
        height: auto;
        width: 15px;
        padding: 5px;
    }

    h4 {
        margin: 0 0 10px;
        display: flex;
        align-items: center;
    }

    p {
        margin-top: 0;
        grid-column: 1 / span 2;
        order: 3;
    }

    form {
        text-align: right;
    }
}

.relations-list-item-heading {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: -1em -1em 0;
    color: #333;
    transition: all 0.125s linear;
}

.relations-list-item-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 100%;
    object-fit: cover;
    filter: opacity(0.35);
    z-index: 0;
    box-shadow: 0 1px 10px 0px black;
    transition: all 0.125s linear;
}

.relations-list-item-heading:hover {
    color: #000;
}

.relations-list-item-heading:hover .relations-list-item-image {
    box-shadow: 0 1px 5px 0px black;
    filter: opacity(0.45);
}

.relations-list-item-name,
.relations-list-item-type {
    position: relative;
    display: inline-block;
    margin: 0.25em 0.5em;
    margin-top: 2em;
}

.relations-list-item-name {
    font-size: 150%;
    font-weight: 700;
}

.relations-list-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1em;
    margin: 0.5em 0;
}

.posts-list-item {
    display: grid;
    grid-template: 1fr 2fr / 2fr 1fr;
    padding-left: 7px;
}

.posts-list-item:nth-child(even) {
    background-color: #004b840f;
}

.posts-list-item-thread {
    padding-top: 5px;
    font-weight: 700;
    font-size: 18px;
}

.posts-list-item-content {
    color: #555;
}

.posts-list-item-link {
    position: relative;
    display: inline-block;
    grid-column-start: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    justify-self: stretch;
    background-color: #4b7197;
    vertical-align: middle;
    text-align: center;
    color: #fff;
    transition: background-color 0.25s linear;
}

.posts-list-item:nth-child(even) .posts-list-item-link {
    background-color: #4b5e97;
}

.posts-list-item-link:hover {
    background-color: #5a90a9;
}

.posts-list-item:nth-child(even) .posts-list-item-link:hover {
    background-color: #5a90a9;
}

.posts-list-item-link svg {
    position: absolute;
    top: 50%;
    right: 50%;
    max-width: 80px;
    transform: translate(50%, -50%);
}

.subsection-list .list-empty,
.subsection-list .goals-list-empty,
.subsection-list .posts-list-empty,
.subsection-container .recent-images-empty,
.subsection-list .relations-list-empty {
    display: block;
    text-align: center;
    color: #718091;
}

.subsection-list .list-empty p,
.subsection-list .goals-list-empty p,
.subsection-list .posts-list-empty p,
.subsection-container .recent-images-empty p,
.subsection-list .relations-list-empty p {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.subsection-list .list-empty svg,
.subsection-list .goals-list-empty svg,
.subsection-list .posts-list-empty svg,
.subsection-container .recent-images-empty svg,
.subsection-list .relations-list-empty svg {
    width: 100px;
}

.relations-create-form .search--hidden .pure-button, 
.relations-create-form .search--hidden .text-field, 
.relations-create-form .search--hidden .textarea-field {
    display: none;
}

.goals-list-item,
.subsection-list .subsection-list-item {
    display: flex;
    justify-content: space-evenly;
    gap: 2em;
    padding: 1em;
    background: rgba(255, 255, 255, 0.25);
}

.goals-list-item:nth-child(odd),
.subsection-list .subsection-list-item:nth-child(odd) {
    background: rgba(0, 0, 255, 0.075);
}

.goals-list-item span {
    align-self: center;
    flex-shrink: 0;
    font-weight: 600;
}

.goals-list-item p {
    flex-grow: 1;
    margin: 0;
}

.goals-list-item form {
    align-self: center;
}

.btn {
    box-sizing: content-box;
    border: none;
    border-radius: 50%;
    padding: 0 4px;
    background-color: transparent;
    height: 25px;
    width: 25px;
    color: #4b7197;
    line-height: 0;
    cursor: pointer;
}

.btn:hover {
    color: #252a3b;
}

.btn-delete {
    color: #b04033;
}

.btn-delete:hover {
    color: #851f34;
}

.recent-images-container {
    position: relative;
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(3, 1fr);
    align-content: space-around;
    justify-items: center;
}

.recent-image-container {
    width: 100%;
}

.recent-images-container .pure-button {
    grid-column: 1 / span 3;
}

.recent-image {
    object-fit: cover;
    align-self: stretch;
    width: 100%;
}

.section-admin {
    display: flex;
    grid-column-start: 3;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.section-admin .pure-button {
    margin-right: 1em;
}

.section-back-link {
    align-self: anchor-center;
}

.section-back-link::before {
    content: '<';
    padding-right: 0.5em;
}

.section-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1em;
    border-bottom: 1px solid #666;
    padding-bottom: 1em;
    width: 100%;
}

.section-actions .pure-button {
    flex-grow: 1;
    max-width: 250px;
}

.character-avatar-image {
    position: absolute;
    top: 50%;
    left: .75em;
    width: 50px;
    height: 50px;
    display: inline-block;
    filter: contrast(0.5);
    transition: filter 0.5s;
    cursor: pointer;
    transform: translateY(-50%);
    border-radius: 10px;
    object-fit: cover;
}

.character-avatar-tag {
    position: absolute;
    top: calc(100% - 40px);
    left: 50px;
    box-sizing: border-box;
    display: inline-block;
    border-radius: 50%;
    padding: 3px;
    width: 23px;
    height: 23px;
    background-color: #e6e7fb;
    color: #333;
    line-height: 0;
    filter: contrast(0.5);
    transition: filter 0.5s;
}

.character-avatar:hover .character-avatar-image,
.character-avatar:focus .character-avatar-image,
.item-selected .character-avatar-image,
.character-avatar:hover .character-avatar-tag,
.character-avatar:focus .character-avatar-tag,
.item-selected .character-avatar-tag {
    filter: contrast(1);
}

.character-status-label {
    padding: 0.15em 0.25em;
    border-radius: 5px;
    background-color: #99cdd8;
}

.character-status-label.private {
    background-color: #ddd;
    color: #666;
}

.section-heading-character-tag {
    position: absolute;
    display: flex;
    height: 175%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 25%;
    z-index: -1;
}

.table {
    flex-grow: 1;

    &.character-info {
        border-collapse: collapse;

        tr {
            vertical-align: text-top;

            &:nth-child(odd) {
                background-color: #eee;
            }

            th,
            td {
                border-bottom: 1px solid #ddd;
                padding: 5px;
            }
        }
    }
}

.table .no-data {
    color: #999;
    font-style: italic;
    text-transform: capitalize;
    
}

.posts-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.post-list {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    row-gap: 1em;
}

.post-container {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-self: flex-end;
    background: lavender;
    margin-top: 1em;
    padding: 1em;
    border-right: 3px solid #beacd9;
    width: 65%;
    max-width: 500px;
    min-width: 350px;
    border-radius: 0 0px 25px 25px;
}

.post-container.other {
    align-self: flex-start;
    background-color: ghostwhite;
    border-right: none;
    border-left: 3px solid lavender;
}

.post-location {
    font-size: 12px;
    text-transform: uppercase;
}

.post-date {
    padding: 2px;
    color: #999;
    font-size: 10px;
}

.list-table-title .thread-type-label {
    display: block;
    font-size: 12px;
    font-weight: 400;
}

.thread-new-post {
    position: absolute;
    top: -3px;
    left: 6px;
    border-radius: 3px;
    padding: 1px 3px;
    background: #b04033bd;
    color: #fff;
    font-size: 12px;
    font-weight: 300;
    text-transform: lowercase;
}

.thread-characters {
    margin-top: 1em;
    font-size: .75em;
}

.thread-characters-list {
    display: block;
    margin: 1px 0 0;
    padding: 0;
    list-style: none;
    z-index: 10;
    position: relative;
}

.thread-characters-list-character {
    position: relative;
    display: inline-flex;
    max-width: 15px;
    max-height: 15px;
    line-height: 0;
    align-items: stretch;
    justify-content: space-evenly;
    flex-wrap: nowrap;
    flex-direction: column;

    &:hover {
        .name-tag {
            display: block;
        }
    }

    svg {
        width: 100%;
    }

    .name-tag {
        position: absolute;
        display: none;
        left: calc(100% + 5px);
        padding: 0 3px;
        width: max-content;
        background: #e6e7fb;
        line-height: 1.5;
        z-index: 1;
    }
}

.thread-details,
.post-details {
    margin-top: -1.5em;
    margin-bottom: 2em;
    color: #999;
}

.thread-details,
.post-description,
.section-heading-description {
    grid-column: 2 / span 3;
    margin-bottom: 0;
}

.post-description {
    max-height: 150px;
    overflow: scroll;
}

.section-heading .thread-type-label {
    display: flex;
    justify-content: center;
    align-self: stretch;
    grid-column-start: 1;
    grid-row: 1 / 10;
    border-radius: 7px;
    padding: 4px 7px;
    border: 1px solid #9882ad;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    writing-mode: vertical-rl;
}

.thread-type-label {
    color: #9882ad;
    border-color: #9882ad;
}

.thread-type-label.goblin-mode {
    color: #851f34;
    border-color: #851f34;
}

.thread-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column: 1 / span 3;
    gap: 0.5em;
    justify-content: space-between;
    align-items: center;
    margin-top: 1em;
}

.thread-nav-next {
    grid-column: 2;
    text-align: right;
}

.post-details {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: end;
    flex-grow: 1;
}

.thread-details small:nth-of-type(2),
.post-details small:nth-of-type(2) {
    margin-left: 1em;
}

.post-author-container {
    display: flex;
    flex-direction: row-reverse;
}

.post-container.other .post-author-container {
    flex-direction: row;
}

.post-container.other .post-author-container .post-details {
    align-items: flex-start;
}

.post-author-container .post-details {
    margin: 0;
}

.post-avatar-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.post-avatar-container .post-avatar {
    position: absolute;
    top: -1.5em;
    right: -.7em;
    width: 50px;
    height: 50px;
    box-shadow: 0px 0px 0px 8px #beacd9;
    border-radius: 10px 10px 0px 10px;
    object-fit: cover;
}

.post-container.other .post-avatar-container .post-avatar {
    right: auto;
    left: -.7em;
    box-shadow: 0px 0px 0px 8px lavender;
    border-radius: 10px 10px 10px 0px;
}

.post-content-container {
    padding: 0 1em;
    border-width: 1px 0;
    border-style: solid;
    border-color: #888;
}

.post-name {
    font-size: 125%;
    color: #555;
}

.post-admin {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    padding: 0.5em 0;
    font-size: 75%;
}

.post-container.other .post-admin {
    justify-content: flex-start;
}

.post-admin .pure-form-aligned {
    margin-left: .5em;
    width: auto;
}

.post-new-indicator {
    position: relative;
    border-radius: 3px;
    width: 100%;
    height: 3px;
    background: #bae1ff;
    text-align: center;
    opacity: 1;
    transition: opacity 0.25s linear, height 0.5s 0.25s linear;
}
.post-new-indicator.hide {
    opacity: 0;
    height: 0;
}

.post-new-indicator-text {
    position: absolute;
    top: -.5em;
    right: 50%;
    padding: 0 10px;
    background: #fff;
    font-weight: 700;
    color: #1b98f8;
    transform: translateX(50%);
}

.post-create-form {
    margin-top: 3em;
}

.scroll-down-button {
    position: fixed;
    bottom: 2em;
    right: 2em;
    z-index: 100;
    padding: 0.5em 0.75em;
    transition: bottom 0.25s linear;
    cursor: pointer;
}

.scroll-down-button.bottom {
    bottom: 0;
}


/*
 * -- HELPER STYLES --
 * Over-riding some of the .pure-button styles to make my buttons look unique
 */
.primary-button,
.secondary-button {
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    border-radius: 20px;
}
.primary-button {
    color: #fff;
    background: #1b98f8;
    margin: 1em 0;
}
.secondary-button {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    padding: 0.5em 2em;
    font-size: 80%;
}

/*
 * -- LAYOUT STYLES --
 * This layout consists of three main elements, `#nav` (navigation bar), `#list` (email list), and `#main` (email content). All 3 elements are within `#layout`
 */
#layout, #nav, #list, #main {
    margin: 0;
    padding: 0;
}

#list {
    box-sizing: border-box;
    max-height: 33vh;
    overflow: scroll;
    border-bottom: 2px solid #252a3b;
}

#main {
    margin-top: 40px;
    width: 100%;
}

/* Make the navigation 100% width on phones */
#nav {
    position: fixed;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
    background: rgb(37, 42, 58);
    z-index: 10;
}

.nav-heading-mobile {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/* Show the "Menu" button on phones */
#nav .nav-menu-buttons {
    display: block;
}

#nav .nav-menu-button {
    border: none;
    padding: 5px;
    background: none;
    cursor: pointer;
    color: #82c0d8;
}

#nav .nav-menu-button span {
    width: 26px;
}

.nav-menu-button .open,
.nav-menu-button.active .close {
    display: inline-block;
}

.nav-menu-button .close,
.nav-menu-button.active .open {
    display: none;
}

/* Don't show the navigation items... */
.nav-inner {
    display: none;
    background: #29354a;
    box-shadow: 0px 55px 30px -30px inset #1b1934;
}

/* ...until the "Menu" button is clicked */
.nav-inner.open {
    display: block;
    padding: 2em 0;
    width: 100%;
}


/*
 * -- NAV BAR STYLES --
 * Styling the default .pure-menu to look a little more unique.
 */
#nav .pure-menu {
    background: transparent;
    border: none;
    text-align: left;
}

#nav .pure-menu-item {
    position: relative;
    padding: .5em 1em;
    color: #fff;
}

.pure-menu-item svg {
    width: 15px;
}

    #nav .pure-menu-link:not(.current):hover,
    #nav .pure-menu-link:not(.current):focus {
        border-right: 20px solid #ccc;
        cursor: pointer;
    }
    #nav .pure-menu-link {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border: 17px solid transparent;
        border-right-width: 0;
        padding: 0;
        transition: border-width 0.05s linear;
        margin-left: 0.5em;
    }
    #nav .pure-menu-link:hover {
        background: transparent;
    }
    #nav .pure-menu-link.current {
        border-right: 20px solid #fff;
    }
    #nav .pure-menu-heading {
        border-bottom: none;
        font-size:110%;
        color: rgb(75, 113, 151);
        text-wrap: auto;
    }

.nav-heading-title {
    box-sizing: border-box;
    display: inline-block;
    border-bottom: none;
    padding: 0.25em 0.5em;
    font-size: 100%;
    font-weight: 600;
    color: #82c0d8;
    text-wrap: auto;
}

#layout.no-list #list {
    display: none;
}

#detail {
    position: relative;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: space-between;
    flex-wrap: nowrap;
    row-gap: 1em;
    padding: 0 1.5em 3em;
    max-width: 900px;
}

#layout.no-list #detail {
    max-width: 2400px;
    min-height: auto;
}

.pure-form {
    width: 100%;
}

.pure-form .help-text {
    color: #666;
    font-size: 12px;
}

.pure-form select {
    padding-top: 0.3125em;
    padding-bottom: 0.3125em;
}

.pure-form-aligned .textarea-expand {
    position: relative;
}

.pure-form-aligned form>div>div {
    margin-bottom: .5em;
}
.pure-form-aligned form>div>div label {
    text-align: left;
    display: inline-block;
    vertical-align: middle;
    width: 100%;
    margin: 0 0 0.125em;
}
.pure-form-aligned form>div>div input, .pure-form-aligned form>div>div select, .pure-form-aligned form>div>div textarea {
    display: inline-block;
    vertical-align: middle;
}

.pure-form-aligned form>div>div input[type=color], .pure-form-aligned form>div>div input[type=date], .pure-form-aligned form input[type=file], .pure-form-aligned form>div>div input[type=datetime-local], .pure-form-aligned form>div>div input[type=datetime], .pure-form-aligned form>div>div input[type=email], .pure-form-aligned form>div>div input[type=month], .pure-form-aligned form>div>div input[type=number], .pure-form-aligned form>div>div input[type=password], .pure-form-aligned form>div>div input[type=search], .pure-form-aligned form>div>div input[type=tel], .pure-form-aligned form>div>div input[type=text], .pure-form-aligned form>div>div input[type=time], .pure-form-aligned form>div>div input[type=url], .pure-form-aligned form>div>div input[type=week], .pure-form-aligned form>div>div select, .pure-form-aligned form>div>div textarea {
    text-align: left;
    display: inline-block;
    vertical-align: middle;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0.5em 0.625em;
    box-shadow: inset 0px 2px 10px 0px rgba(0, 0, 0, 0.5);
    border-color: darkslateblue;
}

.pure-form-aligned .textarea-expand textarea {
    height: 5em;
    max-height: calc(100% - 5em);
    min-height: 5em;
    resize: none;
    transition: height 0.5s linear;
}

.pure-form-aligned .textarea-expand .js-textarea-toggle {
    position: absolute;
    top: 25px;
    right: 5px;
    border-radius: 50%;
    padding: 5px;
    background: #9882ad;
    border: none;
    color: #fff;
    line-height: 0;
    cursor: pointer;
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.5);
    opacity: 0.5;
}

.pure-form-aligned .textarea-expand .js-textarea-toggle:hover {
    background: #beacd9;
    opacity: 1;
}

.pure-form-aligned .textarea-expand.expand textarea {
    height: calc(75vh - 5em);
}

.pure-form-aligned .textarea-expand.expand .js-textarea-toggle .collapse,
.pure-form-aligned .textarea-expand .js-textarea-toggle .expand {
    display: inline-block;
}

.pure-form-aligned .textarea-expand .js-textarea-toggle .collapse,
.pure-form-aligned .textarea-expand.expand .js-textarea-toggle .expand {
    display: none;
}


/*
 * -- EMAIL STYLES --
 * Styles relevant to the email messages, labels, counts, and more.
 */
.email-count {
    color: rgb(75, 113, 151);
}

.email-label-personal,
.email-label-work,
.email-label-travel {
    width: 15px;
    height: 15px;
    display: inline-block;
    margin-right: 0.5em;
    border-radius: 3px;
}
.email-label-personal {
    background: #ffc94c;
}
.email-label-work {
    background: #41ccb4;
}
.email-label-travel {
    background: #40c365;
}

/* TAGS */

.tag-svg {
    max-width: 500px;
}

.filter-item svg {
    width: 18px;
    max-height: 18px;
    pointer-events: none;
}

.tag-form.tag--hidden {
    .text-field {
        display: none;
    }
}


/* Email Item Styles */
.email-item {
    padding: 0.9em 1em;
    border-bottom: 1px solid #ddd;
    border-left: 6px solid transparent;
}
    .email-avatar {
        border-radius: 3px;
        margin-right: 0.5em;
    }
    .email-name,
    .email-subject {
        margin: 0;
    }
    .email-name {
        text-transform: uppercase;
        color: #999;
    }
    .email-desc {
        font-size: 80%;
        margin: 0.4em 0;
    }

.item-unread {
    border-left: 6px solid #1b98f8;
}

/* Email Content Styles */
.email-content-header, .email-content-body, .email-content-footer {
    padding: 1em 2em;
}
    .email-content-header {
        border-bottom: 1px solid #ddd;
    }

        .email-content-title {
            margin: 0.5em 0 0;
        }
        .email-content-subtitle {
            font-size: 1em;
            margin: 0;
            font-weight: normal;
        }
            .email-content-subtitle span {
                color: #999;
            }
    .email-content-controls {
        margin-top: 2em;
        text-align: right;
    }
        .email-content-controls .secondary-button {
            margin-bottom: 0.3em;
        }

    .email-avatar {
        width: 40px;
        height: 40px;
    }

.image-upload-container,
.image-edit-container {
    display: flex;
    flex-direction: column-reverse;
}

.image-upload-container {
    flex-grow: 1;
    gap: 1em;
}

.image-upload-form, 
.image-upload-preview {
    margin-bottom: -3em;
    border-radius: 25px 25px 0 0;
    border-top: 2px solid lightsteelblue;
    padding: 1.5em;
    background-color: #d9d6f0;
}

.image-upload-preview {
    flex-grow: 1;
}

.image-edit-container {
    box-sizing: border-box;
    gap: 0;
}

.image-edit-form {
    box-sizing: border-box;
    border-radius: 25px 25px 0 0;
    border-top: 2px solid lightsteelblue;
    padding: 1.5em;
    background-color: #d9d6f0;
}

.image-edit-image {
    object-fit: cover;
    max-height: calc(100vh - 200px);
    max-width: 100%;
}

.image-edit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    margin-bottom: 1em;

    &:not(:first-child) {
        margin-top: 20px;
    }
}

.image-edit-tag {
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    border: 1px solid #4b7197;
    border-radius: 10px;
    background: aliceblue;

    svg {
        width: 20px;
        max-height: 20px;
    }
}

.image-edit-tag-name {
    display: flex;
    padding: 2px 10px;
    color: #4b7197;
}

.image-edit-tag .pure-button {
    border-left: 1px solid #4b7197;
    border-radius: 0;
    padding: 5px 10px 8px 8px;
    background: transparent;
    line-height: 10px;
    color: #4b7197;
    transition: 100ms background linear;
}

.image-edit-tag .pure-button:hover {
    background: #99cdd8;
}

/* MASONRY STYLES */
.filter-list {
    flex-direction: column;
    box-shadow: 0px 55px 30px -30px inset #8379af;
}

.filter-list--applied,
.filter-list--available {
    width: 100%;
}

.filter-list--available {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
}

.filter-list--group .title {
    margin-top: 0;
    font-weight: 700;
}

.filter-list--items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
}

.filter-item {
    display: inline-flex;
    background-color: lavender;
    padding: 3px 8px;
    border-radius: 0.5em;
    border: 1px solid #9882ad;
}

.filter-item:hover {
    cursor: pointer;
}

.filter-item:hover,
.filter-item:focus {
    background-color: #c7bee7;
}

.filter-item.applied {
    background-color: #c7bee7;
    box-shadow: 0px 0px 10px #9882ad inset;
}

.masonry-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    grid-template-rows: masonry; 
    gap: 1em;
    margin-bottom: auto;
}

.masonry-empty {
    grid-column: 1 / span all;
    text-align: center;
}

.masonry-item {
    position: relative;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.masonry-item-image {
    max-width: 100%;
}

.masonry-item-image + .masonry-item-image-tag-button {
    position: absolute;
    top: 0.25em;
    right: 0.25em;
    box-shadow: 0 0 5px 0px #000;
    transition: opacity 0.25s linear;
}

.masonry-item-image-tag-button {
    box-sizing: content-box;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    padding: 3px;
    width: 35px;
    background: #d1eef2;
    line-height: 0;
    cursor: pointer;
    color: #4b7197;
}

.masonry-item-image-tag-button:hover {
    background: #99bcd8;
    color: #252a3b;
}

.masonry-item-admin {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid #99bcd8;
    border-radius: 0 0 25px 25px;
    padding: 0.5em 1em 0.75em;
    background-color: #d1eef2;
    box-shadow: #99bcd8 0px 55px 30px -30px inset;
}

.timeline-container {
    display: grid;
    grid-template-columns: 1fr min-content 1fr;
    grid-template-rows: repeat(1000, min-content);
    flex-grow: 1;
    column-gap: 15px;
    margin-left: auto;
    width: 70%;
}

.timeline-line {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    grid-column: 2 / 2;
    grid-row: 1 / -1;
    width: 10px;
    height: 100%;
    background: #C1C6B8;
    background: linear-gradient(180deg, rgba(193, 198, 184, 1) 0%, rgba(255, 228, 196, 1) 32%, rgba(255, 228, 196, 1) 62%, rgba(243, 191, 124, 1) 100%); 
    border-radius: 5px;
    transform: translateY(20px);
}

.label-past,
.label-future {
    display: flex;
    border: 20px solid transparent;
    width: 0;
    height: 0;
    overflow: visible;
    justify-content: center;
    align-items: center;
    color: #b04033;
    font-weight: 900;
    text-shadow: 0px 0px 3px white;
}

.label-future {
    margin-bottom: -30px;
    border-top-color: #F3BF7C;
}

.label-past {
    margin-top: -30px;
    border-bottom-color: #C1C6B8;
    color: #252a3b;
}

.timeline-section {
    position: relative;
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 7px 10px;
    background-color: #d1eef2;
    min-width: 50%;
    min-height: 50px;
    width: fit-content;
    height: fit-content;

    &::after {
        position: absolute;
        content: '';
        border: 10px solid transparent;
    }

    &:nth-child(even){
        align-self: end;
        margin-right: auto;
        transform: translateY(20px);

        &::after {
            bottom: 3px;
            left: -20px;
            border-right-color: #d1eef2;
        }
    }

    &:nth-child(odd){
        margin-left: auto;

        &::after {
            top: 3px;
            right: -20px;
            border-left-color: #d1eef2;
        }
    }

    &.new {
        border: none;
        background-color: #beacd9;
        color: #9882ad;
        text-align: center;

        &:nth-child(odd){
            &::after {
                border-left-color: #beacd9;
            }
        }

        &:nth-child(even){
            &::after {
                border-right-color: #beacd9;
            }
        }

        &:hover {
            background-color: #9882ad;
            color: #625d8d;
            cursor: pointer;

            &:nth-child(odd)::after {
                border-left-color: #9882ad;
            }

            &:nth-child(even)::after {
                border-right-color: #9882ad;
            }
        }
    }

    &.unassigned {
        position: fixed;
        left: 175px;
        align-self: self-start;
        min-width: auto;
        width: 20%;
        max-height: calc(100vh - 250px);
        height: 100vh;

        &::after {
            content: none;
        }

        .timeline-items {
            height: 95%;
            overflow-y: scroll;
        }

        .timeline-section-empty {
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
        }
        
        .btn {
            display: none;
        }
    }
    
    

    &:not(.editing) {
        .btn.save {
            display: none;
        }
    }

    &.editing {
        .btn.edit {
            display: none;
        }

        .form-delete {
            display: inline-block;
            left: -33px;
        }
    }

    .form-delete {
        display: none;
        position: absolute;
        left: 0px;
        transition: left 0.25s linear;
    }
}

.timeline-drop {
    position: absolute;
    overflow: hidden;
    opacity: 0;
    left: 0;
    right: 0;
    border: 0px solid #b04033;
    padding: 5px 0;
    text-align: center;
    color: #b04033;
    font-size: 12px;
    transition: opacity 0.25s linear;
    cursor: pointer;

    &.move {
        opacity: 1;
    }

    &:first-child {
        bottom: 100%;
        border-bottom-width: 1px;
    }

    &:last-child {
        top: 100%;
        border-top-width: 1px;
    }
}

.timeline-section-move-text {
    pointer-events: none;
}

.timeline-items {
    display: flex;
    flex-direction: column;
}

.timeline-section-empty {
    display: none;
    margin: 0 auto;
    width: 50px;
    height: 50px;
    pointer-events: none;
    color: #1c102a45;

    &:only-child {
        display: inline-block;
    }
}

.timeline-section-title-container {
    display: flex;
    margin-bottom: 5px;
}

.timeline-section-title {
    display: inline-block;
    flex-grow: 1;
    font-size: 18px;
    font-weight: 600;

    &:disabled {
        background: none;
        border: none;
    }
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 5px 0;
    padding: 5px;
    background-color: #99cdd8;
    color: #252a3b;
    cursor: move;

    &:hover {
        background-color: #8cc2ce;
    }

    span {
        display: inline-block;
        word-wrap: normal;
        pointer-events: none;
    }
}

.timeline-item-drop-target {
    position: absolute;
    top: -3px;
    right: 0;
    left: 0;
    bottom: -3px;
}

.timeline-item-description {
    font-size: 12px;
    color: #26586f;
}

/*
 * -- TABLET (AND UP) MEDIA QUERIES --
 * On tablets and other medium-sized devices, we want to customize some
 * of the mobile styles.
 */
@media (min-width: 40em) {

    /* Move the layout over so we can fit the nav + list in on the left */
    #layout {
        padding-left:500px; /* "left col (nav + list)" width */
        position: relative;
    }

    #layout.no-list {
        padding-left: 150px;
    }

    /* These are position:fixed; elements that will be in the left 500px of the screen */
    #nav, #list {
        position: fixed;
        top: 0;
        bottom: 0;
        overflow: auto;
    }
    #nav {
        display: inline-block;
        margin-left:-500px; /* "left col (nav + list)" width */
        width:150px;
        height: 100%;
    }

    #layout.no-list #nav {
        margin-left: -150px;
    }

    #detail {
        width: calc(100% - 150px);
        min-height: 100%;
    }

    /* Show the menu items on the larger screen */
    .nav-inner {
        display: block;
        padding: 2em 0;
        background: none;
        box-shadow: none;
    }

    .nav-inner.bottom {
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
    }

    #nav .nav-menu-buttons {
        display: none;
    }

    /* Hide the "Menu" button on larger screens */
    #nav .nav-menu-button {
        display: none;
    }

    .nav-heading-title {
        display: none;
    }

    .pure-menu-item.mobile-only {
        display: none;
    }

    #list {
        max-width: calc(100% - 150px);
        max-height: unset;
        height: 33%;
    }

    #main {
        position: fixed;
        top: 33%;
        right: 0;
        bottom: 0;
        left: 150px;
        margin-top: 0;
        overflow: auto;
    }

    .no-list #main {
        top: 0;
    }

    .section-heading {
        top: 0;
    }
}

/*
 * -- DESKTOP (AND UP) MEDIA QUERIES --
 * On desktops and other large-sized devices, we want to customize some
 * of the mobile styles.
 */
@media (min-width: 60em) {

    /* This will take up the entire height, and be a little thinner */
    #list {
        margin-left: -350px;
        width:350px;
        height: 100%;
        border-right: 1px solid #ddd;
    }

    /* This will now take up it's own column, so don't need position: fixed; */
    #main {
        position: static;
        margin: 0;
        padding: 0;
        height: 100%;
    }

    #list {
        border-bottom: none;
    }

    #detail {
        margin: 0 auto;
        width: auto;
    }

    #layout.no-list #detail {
        min-height: 100%;
    }

    #layout.edit-image-page #detail {
        min-height: auto;
    }

    .masonry-container {
        grid-template-columns: repeat(4, 1fr); 
    }

    .image-upload-container,
    .image-edit-container {
        flex-direction: row;
    }

    .image-edit-image {
        max-width: 70%;
    }

    .image-edit-form {
        border-radius: 0 25px 25px 0;
    }

    .thread-nav {
        flex-direction: row;
    }

    .thread-nav-prev {
        align-self: flex-start;
    }

    .thread-nav-next {
        align-self: flex-end;
    }

    .masonry-item-image + .masonry-item-image-tag-button {
        opacity: 0;
    }

    .masonry-item-image:hover + .masonry-item-image-tag-button,
    .masonry-item-image + .masonry-item-image-tag-button:hover {
        opacity: 1;
    }
}

/*
 * -- SUPER LARGE MEDIA QUERIES --
 * On xlarge-sized devices
 */
@media (min-width: 80em) {
    .masonry-container {
        grid-template-columns: repeat(5, 1fr); 
    }

    .recent-images-container {
        grid-template-columns: repeat(5, 1fr);
    }

    .recent-images-container .pure-button {
        grid-column: 1 / span 5;
    }
}