html {  
    font-family: "EB Garamond", serif;
    font-size: 21px;
    line-height: 1.5em;
    box-sizing: border-box;
    overflow: hidden;
}
*, *:before, *:after {
    box-sizing: inherit;
}
body{
    padding: 0;
    margin: 0;
    background-color: #fff;
    background: linear-gradient(0deg, #012f6061 0%, #f1e9c29c 100%);
    color: #000d;
    overflow: hidden;
}

body, .map{
    touch-action: none;
}

#coords{
    position: absolute;
    left: 1em;
    bottom: 1em;
    font-size: 10px;
    line-height: 1.1em;
    z-index: 1;
    font-family: "Courier Prime", monospace;
}

/* DARK MODE */


body.darkmode{
    background-color: #000;
    background: linear-gradient(0deg, #001934 0%, #444131 100%);
}
body.darkmode .header{
    /* background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0, 0, 0, 0.5) 100%); */
    color: #fffd;
}

body.darkmode .headerNavButton{
    filter: invert(0.9);
}

body.darkmode .map{
    background-image: url(../../images/grid-invert.svg);
}
body.darkmode .popupContainer{
    background-color: #0002;
}
body.darkmode #coords{
    color: #fffd;
}

body.darkmode .ghostDrop .dropMessage {
    color: #fff;
}

/* HEADER */

.header{
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr 1fr;
    height: 4em;
    padding: 1em;
    /* background: rgb(255,255,255); */
    /* background: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); */
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
}
.headerLogo{
    
    /* background-image: url(../../images/logo.svg); */
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    text-align: center;
    font-family: "Satisfy", cursive;
    font-size: 2rem;
    line-height: 1em;
    cursor: pointer;
}
.headerNav {
    text-align: right;
}
.headerNav:first-child {
    text-align: left;
}

.headerNavItem {
    font-size: 2em;
    line-height: 1em;
    cursor: pointer;
}
.headerNavButton {
    display: inline-block;
    font-size: 2em;
    line-height: 1em;
    cursor: pointer;
    user-select: none;
}
#loginBtn{
    width: 2rem;
    height: 2rem;
    background-image: url(../../images/icons/profile.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
#daynightBtn{
    width: 2rem;
    height: 2rem;
    background-image: url(../../images/icons/daynight.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#createDropBtn.active {
    transform: rotate(45deg);
}
#createDropBtn {
    width: 2rem;
    height: 2rem;
    background-image: url(../../images/icons/add.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform .5s;
}

.map, .header{
    transition: filter .5s;
}
.map.unfocused{
    filter: blur(3px);
}
.header.unfocused{
    filter: blur(1px);
}
#coords.unfocused{
    filter: blur(2px);
}

/* MAP */

.map{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-image: url(../../images/grid.svg);
    background-repeat: repeat;
    background-position: left top;
    background-size: 4em;
}
.drop{
    user-select: none;

    display: grid;
    align-items: center;
    text-align: center;

    position: absolute;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    box-shadow: 0.25em 0.25em 1em rgb(0 0 0 / 5%);
    background-color: #e0e0e0;
    cursor: pointer;
    margin: -1em;
    box-shadow: 0.1em 0.1em 0.1em rgb(0 0 0 / 50%), 0.25em 0.25em 0.25em  inset rgb(255 255 255 / 50%), -0.25em -0.25em 0.25em inset rgb(0 0 0 / 20%);
    transition: box-shadow .2s;
}

.drop:hover{
    box-shadow: 2px 2px 2px rgb(0 0 0 / 50%), 2px 2px 2px inset rgb(255 255 255 / 50%), -2px -2px 2px inset rgb(0 0 0 / 20%);
}
.ghostDrop {
    display: none;
    user-select: none;
    pointer-events: none;
}
.ghostDrop.active{
    display: grid;
    background: #fff6;
    opacity: 1;
    box-shadow: none;
    left: 50%;
    top: 50%;
}
.ghostDrop .dropMessage{
    position: absolute;
    bottom: 100%;
    left: 100%;
    width: 10em;
    text-align: left;
    color: #000;
    user-select: none;
}

/* POPUP */

