@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap');

/* ________________________________________________________________________________________ */
/* GLOBAL STYLING */

:root { /* css color variables */
    --color-dark-background: rgb(4, 14, 20);
    --color-dark-background-alpha-50: rgba(4, 14, 20, .5);
    --color-font-default: rgb(255, 255, 255);
    --color-yellow-highlight: rgb(	255, 255, 149);
    --color-description-marine: rgba(152, 196, 196, 0.5);
    --color-white-alpha-0: rgba(255, 255, 255, 0);
    --color-white-alpha-1p5: rgba(255, 255, 255, 0.015);
    --color-white-alpha-6: rgba(255, 255, 255, 0.06);
    --color-white-alpha-12: rgba(255, 255, 255, 0.12);
    --color-white-alpha-24: rgba(255, 255, 255, 0.24);
    --color-white-alpha-36: rgba(255, 255, 255, 0.36);
    --gradient-filur: linear-gradient(180deg, rgba(215,164,100,1) 0%, rgba(215,100,100,1) 100%);
    --gradient-filur-reverse: linear-gradient(180deg, rgba(215,100,100,1) 0%, rgba(215,164,100,1) 100%);
    --gradient-red-to-blue: linear-gradient(202deg, rgba(18,60,87,0.75) 0%, rgba(215,100,100,0.75) 100%);
    --gradient-red-to-blue-hover: linear-gradient(202deg, rgba(18,60,87,1) 0%, rgba(215,100,100,1) 100%);
    --gradient-lightbottom-to-darktop: linear-gradient(180deg, var(--color-white-alpha-0) 0%, var(--color-white-alpha-12) 100%);
    --gradient-green-blue: linear-gradient(202deg, rgba(18,60,87,1) 0%, rgba(127,203,127,1) 100%);
}

*, *:before, *:after {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 10px;
  }

::-webkit-scrollbar-track {
    background: var(--color-white-alpha-12);
}

::-webkit-scrollbar-thumb {
    background: var(--color-white-alpha-24);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-white-alpha-36);
}

body {
    background: var(--color-dark-background);
    font-family: 'Open Sans', sans-serif;
    -ms-overflow-style: none; /* for Internet Explorer, Edge */
    scrollbar-width: none; /* for Firefox */
    overflow: hidden scroll;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--color-font-default);
    display: flex;
    flex-direction: column;
    min-height: 140vh;
}

input, select, textarea, button{
    font-family:inherit;
}

.noscroll {
    overflow-y: hidden;
}

body::-webkit-scrollbar {
    display: none; /* for Chrome, Safari, and Opera */
}

/* ________________________________________________________________________________________ */
/* HEADER + NAV styling */
header {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 1fr 10fr 1fr;
}

nav {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
}

.nav-section {
    display: flex;
}

.nav-item {
    color: var(--color-font-default);
    transition: .2s ease-in-out;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 1rem;
    font-size: 1.125rem;
}

.nav-item.title {
    font-size: 1.5rem;
}

.nav-item > h3 {
    margin: 0 1vw;
}

.nav-item.title > h3 {
    margin: 1vw;
} 

.nav-item.title:hover {
    background: var(--color-white-alpha-6);
}

.nav-item.user {
    color:rgb(255, 224, 198);
}

.nav-item.likes {
    color:rgb(175, 225, 175);
    font-size: 1rem;
}

.nav-item:hover {
    background-color: var(--color-white-alpha-24);
}

#logo-small {
    width: 3rem;
}

/* ________________________________________________________________________________________ */
/* FOOTER styling */

footer {
    display: flex;
    justify-content: center;
    position: relative;
    background: var(--gradient-lightbottom-to-darktop);
    margin-top: auto;
    padding: 3em 0 2em;
    transition: opacity .5s ease-in-out;
}

footer > .footer-content {
    display: grid;
    width: 50%;
    grid-auto-flow: column;
    column-gap: 1rem;
    font-size: .85rem;
}

footer > .footer-content > .column {
    display: grid;
    grid-auto-rows: max-content;
    row-gap: 1rem;
    font-size: .85rem;
    justify-content: center;
}

