:root {
    --main--max-width: 890px;
    height: 100%;
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

.main-content {
    padding: 4em 1.6em 0 1.6em;
    background-color: #fff;
    margin: auto;
    text-align: center;
    max-width: var(--main--max-width);
}

.invisible {
    visibility: hidden !important;
    max-height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
}

/* STORY LIST STYLES
-------------------------------*/

ul#story-list {
    display: block;
    /* unsetting skeleton */
    list-style: none;
    padding: 1.9em 0.7em;
    justify-items: end;
}

ul#story-list li {
    display: flex;
    margin-bottom: 7px;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.3em 0 0.3em 1.5em;
    border-radius: 1em;
    border: 1.3px solid #dbdbdb;
}

ul#story-list li:hover {
    transition: 200ms;
    background: rgb(255,255,255);
    filter: drop-shadow(0 0 8px rgba(0,0,0,.1));
}

#story-list li .story-title {
    width: 100%; /* the element needs a fixed width (in px, em, %, etc) */
    overflow: hidden; /* make sure it hides the content that overflows */
    white-space: nowrap; /* don't break the line */
    text-overflow: ellipsis; /* give the beautiful '...' effect */
    padding-right: 1.5em;
    line-height: 28px;
    cursor: pointer;
}

.story-buttons {
    padding-right: 0.75em;
}

.pen-button {
    margin: 0;
    border-radius: 10px;
    line-height: unset;
    height: unset;
}

.archive-button {
    padding: 5px 5px 0 5px;
    /* as a quick dark-mode remedy */
    filter: drop-shadow(0px 0px 3px #ffffff);
    -webkit-filter: drop-shadow(0px 0px 3px #ffffff);
    -moz-filter: drop-shadow(0px 0px 3px #ffffff);
}

#dark-mode-button {
    position: absolute;
    top: 32px;
    left: 32px;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 2rem;
    background-color: #000;
    padding: 0;
}

#home-button {
    position: absolute;
    top: 32px;
    left: 32px;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 2rem;
    background-color: #ffffff;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* STORY PAGE STYLES
-------------------------------*/

#story-parts {
    padding: calc(1.3em + 10px) 0 calc(2.6em + 10px);
}

.vote-button {
    padding: 2px 5px 5px 5px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 12px;
    width: 4em;
    height: 4em;
    background-color: white;
}

.vote-button:hover {
    background-color: black;
    transition: 0.3s;
}

.vote-button:hover img {
    filter: invert();
    transition: 0.3s;
}

.vote-button img {
    width: 2em;
    opacity: 1.;
}

.vote-button.chosen-vote {
    background-color: black;
}

.vote-button.chosen-vote img {
    filter: invert();
    transition: 0.9s;
}

button.bonus-applied-button {
    padding: 0 1.25em;
}

#candidate-carousel-container, #bounty-form, #submission-form, .bounties-container {
    /* start out invisible */
    display: none;
}

.candidate-container {
    display: flex;
    flex-direction: column;
    padding: 14px;
}

.story-part-container {
    display: flex;
    overflow: auto;
    /* hack to get shadow to stay visible with overflow: auto */
    padding: 10px;
    margin: -20px;
}

.story-paragraph-content {
    display: block;
}

.story-paragraph {
    padding: 1.5em;
    border-radius: 12px;
    background-color: white;
    width: fit-content;
    max-width: 95%;
    height: fit-content;
    margin: auto;
    text-align: start;
    overflow-wrap: break-word;
}

.story-paragraph.elected, .story-paragraph.unelected {
    margin: 3px;
    padding: 0.5em 1.2em;
}

.story-paragraph.elected {
    cursor: pointer;
}

.story-paragraph:hover {
    filter: drop-shadow(0 0 8px rgba(0,0,0,.1));
}

.story-paragraph.all-part-view {
    border: 1.4px solid #e4e4e4;
}

.story-paragraph.all-part-view.unelected {
    background-color: #f0f0f0;
}

.member-chip-container {
    display: flex;
    flex-wrap: wrap;
    padding: 6px 0 4px;
}

.member-chip {
    margin-right: 5px;
    padding: 2px 8px;
    border: 1.5px solid;
    border-radius: 13px;
    font-size: 83%;
    font-weight: bold;
}

.candidate-paragraph {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 160px);
    max-height: 80px;
    border: 1px solid #e4e4e4;
    transition: max-height 0.25s ease-out;
    overflow: hidden;
}

li.is-visible .candidate-paragraph {
    max-height: 9999999999999999999999vmax;
    transition: max-height 0.25s ease-in;
}

#submission-input {
    min-width: 15vw;
}

.bonus-interface {
    display: none;
}

.bonus-interface.chosen-vote {
    display: block;
}

.bonus-applied-buttons {
    display: flex;
    justify-content: center;
}

.bonus-applied-field {
    margin: .5em .8em;
}

#members-heading, #bounties-heading {
    font-size: 1.08em;
}

#bounties-heading {
    color: #ffffff;
}

.members-container {
    padding: 1em;
}

.bounties-container {
    margin: 0 auto 0.5em auto;
    width: fit-content;
    padding: 0.2em 0.7em;
    background-color: #000000;
    border-radius: 9px;
}

#bounties-contents, #members-names {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.bounty {
    padding: 0.3em 0.8em;
    margin: 0.4em;
    border-radius: 14px;
    border: #ffffff solid 1px;
    background-color: #000000;  
    color: #ffffff;
    cursor: pointer;
    transition: 0.2s ease-in;
}

.bounty.selected {
    transition: 0.2s ease-in;
    background-color: #ffffff;
    color: #000000;
}

.bounty.your-own {
    border: #fff dashed 1px;
    cursor: auto;
}

#members-names {
    font-weight: 500;
}

.member-div {
    padding: 0.3em 0.8em;
    margin: 0.4em;
    border-radius: 14px;
}

.splide {
    margin-bottom: 3.6em;
}

/* MODAL STYLES
-------------------------------*/
.jw-modal {
    /* modals are hidden by default */
    display: none;

    /* modal container fixed across whole screen */
    position: fixed;
    inset: 0;

    /* z-index must be higher than everything else on the page */
    z-index: 10000;
    
    /* semi-transparent black background exposed by padding */
    background-color: rgba(0, 0, 0, .35);
    padding: 40px;

    /* enables scrolling for tall modals */
    overflow: auto;
}

.jw-modal.open {
    display: flex;
}

.jw-modal-body {
    margin: auto;
    max-width: var(--main--max-width);
}

body.jw-modal-open {
    /* body overflow is hidden to hide main scrollbar when modal window is open */
    overflow: hidden;
}

.stupid-padding-fix-container {
    padding: 30px;
    border-radius: 1.5em;
    background: #fff;
}

.modal-button {
    margin-right: 0.75em;
    margin-left: 0.75em;
}

#enable-push-notifications:disabled {
    background: transparent !important;
    color: black
    ;
    border: none;
    outline: none;
    box-shadow: none;
}