.popupContainer{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 1px;
    z-index: 20;
    display: grid;
    align-items: center;
    background-color: #fff2;
    padding: 2em;
    overflow: auto;
}
.popup{
    padding: 2em;
    padding-bottom: 3.5em;
    background-color: #eee;
    background: linear-gradient(0deg, #8094a9 0%, #f7f7f7 100%);
    width: 100%;
    max-width: 512px;
    margin: 0 auto;
    box-shadow: 0 3px 1px -2px rgb(0 0 0 / 14%), 0 2px 2px 0 rgb(0 0 0 / 10%), 0 1px 5px 0 rgb(0 0 0 / 8%);
}
.popupHeader{
    display: grid;
    grid-template-columns: 1fr min-content;
    align-items: start;
    margin-bottom: 2.618em;
}
.popupPosition {
    font-family: "Satisfy";
    font-size: 1rem;
    line-height: 1em;
    text-align: left;
    /* opacity: 0.6; */
}
.popupClose{
    display: block;
    cursor: pointer;
    width: 2em;
    height: 2em;
    text-align: right;
    font-size: 1rem;
    line-height: 1em;
    user-select: none;
    background-image: url(../../images/icons/add.svg);
    background-size: contain;
    background-position: right;
    background-repeat: no-repeat;
    transform: rotate(45deg);
    /* float: right; */
    margin: 0 0 0 auto;
}
.popupTitle{
    font-family: "Satisfy", cursive;
    font-size: 2em;
    line-height: 1.2em;
}
.popupText{
    
    margin-top: 1.618rem;
}
.popupAuthor{
    text-align: right;
    margin-top: 1.618rem;
    font-style: italic;
}

/* FORM */

.formLine:not(:first-child) {
    margin-top: 1em;
}
.formlineLabel {
    font-size: 0.8rem;
    line-height: 1em;
    margin-bottom: 0.5em;
}
.formLineInput2Cols{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1em;
}
.formBtns {
    margin-top: 2em;
    text-align: right;
}

.defaultInput{
    font-family: "EB Garamond", serif;
    padding: 0.5em 0.75em;
    appearance: none;
    -webkit-appearance: none;
    font-size: 1rem;
    line-height: 1em;
    border: none;
    background: rgba(255,255,255,0.5);
    display: block;
    width: 100%;
    resize: none;
}
textarea.defaultInput {
    height: calc(2em + 5em*1.5);
    line-height: 1.5em;
}
input[type="checkbox"].defaultInput {
    display: inline-block;
    width: 1em;
    height: 1em;
    padding: 0;
    /* font-size: 1em; */
    /* line-height: 1em; */
    position: relative;
    top: 0.2em;
    margin: 0;
    margin-right: 0.25em;
    cursor: pointer;
}
input[type="checkbox"].defaultInput:checked:after {
    content: "x";
    display: grid;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    text-align: center;
    align-items: center;
    font-size: 1em;
    line-height: 1em;
    font-family: "Courier Prime", monospace;
}
.colorRange {
    filter: grayscale(1);
}

.defaultInput:focus {
    outline: none;
    background-color: #fffa;
}
.defaultInput::-webkit-input-placeholder { /* Edge */
    color: #0008;
}
  
.defaultInput:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: #0008;
}
.defaultInput::placeholder {
    color: #0008;
}

.defaultButton {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0.5em 1em;
    background: white;
    font-family: "Courier Prime", "EB Garamond", serif;
    /* font-weight: bold; */
    font-size: 1rem;
    line-height: 1em;
    cursor: pointer;
    text-align: center;
    border: 1px solid #0002;
    background: transparent;
    transition: background-color .5s;
}
.defaultButton:hover{
    border-color: #000;
}


.dropPreview{
    user-select: none;

    display: grid;
    align-items: center;
    text-align: center;

    position: static;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    box-shadow: 0.25em 0.25em 1em rgb(0 0 0 / 5%);
    background-color: #e0e0e0;
    cursor: pointer;
    box-shadow: 0.1em 0.1em 0.1em rgb(0 0 0 / 50%), 0.5em 0.5em 0.5em inset rgb(255 255 255 / 50%), -0.25em -0.25em 0.25em inset rgb(0 0 0 / 20%);
    transition: box-shadow .2s;
}

.dropPreview:hover{
    box-shadow: 2px 2px 2px rgb(0 0 0 / 50%), 2px 2px 2px inset rgb(255 255 255 / 50%), -2px -2px 2px inset rgb(0 0 0 / 20%);
}

/* RICH DROP CONTENT */

.popupContainer,
.popupContainer *{
    touch-action: auto;
}

.readDropPopup,
.profilePopup{
    max-width: 640px;
}

.popupDropImage,
.linkedImagePreview{
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    margin: 1.25rem auto 0;
    object-fit: contain;
}

.linkedImagePreview{
    margin: 0.75rem 0;
}

.popupText{
    overflow-wrap: anywhere;
}

.popupText p:first-child{
    margin-top: 0;
}

.popupText p:last-child{
    margin-bottom: 0;
}