footer > .footer-content > .column > p {
    margin: 0;
}

footer > .footer-content > .column > a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-font-default);
    column-gap: 0.5rem;

}

footer > .footer-content > .column > a > #moviedb {
    height: 1rem;
}

footer > .footer-content > .column > a > #justwatch {
    height: .8rem;
}

/* ________________________________________________________________________________________ */
/* GRID styling */
main {
    display: grid;
    grid-template-columns: minmax(10px, 1fr) minmax(auto, 700px) minmax(10px, 1fr);
    grid-template-rows: max-content;
    row-gap: 15px;
    margin-bottom: 5vh;
}

.grid-row {
    grid-column: 2;
}

/* ________________________________________________________________________________________ */
/* grid row DESCRIPTION element styling */
.row-description.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 10px;
    text-align: center;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(152, 196, 196,0.5) 30%, rgba(152, 196, 196,.5) 50%, rgba(152, 196, 196,0.5) 70%, rgba(255,255,255,0) 100%);
    border-radius: 1rem 1rem 1rem 1rem;
    margin: auto;
    max-width: 50%;
    font-size: 0.9rem;
}

.description-text {
    grid-area: 1 / 1 / span 1 / span 2;
    margin: 0.2rem;
}

.description-pointdown.left {
    background: var(--color-dark-background);
    border-top-right-radius: 1rem;
    grid-column: 1;
    grid-row: 2;
}

.description-pointdown.right {
    background: var(--color-dark-background);
    border-top-left-radius: 1rem;
    grid-column: 2;
    grid-row: 2;
}

/* ________________________________________________________________________________________ */
/* grid TITLE styling */
.grid-row.title {
    display: grid;
    grid-template-rows: max-content;
    grid-area: 1 / 2;
    justify-items: center;
    text-align: center;
}

.grid-row.title > h1 {
    margin: 0 0 0.3em 0;
}

.grid-row.title > p {
    margin: 0.1em;
    opacity: 0.75;
    width: 75%;
    opacity: 0.8;
}

.grid-row.title > p:last-child {
    margin-bottom: 1em;
    font-size: 18px;
    opacity: 1;
    color: var(--color-yellow-highlight);
}

.grid-row.title.background {
    background: var(--gradient-lightbottom-to-darktop);
    grid-area: 1 / 1 / span 1 / span 3;
    border-radius: 0 0 40% 40%;
}

/* ________________________________________________________________________________________ */
/* grid SESSION LINK styling */

.session-link {
    background: var(--gradient-red-to-blue);
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-column-gap: 1rem;
    border: none;
    border-radius: 1rem;
    color: var(--color-font-default);
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px var(--color-white-alpha-12);
    transition: .1s ease-in-out;
}

.far.fa-clone.hidden {
    display: none;
}

.session-link:hover {
    background: var(--gradient-red-to-blue-hover);
    cursor: url('/img/clone-regular-20x20.png'), pointer;
}

.session-link:active {
    background: var(--gradient-red-to-blue);
    cursor: url('/img/clone-solid-20x20.png'), pointer;
    box-shadow: 0 0px var(--color-white-alpha-0);
    transform: translateY(4px);
}

.session-link i {
    font-size: 1.25rem;
}

/* ________________________________________________________________________________________ */
/* grid EDIT FILTERS styling */

.filters-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: .5rem;
    max-width: 60%;
    justify-content: center;
    margin: auto;
}

.filterBtn {
    background: rgb(255, 224, 198, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: white;
    cursor: pointer;
    border-radius: 14px;
    padding: 3px 15px;
    transition: background 30ms ease-in-out 0s;
}

.filterBtn:hover {
    background: rgba(255, 224, 198, 0.24);
}

.modal {
    height: 100vh;
    width: 100vw;
    display: none;
    position: fixed;
    top: 0;
    z-index: 200;
    background-color: rgba(4, 14, 20, .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: scroll;
}

.modal-content {
    margin: 10% 20%;
    display: none;
}

.filter-row {
    margin: 5px 0;
}

#filter-rows-content {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-column-gap: 2em;
}

.modal #closeFilterBtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    cursor: pointer;
}

