/* ==========================================================================
   DOCUMENTS
   ========================================================================== */


/* --------------------------------------------------------------------------
   Component
   -------------------------------------------------------------------------- */

.sv_documents {
    width: 100%;
    min-width: 0;
}

.sv_documents_header {
    width: 100%;
    min-width: 0;
    padding-inline: var(--space_3);
    padding-bottom: var(--space_3);
}

    .sv_documents_header h1 {
        margin: 0;
    }


/* --------------------------------------------------------------------------
   Documents list
   -------------------------------------------------------------------------- */

.sv_documents_list {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding-inline: var(--space_3);
    padding-bottom: var(--space_10);
}


/* --------------------------------------------------------------------------
   Document
   -------------------------------------------------------------------------- */

.sv_document {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin-bottom: var(--space_6);
}

    .sv_document:last-child {
        margin-bottom: 0;
    }


/* --------------------------------------------------------------------------
   Document header
   -------------------------------------------------------------------------- */

.sv_document_header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    padding-bottom: var(--space_2);
}

    .sv_document_header h3 {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--color_LunarGreen);
        font-family: var(--font_BovinoMedium);
        line-height: 1.2;
    }


/* --------------------------------------------------------------------------
   History link
   -------------------------------------------------------------------------- */

.sv_document_history_link {
    position: relative;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: var(--space_4);
    height: var(--space_4);
    color: var(--color_LunarGreen);
    text-decoration: none;
}

    .sv_document_history_link > .svg_icon {
        display: block;
        width: 100%;
        height: 100%;
        fill: currentColor;
        transition: color 160ms ease, transform 160ms ease;
    }

    .sv_document_history_link:hover,
    .sv_document_history_link:focus-visible {
        color: var(--color_Red);
    }

        .sv_document_history_link:hover > .svg_icon,
        .sv_document_history_link:focus-visible > .svg_icon {
            transform: scale(1.08);
        }


/* --------------------------------------------------------------------------
   History label
   -------------------------------------------------------------------------- */

.sv_document_history_label {
    position: absolute;
    right: 0;
    bottom: calc(100% + var(--space_1));
    display: flex;
    align-items: center;
    min-width: max-content;
    padding: var(--space_1) var(--space_2);
    background-color: var(--color_RockBlue_75);
    color: var(--color_LunarGreen);
    opacity: 0;
    visibility: hidden;
    transform: translateY(var(--space_1));
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

    .sv_document_history_label .svg_icon {
        display: block;
        width: var(--space_2);
        height: var(--space_2);
        margin-right: var(--space_1);
        fill: currentColor;
    }

    .sv_document_history_label span {
        white-space: nowrap;
        font-family: var(--font_BovinoLight);
    }

.sv_document_history_link:hover
.sv_document_history_label,
.sv_document_history_link:focus-visible
.sv_document_history_label {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* --------------------------------------------------------------------------
   PDF preview
   -------------------------------------------------------------------------- */

.sv_document_preview {
    display: block;
    width: 100%;
    min-width: 0;
    height: 70dvh;
    min-height: calc(var(--space_10) * 6);
    border: 0;
    background-color: var(--color_White);
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 48em) {

    .sv_documents_header,
    .sv_documents_list {
        padding-inline: var(--space_2);
    }

    .sv_document {
        margin-bottom: var(--space_4);
    }

    .sv_document_header h3 {
        white-space: normal;
    }

    .sv_document_preview {
        height: 65dvh;
        min-height: calc(var(--space_10) * 5);
    }
}


/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .sv_document_history_link > .svg_icon,
    .sv_document_history_label {
        transition: none;
    }
}
