/* -------------------------------------------------------------------------- */
/*                                  Main                                      */
/* -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0 auto;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    scroll-behavior: smooth;
    background-color: #3f51b52b;
}

button, #submit, #submitUpdate {
    padding: 0.5em;
    border: none;
    border-radius: 0.5em;
    color: aliceblue;
    cursor: pointer;
    transition: all 0.5s ease-out;
    font-weight: bolder;
    text-transform: uppercase;
}

button:hover, #submit:hover, #submitUpdate:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

/* -------------------------------------------------------------------------- */
/*                                    Main                                    */
/* -------------------------------------------------------------------------- */

#loader {
    font-size: 1.5rem;
    color: #371044;
    border-radius: 0.5em;
}

#loader img {
    position: relative;
    top: 10px;
    width: 35px;
}

header {
    background-size: cover;
    background-position: center;
    z-index: -2;
    text-align: center;
    background-color: aliceblue;
}

header>img {
    width: 130px;
}


header h1 {
    opacity: 1;
    color: rgb(224, 224, 224);
}

.pageWrapper {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 2em;
    position: relative;
    perspective: 1000px;
    justify-content: center;
    align-content: center;
    align-items: center;
}



/* -------------------------------------------------------------------------- */
/*                                    Cards                                   */
/* -------------------------------------------------------------------------- */



.cardsWrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 1em
}

.card {
    position: relative;
    width: 200px;
    background: rgb(20, 18, 20);
    max-height: 400px;
    text-align: center;
    border-radius: 1em;
    margin: 1em;
    color: aliceblue;
    box-shadow: 10px 10px 44px -10px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow: 10px 10px 44px -10px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 10px 10px 44px -10px rgba(0, 0, 0, 0.75);
    cursor: pointer;
    transition: all 0.8s ease-out;

}

.card:hover {
    transform: scale(1.1);
}

.card h3 {
    margin: 1em auto;
}

.card p {
    margin-bottom: 2em;
}

.cardImg {
    max-width: 100%;
    border-radius: 1em;
}

.addElCard {
    background: rgb(56, 35, 60);
    background: radial-gradient(circle, rgba(56, 35, 60, 1) 0%, rgba(3, 3, 26, 1) 72%);
    color: aliceblue;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    padding: 1em;
    line-height: 1.5em;

}


/* -------------------------------------------------------------------------- */
/*                                    Modal                                   */
/* -------------------------------------------------------------------------- */

#overlay {
    background-color: rgba(0, 0, 0, 0.857);
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: none;
    cursor: pointer;

}

.visible {
    display: flex !important;
}

.modal {
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 3px rgb(3, 3, 26);
    position: fixed;
    gap: 5px;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    background-color: white;
    text-align: left;
    border-radius: 1em;
    z-index: 150;
    height: auto;
    max-height: 100%;
    min-height: 420px;    width: 75%;
}

.modal h2 {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 1em;
}

.modal h3 {
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal p {
    font-size: 0.8rem;
    margin: 1em;
    padding: 0;
}

.modal .modalImage {
    width: 100%;
    object-fit: cover;
    object-position: 50% 10%;
    height: 150px;
    border-radius: 1em 1em 0 0;
}

.actions {
    margin-left: 10px;
    font-size: 0.8rem;
}

.deleteCardBtn {
    background-color: brown;
}

.updateCardBtn {
    background-color: green;
}

/* -------------------------------------------------------------------------- */
/*                              Update Form Modal                             */
/* -------------------------------------------------------------------------- */

.modal.updateFormModal {
    flex-direction: column;
    text-align: center;
    background-color: #dee1f2;

}

.modal .checkItem>label {
    display: inline-block;
}

.checkItem {
    display: inline-flex;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    align-content: flex-end;
    justify-content: space-between;
}

.modal fieldset {
    display: flex;
    flex-direction: column;
    border: none;
}

#submitUpdate {
    background-color: black;
    margin: 1em;
}


/* -------------------------------------------------------------------------- */
/*                                    Form                                    */
/* -------------------------------------------------------------------------- */

form {
    padding: 2em 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    width: 90%;
    align-items: center;
    max-width: 1000px;
    text-align: center;
    border: 3px solid rgb(3 3 26);
    border-radius: 1em;
    max-width: 600px;
    display: none;
    z-index: 200;
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    background-color: #dee1f2;
}

input[type="text"] {
    border: none;
    padding: 2px;
    border-radius: 5px;
}

.inputGroup {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

label {
    display: block;
    line-height: 20px;
}

fieldset label {
    display: inline-block;
}

#submit, .closeFormBtn {
    padding: 0.8em 1em;
    margin: 1em auto;
    border-radius: 0.5em;
    background-color: rgb(3 3 26);
    border: none;
    color: aliceblue;
}

.closeFormBtn {
    background-color: brown;
}

.checkboxGroup {
    width: 80%;
    margin: 10px auto;
}



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

@media (min-width: 425px) {

    .modal {
        height: 80%;
    }

    input[type="text"] {
        width: 100%;
    }

    .modal fieldset {
        flex-flow: row wrap;
        border: 1px solid black;
        padding: 1.5em;
    }

    .checkItem {
        display: inline-flex;
        flex-flow: row-reverse wrap;
        align-items: baseline;
        justify-content: flex-end;
        width: 49%;
    }

    .checkItem label {
        margin-left: 5px;
    }

    #submitUpdate {
        margin: 1em auto;
        padding: 0.8em;
    }
}

@media (min-width:550px) {
    .modal h2 {
        font-size: 2rem;
    }

    label {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .actions {
        text-align: left;
        margin-left: 1em;
        margin-bottom: 2em;
        font-size: 1rem;
    }

    form {
        gap: 15px;
    }

    .inputGroup {
        gap: 20px
    }

    .modal {
        flex-direction: row;
        width: 700px;
        height: 350px;
    }

    .modal p {
        font-size: 1rem;
        line-height: 1.1em;
    }

    .modal h3 {
        font-size: 2rem;
    }

    .modal .modalImage {
        width: 100%;
        object-fit: cover;
        height: 100%;
        border-radius: 1em 0 0 1em;
        justify-self: flex-start;
    }

    .closeBtn {
        top: 10px;
        right: 10px;
    }

    .wrapper {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-content: center;
        position: relative;
        perspective: 1000px;
        align-items: stretch;
    }

    .checkboxGroup {
        width: 90%;
        margin: 10px auto 0 auto;
    }

}