/* =========================================================
   PAPER INDEX

   Grouped listing of papers by exam session. Shared by past
   papers and predicted papers — see the note in
   paper-viewer.css about the two class names.

   See /inc/paper-index.php and
       /templates/paper-index.php
   ========================================================= */

.mwd-paper-index {
    width: 100%;
}


/* =========================================================
   EXAM SESSION
   ========================================================= */

.mwd-paper-session {
    margin-bottom: 48px;
}


.mwd-paper-session:last-child {
    margin-bottom: 0;
}


.mwd-paper-session-heading {
    margin-bottom: 14px;
}


.mwd-paper-session-title {
    margin: 0;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}


.mwd-paper-session-title span {
    font-weight: 400;
}


/* =========================================================
   PAPER LIST
   ========================================================= */

.mwd-paper-list {
    display: flex;
    flex-direction: column;

    border-top: 1px solid rgba(0, 0, 0, 0.12);
}


/* =========================================================
   INDIVIDUAL PAPER
   ========================================================= */

.mwd-paper-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 18px 0;

    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}


.mwd-paper-title {
    flex: 1 1 auto;

    margin: 0;
    padding: 0;

    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
}


.mwd-paper-title a {
    color: inherit;
    text-decoration: none;
}


.mwd-paper-title a:hover {
    text-decoration: underline;
}


/* =========================================================
   RESOURCE LINKS
   ========================================================= */

.mwd-paper-links {
    display: flex;
    align-items: center;

    gap: 8px;

    flex: 0 0 auto;
}


.mwd-paper-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 9px 13px;

    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 4px;

    background: transparent;
    color: inherit;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}


.mwd-paper-link:hover {
    background: rgba(0, 0, 0, 0.05);

    text-decoration: none;
}


.mwd-paper-link:active {
    transform: scale(0.98);
}


/* =========================================================
   YOUTUBE
   ========================================================= */

.mwd-paper-link--youtube {
    white-space: nowrap;
}


.mwd-paper-youtube-icon {
    display: block;

    width: 19px;
    height: 19px;

    flex: 0 0 auto;

    color: #ff0033;
}


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

@media (max-width: 767px) {

    .mwd-paper-session {
        margin-bottom: 36px;
    }


    .mwd-paper-session-title {
        font-size: 24px;
    }


    .mwd-paper-item {
        align-items: flex-start;
        flex-direction: column;

        gap: 12px;

        padding: 18px 0;
    }


    .mwd-paper-links {
        width: 100%;

        flex-wrap: wrap;
    }


    .mwd-paper-link {
        flex: 1 1 auto;
    }

}


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

@media (max-width: 480px) {

    .mwd-paper-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }


    .mwd-paper-link--youtube {
        grid-column: 1 / -1;
    }

}
