/* =========================================================
   NOVEL VOTING EVENT
   Frontend Styles
   ========================================================= */


/* =========================================================
   EVENT WRAPPER
   ========================================================= */

.nve-event {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* =========================================================
   EVENT HEADER
   ========================================================= */

.nve-event-header {
    margin-bottom: 2.5rem;
}


.nve-event-title {
    margin: 0 0 0.75rem;
}


.nve-event-intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
}


/* =========================================================
   CANDIDATE LIST
   ========================================================= */

.nve-candidates {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


/* =========================================================
   ENTRY CARD
   ========================================================= */

.nve-entry {
    display: grid;
    grid-template-columns: 50px 150px minmax(0, 1fr);
    gap: 1.25rem;

    align-items: start;

    padding: 1.25rem;

    border: 1px solid rgba(128, 128, 128, 0.25);

    border-radius: 8px;
}


/* =========================================================
   RANK
   ========================================================= */

.nve-rank {
    display: flex;

    align-items: flex-start;
    justify-content: center;

    font-size: 1.4rem;
    font-weight: 700;

    padding-top: 0.25rem;
}


/* =========================================================
   COVER
   ========================================================= */

.nve-cover {
    width: 150px;
}


.nve-cover img {
    display: block;

    width: 150px;
    height: 220px;

    object-fit: cover;

    border-radius: 4px;
}


.nve-cover-placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 150px;
    height: 220px;

    text-align: center;

    border-radius: 4px;

    background: rgba(128, 128, 128, 0.12);
}


/* =========================================================
   CONTENT
   ========================================================= */

.nve-entry-content {
    min-width: 0;
}


.nve-entry-title {
    margin: 0 0 0.35rem;
}


.nve-entry-author {
    margin-bottom: 0.35rem;

    font-size: 0.95rem;
    opacity: 0.8;
}


.nve-entry-chapters {
    margin-bottom: 1rem;

    font-size: 0.9rem;
    opacity: 0.75;
}


.nve-entry-description {
    margin-bottom: 1.25rem;

    line-height: 1.7;
}


.nve-entry-description p {
    margin-top: 0;
}


.nve-entry-description p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.nve-no-entries {
    padding: 2rem;

    text-align: center;

    border: 1px dashed rgba(128, 128, 128, 0.35);

    border-radius: 8px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .nve-entry {
        grid-template-columns: 40px 110px minmax(0, 1fr);

        gap: 1rem;

        padding: 1rem;
    }


    .nve-rank {
        font-size: 1.2rem;
    }


    .nve-cover,
    .nve-cover img,
    .nve-cover-placeholder {
        width: 110px;
    }


    .nve-cover img,
    .nve-cover-placeholder {
        height: 165px;
    }

}


@media (max-width: 520px) {

    .nve-entry {
        grid-template-columns: 36px 1fr;
    }


    .nve-cover {
        width: 100%;
    }


    .nve-cover img,
    .nve-cover-placeholder {
        width: 100%;
        max-width: 180px;
        height: auto;
        aspect-ratio: 2 / 3;
    }


    .nve-entry-content {
        grid-column: 2;
    }


    .nve-rank {
        grid-row: 1;
    }

}

 /* =========================================================
    VOTE MESSAGES
    ========================================================= */

.nve-vote-message {
    margin-top: 0.6rem;

    font-size: 0.9rem;

    line-height: 1.5;
}


.nve-vote-message a {
    text-decoration: underline;
}


.nve-vote-message.is-success {
    opacity: 0.8;
}


.nve-vote-message.is-error {
    font-weight: 600;
}

 /* =========================================================
    VOTE GAP
    ========================================================= */

.nve-vote-gap {
    margin-top: 0.5rem;

    font-size: 0.85rem;

    opacity: 0.7;

    line-height: 1.4;
}

/* =========================================================
   DESCRIPTION EXPAND / COLLAPSE
   ========================================================= */

.nve-entry-description-wrapper {
    position: relative;

    margin-bottom: 1.25rem;
}


.nve-entry-description {
    max-height: 7.5rem;

    overflow: hidden;

    transition: max-height 0.3s ease;
}


/* ---------------------------------------------------------
   Expanded description
   --------------------------------------------------------- */

.nve-entry-description-wrapper.is-expanded
.nve-entry-description {
    max-height: 2000px;
}


/* ---------------------------------------------------------
   Toggle button
   --------------------------------------------------------- */

.nve-description-toggle {
    display: inline-block;

    margin-top: 0.75rem;

    padding: 0;

    border: 0;

    background: none;

    color: inherit;

    cursor: pointer;

    font-size: 0.9rem;
    font-weight: 600;

    text-decoration: underline;
}


.nve-description-toggle:hover {
    opacity: 0.8;
}


.nve-description-toggle:focus-visible {
    outline: 2px solid currentColor;

    outline-offset: 3px;
}