.popupText a{
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dropSocialSummary{
    display: flex;
    gap: 1em;
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #0002;
    font-family: "Courier Prime", monospace;
    font-size: 0.72rem;
}

.dropOwnerActions{
    display: flex;
    gap: 0.5em;
    justify-content: flex-end;
    margin-top: 1rem;
}

.dropOwnerActions form{
    margin: 0;
}

.dropInteraction{
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #0002;
}

.likeForm{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75em;
    align-items: start;
}


.commentForm{
    margin-top: 1.25rem;
}

.commentForm .defaultButton{
    margin-top: 0.75em;
}


.approvalNote{
    margin-top: 0.75rem;
    font-size: 0.72rem;
    line-height: 1.35em;
    opacity: 0.65;
}

.commentsList{
    margin-top: 1.5rem;
}

.commentItem{
    padding: 0.9rem 0;
    border-top: 1px solid #0002;
}

.commentHeader{
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.85rem;
}

.commentAvatar{
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    object-fit: cover;
}

.commentText{
    margin-top: 0.35rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* QUILL */

#dropEditor{
    min-height: 9rem;
    background: rgba(255,255,255,0.5);
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow{
    border-color: #0002;
}

.ql-toolbar.ql-snow{
    background: rgba(255,255,255,0.4);
}

.ql-container{
    font-family: "EB Garamond", serif;
    font-size: 1rem;
}

.ql-editor{
    min-height: 9rem;
    line-height: 1.5em;
}

.fileInput{
    padding: 0.4em;
    font-size: 0.85rem;
}

.currentImageWrap{
    margin-top: 0.75em;
}

.currentImage{
    display: block;
    max-width: 100%;
    max-height: 240px;
    margin-bottom: 0.5em;
}

.removeImageLabel{
    display: block;
    margin-top: 0.6em;
    font-size: 0.85rem;
}

/* PROFILE */

.profileIdentity{
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 1rem;
    align-items: center;
}

.profileImage,
.profileImagePlaceholder{
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.45);
    border: 1px solid #0002;
}

.profileImagePlaceholder{
    position: relative;
}

.profileImagePlaceholder:after{
    content: "";
    position: absolute;
    inset: 25%;
    border: 1px solid #0005;
    border-radius: 50%;
}

.profileDrops{
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #0002;
}

.profileSectionTitle{
    font-family: "Satisfy", cursive;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.profileDropItem{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75em;
    align-items: center;
    padding: 0.7rem 0;
    border-top: 1px solid #0002;
}

.profileDropItem > a{
    display: grid;
    grid-template-columns: 1.2rem 1fr;
    gap: 0.65em;
    align-items: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.profileDropItem small{
    display: block;
    font-family: "Courier Prime", monospace;
    font-size: 0.65rem;
    line-height: 1.2em;
    opacity: 0.6;
}

.profileDropDot{
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    box-shadow: 1px 1px 2px #0005;
}

.profileDropActions{
    display: flex;
    align-items: center;
    gap: 0.55em;
}

.profileDropActions form{
    margin: 0;
}

.textButton{
    appearance: none;
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.dangerButton{
    color: #8a1d1d;
}

.emptyState{
    font-style: italic;
    opacity: 0.65;
}

.logoutForm{
    margin-top: 1rem;
}

/* ABOUT */

.aboutLink{
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9;
    color: #000d;
    font-family: "Courier Prime", monospace;
    font-size: 0.7rem;
    line-height: 1em;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: filter .5s;
}

.aboutLink.unfocused{
    filter: blur(2px);
}

body.darkmode .aboutLink{
    color: #fffd;
}

body.darkmode .dropSocialSummary,
body.darkmode .dropInteraction,
body.darkmode .commentItem,
body.darkmode .profileDrops,
body.darkmode .profileDropItem{
    border-color: #fff2;
}


.interactionForm .actionEmail,
.interactionForm textarea{
    margin-bottom: 0.75em;
}


.interactionButtons{
    display: flex;
    justify-content: flex-end;
    gap: 0.5em;
    margin-top: 0.75em;
}


#loginBtn.hasProfileImage{
    border-radius: 50%;
    background-size: cover;
    border: 1px solid #0003;
}
body.darkmode #loginBtn.hasProfileImage{
    filter: none;
    border-color: #fff4;
}


/* PUBLIC IDENTITIES */
.popupAuthor{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5em;
}

.identityRow{
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.identityAvatar{
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.popupAuthor .identityAvatar{
    width: 2rem;
    height: 2rem;
}

.popupText img{
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    margin: 0.75rem 0;
    object-fit: contain;
}

.likeForm{
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-top: 0.25rem;
}

.likeForm label,
.commentForm label{
    font-size: 0.85rem;
}

.commentForm textarea{
    margin-bottom: 0.75em;
}

.commentForm label{
    display: block;
    margin-bottom: 0.75em;
}

.likesList,
.commentsList{
    margin-top: 1.5rem;
}

.socialListTitle{
    font-family: "Courier Prime", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.65;
    padding-bottom: 0.45rem;
}

.likeItem,
.commentItem{
    padding: 0.75rem 0;
    border-top: 1px solid #0002;
}

body.darkmode .likeItem{
    border-color: #fff2;
}