.no-click {
    pointer-events: none;
}

.modal-content #media {
    width: max-content;
    display: flex;
    grid-column: 1;
}

.modal-content #sortOrder {
    grid-column: 2;
    grid-row: 1;
}

.modal-content .list img {
    border-radius: .5rem;
    pointer-events: none;
}

.modal-content .filter-row label, .all {
    cursor: pointer;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.92);
    color: rgba(255, 255, 255, 0.92);
    transition: background 30ms ease-in-out 0s;
    border-radius: 14px;
    padding: 3px 15px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 1rem;
    align-items: center;
    display: flex;
    column-gap: .5rem;
}

.modal-content .list {
    display: flex;
    flex-wrap: wrap;
}

.modal-content .filter-row label.active, .all.active {
    border: 1px solid rgb(255, 255, 255);
    background: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
}

.modal-content .filter-row label:hover, .all:hover {
    color: white;
    background: rgb(121, 126, 130);
    border-color: rgb(255, 255, 255);
}

.modal-content #genres .list label.disabled {
    border: 1px solid rgba(30, 30, 30, 0.52);
    color: rgba(30, 30, 30, 0.62);
    pointer-events: none;
    user-select: none;
}

.list#providerlist label.disabled {
    display: none;
}

.modal-content .filter-row.save {
    padding-top: 10px;
}

.modal-content .saveBtn {
    background: var(--gradient-green-blue);
    color: var(--color-font-default);
    padding: 5px;
    width: 150px;
    height: 40px;
    border-radius: 14px;
    font-size: larger;
    font-weight: bold;
    border: none;
    box-shadow: rgb(0 0 0 / 77%) 0px 2px 14px 0px;
    cursor: pointer;
}

.sort-by {
    border: none;
    border-radius: 1rem;
    padding: .3rem.5rem;
    font-size: 0.85rem;
}

.sort-by:focus {
    border-radius: 1rem 1rem 0 0;
}

/* ________________________________________________________________________________________ */
/* SWIPECARDS styling */

.card-container {
    position: relative;
    height: 400px;
    border-radius: 1rem;
    background: var(--color-white-alpha-1p5);
    backface-visibility: hidden;
}

.card {
    display: grid;
    grid-auto-rows: 3fr 5fr 1fr 1fr 4fr 2fr;
    row-gap: 5px;
    position: absolute;
    width: 100%;
    height: 400px;
    transform: scale(1);
    border-radius: 1rem;
    padding: 2rem;
    border: .1rem solid rgb(10, 16, 22);
    outline: 1px solid transparent;
    background-clip: content-box;
    background: var(--gradient-filur);
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: all .2s ease-in-out;
    cursor: grab;
}

.card.moving {
    transition: all 0s;
    box-shadow: rgba(0, 0, 0, 0.77) 0px 2px 14px 0px;
}

.card:active {
    transform: scale(1.05);
    filter: brightness(110%);
    cursor: grabbing;
}

.card-top {
    display: grid;
    grid-row: 1;
    grid-auto-flow: column;
    justify-content: space-between;
}

.card-trailer {
    display: flex;
}

.card-trailer a {
    text-decoration: none;
    padding: .5rem .75rem;
    background-color: rgba(8, 17, 24, 0.64);
    border-radius: 12px;
    height: 2em;
    display: inline-flex;
    color: var(--color-font-default);
}

.card-trailer a p{
    margin: 0 0 0 5px;
    align-self: center;
}

.card-top a:hover {
    background-color: rgba(38, 47, 54, 0.74);
}

.card-providers {
    display: inline-flex;
    gap: 5px;
    pointer-events: none;
}

.card-providers img {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
}

.card-providers-details {
    display: flex;
    grid-row: 6;
    margin-top: 10px;
    font-size: small;
    background: var(--color-white-alpha-24);
    border-radius: 5px;
    padding: 5px;
    flex-direction: column;
    row-gap: 6px;
    justify-self: center;
    width: fit-content;
}

.card-providers-details .list {
    display: flex;
    column-gap: 10px;
    text-align: center;
}

