@media (max-width: 768px) {

    /* general styles - applicable to both public & legislative */

    * {
        /border: 1px solid black
    }


    .divider {
        height: 0.8rem;
        background: linear-gradient(var(--gray1) 20%, var(--gray2) 30%, var(--gray3) 40%, var(--text) 50%, var(--gray3) 60%, var(--gray2) 70%, var(--gray1) 80%)
    }

    #event-toggle1,
    #event-toggle2 {
        display: inline-block;
        font-size: 1.6rem;
    }

    #search-input-leg:not(.search-input-mobile),
    #search-input-pub:not(.search-input-mobile),
    .rec-events-cont2:not(#rec-events-cont2-mobile) {
        display: none;
    }

    #rec-events-sec {
        display: flex;
        flex-direction: column;
    }

    /* refer to rec_events_pub_mobile and leg_mobile if labeled " -mobile " */

    .rec-events-cont-main-mobile {
        display: flex;

        padding-right: 0.5rem;
        height: 100vh !important;
        margin: 0;
        overflow: hidden;
    }

    #rec-events-sec-mobile {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        margin: 0 auto;
        width: 100%;
        position: relative;
        top: 0;
        bottom: 0;
        height: 100%;

    }

    .rec-events-cont1-mobile {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 100%;
    }


    .spinner-cont {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .loadingSpinner {
        height: 15rem;
        width: 15rem;
        margin-top: 0%;
    }


    .rec-events-cont1 h2 {
        text-align: center;
        margin: 0 0 0.5rem 0;
        font-size: 1.8rem;
        white-space: nowrap;
    }

    .rec-events-cont1 h2 a {
        text-decoration: none;
        pointer-events: visible;
    }

    .rec-events-cont1 h2 a:visited {
        color: inherit;
    }

    #rec-events-leg h2 {
        margin-top: 2.5rem;
        margin-bottom: 8rem;
    }

    #search-input-pub:not(.search-input-mobile),
    #search-input-leg:not(.search-input-mobile) {
        width: 18rem;
        margin: 0.5rem 0 2rem 0;
        border-radius: 0.5rem;
    }

    .search-input-mobile {
        margin: 0 auto 0 auto;
        left: 4%;
        width: 70%;
        height: 2.5rem;
        position: fixed;
        top: 5.5%;
        padding-left: 3rem;
        font-size: 1.5rem;
    }

    .mag-glass {
        display: none;
        position: absolute;
        font-size: 1.5rem;
        font-weight: bold;
        padding-left: 0.6rem;
        transform: translate(0, 62%);
    }

    .mag-glass-mobile {
        display: none;
        position: absolute;
        font-size: 1.7rem;
        font-weight: bold;
        padding-left: 0.6rem;
        transform: translate(80%, -120%);
        z-index: 2;
    }

    .rec-events-label-mobile {
        font-size: 1.6rem;
        position: fixed;
        height: 2rem;
        top: 1.2%;
        width: 100%;
        padding-left: 3%;
        text-align: left;
        margin: 0 auto;
        z-index: 1;

    }

    #rec-events-close-button {
        font-size: 2.5rem;
        color: var(--blue4);
        border: none;
        position: fixed;
        right: 2%;
        background-color: transparent;
        top: 0.8%;
        z-index: 2;
        cursor: pointer;
    }

    .rec-events-cont2 {
        height: 100vh;
        width: 100vw;
        margin: 0rem auto 0rem auto;
        background: var(--ggray1);
        overflow-y: scroll;
        overflow-x: hidden;
        /*border-right: 1rem solid var(--gray);*/
        border-top: 8.5rem solid var(--gray2);
        border-bottom: 3rem solid var(--gray2);
        /*border-radius: 2%;*/
        color: var(--blue4);
        display: flex;

    }

    #rec-events-data-pub {
        margin-top: 2rem;
    }

    .rec-events-cont3 {
        margin: 3rem 0rem 3rem 0rem;
        display: flex;
        flex-direction: column;
    }

    .rec-events-div1 {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .rec-events-div2 {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin: 0rem 0rem 1rem 0rem;
        padding-bottom: 1%;
        border-bottom: 1px solid var(--gray5);
    }

    .rec-event-pol-party-color {
        width: 0.6rem;
        border-radius: 1rem;
        padding: 0.1rem 0.1rem 0.1rem 0.1rem;
        margin-bottom: 0.3rem;
        height: 100%;
    }

    [data-party='Democrat'].rec-event-pol-party-color {
        background-color: var(--dems);
    }

    [data-party='Republican'].rec-event-pol-party-color {
        background-color: var(--reps);
    }

    [data-party='Independent'].rec-event-pol-party-color {
        background-color: var(--inds);
    }

    [data-party='Green'].rec-event-pol-party-color {
        background-color: var(--grns);
    }


    .rec-event-pol-name a {
        color: var(--blue1);
        font-size: 1.6rem;
        margin-bottom: 2%;
        white-space: nowrap;
    }

    .election-candidate {
        padding: 0rem 0.4rem 0rem 0.4rem;
        font-size: 1.2rem;
        width: fit-content;
        background: var(--cyan2);
        color: var(--blue4);
        border: 1px solid var(--gray5)
    }

    .rec-event-pol-office {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .rec-event-pol-office a {
        color: var(--blue1);
        text-decoration: none;
    }

    .rec-event-act {
        font-size: 1.2rem;

    }

    .rec-events-div3 {
        display: flex;
        margin: 0rem 0 0.5rem 0;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--gray5);
    }

    .rec-event-quote {
        margin-left: 1rem;
        font-size: 1.3rem;
        font-style: italic;
        text-align: left;
        padding-right: 0.8rem
    }

    .rec-events-div4 {
        display: flex;
        align-items: center;
        flex-direction: row;
        margin-top: 0.5rem;
    }

    .rec-events-div4-1 {
        display: flex;
        align-items: center;
        flex-direction: row;
        margin-top: 0.5rem;
        width: 80%;
    }

    .rec-event-sentiment-label {
        margin: 0rem 0.8rem 0 1.2rem;
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        font-weight: bold;
        font-size: 1.4rem;
    }

    .rec-event-sentiment {
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        color: white;
        width: 10rem;
        border-radius: 1rem;
        border: 0.1rem solid var(--gray5);
        box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.2);
        font-size: 1.3rem;
        padding: 0.8% 0% 1.5% 0%;
    }

    [data-sentiment='Strongly Pro'].rec-event-sentiment {
        background-color: var(--strongly-pro);
    }

    [data-sentiment='Slightly Pro'].rec-event-sentiment {
        background-color: var(--slightly-pro);
    }

    [data-sentiment='Neutral'].rec-event-sentiment {
        background-color: var(--neutral);
    }

    [data-sentiment='Slightly Anti'].rec-event-sentiment {
        background-color: var(--slightly-anti);
    }

    [data-sentiment='Strongly Anti'].rec-event-sentiment {
        background-color: var(--strongly-anti);
    }

    [data-sentiment='Not enough data'].rec-event-sentiment {
        background-color: var(--not-enough-data);
    }

    .rec-event-src-logo {
        font-size: 1.6rem;
        margin-right: 2%;
    }

    .rec-event-link {
        margin-right: 3%;
        margin-bottom: 3%
    }

    .rec-event-link a {
        color: var(--blue1);
        font-size: 1.2rem;
    }



    /* public statement */

    .rec-events-div2-1.pub {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .rec-events-div2-1-1.pub {
        display: flex;
        flex-direction: row;
    }

    .rec-event-pol-party.pub {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-right: 0.5rem;
        margin-top: 1%;
        height: 95%;
    }

    .rec-event-pol-image-div.pub {
        margin-top: 1%;
        margin-right: 1rem;
    }


    .rec-event-pol-image.pub {
        height: 5rem;
        border-radius: 10%;

    }

    .rec-events-div2-1.pub {
        padding: 0% 0% 0% 1%;
    }

    .rec-events-div2-1-2.pub {
        text-align: left;
        width: 100%;
        padding: 0% 0% 1.0% 0%;
    }

    .rec-events-div2-1-2.pub,
    .rec-events-div2-2.pub {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .rec-events-div2-2.pub {
        text-align: right;
        padding: 0% 2% 1.0% 0%;
    }

    .rec-events-div4-2.pub {
        display: flex;
        align-items: flex-start;
        justify-content: right;
        flex-direction: row;
        width: 50%;
        margin-top: 0.5rem;
        padding-right: 1%;
    }

    .rec-event-date.pub {
        font-size: 1.3rem;
        margin-bottom: 6.5%;
        white-space: nowrap;
    }

    .rec-event-act.pub {
        white-space: nowrap;
    }

    /* legislative action */

    .rec-events-div2-3.leg {
        width: 20%;
        margin: 0% 1% 0% 3.5%;
    }

    .rec-event-seal.leg {
        height: 5rem;
        margin-left: 3rem;
    }

    .rec-events-div2-1.leg {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .rec-events-div2-1-2.leg {
        text-align: right;
        width: 100%;
        padding: 0% 0% 1.0% 0%;
    }

    .rec-events-div2-1-1.leg {
        display: flex;
        flex-direction: row;
    }

    .rec-event-pol-image-div.leg {
        margin-top: 1%;
        margin-left: 1rem;
        margin-right: 0.5rem;
    }

    .rec-event-pol-image.leg {
        height: 5rem;
        border-radius: 10%;
    }

    .rec-event-pol-party.leg {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-right: 0.5rem;
        margin-top: 1%;
        height: 95%;
    }


    .rec-events-div3-1.leg {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0% 0% 0% 1%;
        min-width: 13rem;
        border-right: 1px solid var(--gray5);
    }

    .rec-event-act.leg {
        font-size: 1.6rem;
        margin-bottom: 7%;
        line-height: 1.9rem;

    }

    .rec-events-div4-1.leg {
        display: flex;
        justify-content: flex-end;
        right: 0;
        padding-right: 3%;
    }

    .rec-events-div4-2.leg {
        display: flex;
        align-items: flex-start;
        justify-content: left;
        flex-direction: row;
        margin: 0.3rem 0rem 0 1rem;
    }


    .rec-event-date.leg {
        font-size: 1.2rem;
        white-space: nowrap;
        margin-top: 0.5rem;

    }


}