.card-providers-details .list .label {
    background-color: rgba(8, 17, 24, 0.64);
    border-radius: 8px;
    padding: 5px;
    width: 80px;
}

.card-providers-details a {
    border-radius: 8px;
    width: fit-content;
    text-decoration: none;
    padding: .5rem .75rem;
    background: var(--color-dark-background);
    color: var(--color-font-default);
    text-align: center;
    align-self: center;
}

.card-providers-details .list img {
    border-radius: 8px;
}

.match-container .card {
    height: 500px;
}

.card-title {
    grid-row: 3;
    align-self: end;
}

.card-title h2 {
    margin: 0;
}

.card-info {
    grid-row: 4;
    display: flex;
    column-gap: 10px;
    pointer-events: none;
}

.card-info > .card-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.card-info > .card-rating > img {
    width: 2.5rem;
}

.card-overview {
    grid-row: 5;
    overflow-y: auto;
}

.card-buttons {
    grid-row: 6;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
}

.card-buttons > .like {
    border-radius: 0px 8px 8px 0px;
    background-color: rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.card-buttons > .dislike {
    border-radius: 8px 0px 0px 8px;
    background-color: rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.card-buttons > .begin {
    grid-column: 1 / span 2;
    border-radius: 8px 8px 8px 8px;
    background-color: rgba(255, 255, 255, 0.12);
    padding: 10px 10px;
    font-size: 20px;
    text-align: center;
    cursor: pointer;
}

.card-buttons > div:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

.card.first {
    background: var(--gradient-filur-reverse)
}

.card.first > .instructions {
    grid-row: 2 / span 4;
    text-align: center;
    font-size: 18px;
}

.card.first > .instructions > p:last-child{
    color: rgb(0, 0, 0);
}

.card-overview {
    overflow-y: auto;
}

.tab {
    overflow: hidden;
    user-select: none;
}

.tab .tablinks {
    float: left;
    outline: none;
    cursor: pointer;
    padding: 1rem 1rem;
    transition: 0.3s;
    font-size: 17px;
    margin-right: .5rem;
    border-bottom: 5px solid transparent;
    border-radius: 0.3rem;
}

.tab .tablinks:hover {
    background-color: #f5eded9c;
}

.tab .tablinks.active {
    border-bottom: 5px solid #d72323;
}

.match-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tabcontent {
    display: none;
    border-top: none;
}

.fas.fa-star {
    color: yellow;
}

#match-notification {
    display: none;
    float: left;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    border-radius: 1.5rem 0.5rem 0.5rem 1.5rem;
    background: var(--gradient-green-blue);
}

/* ________________________________________________________________________________________ */
/* loading SPINNER styling + animation */

.spinner-container {
    display: grid;
    justify-content: center;
    align-items: center;
}

.spinner {
    opacity: 0;
    width: 30px;
}

.spinner.enabled {
    opacity: 1;
    animation: spinner .6s linear infinite;
}

@keyframes spinner {
    to {transform: rotate(360deg);}
}

/* ________________________________________________________________________________________ */
/* LOGIN & REGISTER form styling */

.form-container {
    display: grid;
    text-align: center;
    padding-top: 5rem;
}

.form-group {
    display: grid;
    text-align: center;
    padding: 1rem 5rem 0 5rem;
}

.form-group > input{
    border-radius: 0.5rem;
    padding: 0.7rem;
    font-size: 1em;
}

.error-label {
    opacity: 0;
    text-align: left;
    color: rgb(215, 35, 35);
    font-size: .8rem;
}

.submit-button {
    justify-self: center;
    width: 15rem;
}

.failed-attempt {
    opacity: 0;
    color: rgb(215, 35, 35);
}

.show {
    opacity: 1;
    transition: opacity 0.1s ease-in-out;
}

/* ________________________________________________________________________________________ */
/* TOASTR styling */

#toast-container {
    margin-top: 4rem;
    pad: 10px;
}

#toast-container > .toast.toast-info {
    background-image: none !important;
    background: linear-gradient(202deg, rgba(18,60,87,1) 0%, rgba(215,100,100,1) 100%) !important;
    opacity: 1;
    padding: 15px 25px;
}

#toast-container > .toast-success {
    background-image: none !important;
    background: var(--gradient-green-blue) !important;
    opacity: 1;
    padding: 15px 25px;
}

.toast-message {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr 4fr;
    column-gap: 10px;
}

.toast-text {
    grid-column: 2;
    white-space: nowrap;
    overflow-x: hidden;
}

.toast-icon{
    grid-column: 1;
    align-items: center;
    justify-content: center;
}

.toast-icon > .success-icon {
    content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==");
    width: 25px;
    height: 25px;
}

.toast-icon > .copy-icon {
    content: url("../img/clone-solid-24x24.png");
    width: 25px;
    height: 25px;
}

/* ________________________________________________________________________________________ */
/* PREFERENCES styling */

.collapsed {
    padding: 0.5rem 2rem;
    max-height: 3.5rem;
    font-size: 0.8rem;
}

#media-preferences {
    display: grid;
    grid-auto-flow: row;
    justify-content: center;
    justify-items: center;
}

.media_preference {
    color: var(--color-yellow-highlight);
    display: flex;
    align-items: center;
    column-gap: 1rem;
    background-color: rgba(255, 255, 255, 0.12);
    width: max-content;
    padding: 0 1rem;
    margin: 1rem 0;
    border-radius: 1rem;
}

.media_preference i {
    color: var(--color-white-alpha-36);
}

#liked-genres-container {
    display: flex;
    column-gap: .5rem;
    row-gap: .5rem;
    flex-wrap: wrap;
}

.genre-preference {
    display: flex;
    column-gap: 0.5rem;
    padding: 0 1rem;
    background-color: var(--color-white-alpha-12);
    border-radius: 1rem;
    align-items: center;
}

.genre-count {
    margin: 0;
    padding: .5rem;
    background-color: var(--color-white-alpha-6);
    border-radius: .5rem;
}

.request-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ________________________________________________________________________________________ */
/* MEDIA QUERIES */


@media screen and (max-height: 500px){
    footer{
        opacity: 0;
        transition: opacity .5s ease-in-out;
    }
}

@media screen and (max-width: 1031px){
    footer > .footer-content > .column > a {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media screen and (max-width: 540px){
    
    header {
        display: flex;
        justify-content: center;
        background: rgb(255, 255, 255, 0.12);
    }

    nav {
        flex-direction: column;
    }

    .nav-section {
        justify-content: flex-end;
    }

    .nav-item {
        padding: 0;
    }

    .nav-item > h3 {
        margin: 0 1vw;
    }

    #logo-small {
        width: 2rem;
    }

    main {
        background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 35%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 3% 0 3%;
    }
    
    .grid-row title.background {
        display: none;
    }

    .session-link {
        grid-column-gap: .5rem;
    }

    p {
        font-size: .95rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1rem;
        margin: 0.5em 0 0.5em 0;
    }

    h3 {
        font-size: .9em;
        margin: 0.5em 0 0.5em 0;
    }

    .session-link i {
        font-size: .8rem;
    }

    .row-description.container {
        max-width: 80%;
    }

    .filters-container {
        display: flex;
        flex-direction: column;
        row-gap: .5rem;
        max-width: 60%;
    }

    .modal #closeFilterBtn {
        top: 0;
    }

    .modal-content {
        margin: 0 5vw 10vh 5vw;
    }

    .modal-content .filter-row label img {
        width: 1.5em;
    }

    #filter-rows-content {
        grid-auto-flow: row;
        grid-auto-columns: max-content;
    }

    .modal-content .list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(calc(10% + 7.5rem), 1fr));
    }

    .tab .tablinks {
        padding: .5rem 1rem;
    }

    .card {
        padding: 3%;

    }
    
    .card-providers {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        direction: rtl;
        grid-template-rows: max-content;
        gap: .2rem;
    }

    .card-info {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    footer > .footer-content {
        width: 80%;
        column-gap: .5rem;
    }

    .form-container {
        padding-top: 0;
        justify-content: unset;
    }

    .form-group {
        padding: 1rem 0 0 0;
    }

}