* {
    box-sizing: border-box;
}

:root {
    --color-primary: #d72a1b;

    --color-background-dark: #1f1f1f;
    --color-background-light: #e0e0e0;

    --cursor-pointer: url('../img/cursor-pointer.png') 22 0, auto;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Verdana, serif;
    color: #ffffff;

    background-color: var(--color-background-dark);

    margin: 0;

    cursor: url('../img/cursor.png'), auto;
}

h1 {
    margin: 0;
}

a {
    cursor: var(--cursor-pointer);
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form h1 {
    font-family: Verdana, serif;
    font-size: 1.5rem;
}

form a {
    font-weight: bold;
    text-decoration: none;
    color: var(--color-background-light);
}

.form-row-1 {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;

    width: 100%;
}

.form-row-multiple {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
input[type="password"],
input[type="url"],
select,
textarea {
    font-size: 0.875rem;

    background-color: var(--color-background-light);
    color: var(--color-background-dark);
    border: 2px solid #e3e3e3;
    border-radius: 25px;
    outline: none;

    transition: box-shadow 0.3s;

    padding: 10px 15px;

    cursor: var(--cursor-pointer);
}

input[type="file"] {
    padding: 7.8px 15px;
}

input::file-selector-button {
    font-size: 0.875rem;

    background-color: var(--color-background-light);
    color: var(--color-background-dark);
    border: 2px solid #e3e3e3;
    border-radius: 25px;
    outline: none;
}

input:not([type="radio"], [type="checkbox"]):focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 3px 0 inset rgba(0, 0, 0, 0.25);
}

form button {
    all: unset;
    font-weight: bold;
    text-align: center;
    color: var(--color-background-light);

    background-color: var(--color-primary);
    border-radius: 25px;

    transition: background-color 0.3s;
    cursor: var(--cursor-pointer);

    padding: 12px 24px;
}

nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;

    font-family: Verdana, serif;
    font-size: 3rem;

    height: 175px;

    padding: 25px 0;
}

/* ------------
// HOME PAGE //
------------ */

section.search {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    height: 100vh;

    margin-top: -175px;
}

.search-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    color: var(--color-background-dark);
    background-color: var(--color-background-light);
    border-radius: 50px;

    width: 50%;

    padding: 20px;
}

.search-bar form {
    width: 100%;
}

.search-bar input {
    font-size: 1.5rem;

    background-color: unset;
    outline: none;
    border: none;
    border-radius: unset;

    width: 100%;

    padding: unset;
}

.search-bar input:focus {
    box-shadow: unset;
}

.search-bar i {
    font-size: 1.5rem;
}

ul#search-results {
    position: absolute;
    top: 50%;
    left: 25%;

    width: 50%;
    background-color: var(--color-background-light);
    color: var(--color-background-dark);

    border-radius: 0 0 33px 33px;

    list-style: none;
    padding-left: 0;
}

ul#search-results li {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 0 6px;

    cursor: var(--cursor-pointer);
}

ul#search-results li:hover {
    background-color: #d0d0d0;
}

ul#search-results li:last-child {
    padding-bottom: 10px;
}

ul#search-results li:last-child:hover {
    background-color: #d0d0d0;
    border-radius: 0 0 33px 33px;
}

ul#search-results li img {
    border-radius: 10px;

    width: 50px;
    height: 50px;

    object-fit: cover;
}

::placeholder {
    color: var(--color-background-dark);
}

.grid-container {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 2rem;
    padding: 2rem;
}


.restaurant-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-grow: 1;
    border: solid 1px black;
}

.restaurant-container {
    background-color: var(--color-background-light);
    display: flex;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    gap: 10px;
    text-align: center;
    border-radius: 10px;
    color: #000;
    border: solid 2px black;
}

.restaurant-type {
    background-color: var(--color-background-dark);
    color: var(--color-background-light);
    padding: 0.6vw;
    border-radius: 25px;
}

.restaurant-type p {
    padding-left: 0;
}

/* ------------
// MENUS.PHP //
------------ */

.menus-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.menu-item {
    padding: 0 1.5rem;
    border-left: solid 5px var(--color-primary);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    display: flex;
    justify-content: space-between;
}

.menus-header {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.add-button {
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    color: var(--color-background-light);
    background-color: var(--color-primary);
}

.add-button:hover {
    transition: ease-in-out 0.15s;
    background-color: var(--color-background-light);
    color: var(--color-primary);
}

.flex-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

body.dialog-open {
    overflow: hidden;
}

.modal {
    opacity: 0;
    transition: all 0.7s ease;
    display: flex;
    visibility: hidden;
    pointer-events: none;
}

.modal[open] {
    opacity: 1;
    transition-delay: 0s;
    padding: 25px;
    visibility: visible;
    pointer-events: auto;
}

.modal-close {
    position: absolute;
    top: 1px;
    right: 1px;
    outline: none;
    appearance: none;
    color: goldenrod;
    background: none;
    border: 0;
    font-weight: bold;
    font-size: 22px;
    cursor: var(--cursor-pointer);
}

.menu-input {
    width: 200px;
    font-size: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Verdana, serif;
}

.input-bar:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.input-bar::placeholder {
    color: #aaa;
    font-style: italic;
}

/* Footer */
footer {
    font-size: 0.875rem;
    color: var(--color-background-dark);
    background-color: var(--color-background-light);

    padding: 20px 0;
}

.footer-container {
    display: flex;
    align-items: center;
    gap: 0;

    margin: 0 auto;
    max-width: 1200px;
}

footer .left-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1
}

footer img {
    width: 60px;
}

footer .right-column {
    display: flex;
    gap: 30px;
}

footer .right-column .footer-button {
    text-decoration: none;
    color: var(--color-background-dark);

    position: relative;

    transition: 0.3s;
}

footer .right-column .footer-button::after {
    content: '';
    position: absolute;
    background-color: var(--color-primary);

    height: 3px;
    left: 0;
    bottom: 0;
    width: 0;

    transition: width 0.3s;
}

footer .right-column .footer-button:hover:after {
    width: 100%;
}

.dish-item {
    position: relative;
    border-style: solid;
    border-radius: 10px;
    padding: 10px;
}

.dish-title {
    font-size: 1rem;
    text-align: center;
}

.dish-item .fa-pencil {
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: var(--cursor-pointer);
}

.dish-item .fa-trash {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: var(--cursor-pointer);
}

.dish-item img {
    margin-top: 25px;
    width: 100%;
    border-radius: 5px;
    height: 150px;
    object-fit: cover;
}

/* ------------
// DASHBOARD //
------------ */

nav.dash-nav {
    display: flex;
    flex-direction: column;
    justify-content: start;

    font-size: 1rem;

    width: 250px;
    height: unset;
    padding: 25px;
    background-color: var(--color-primary);
}

body.dashboard {
    display: flex;
    cursor: auto;
}

body.dashboard a {
    cursor: pointer;
}

body.dashboard input {
    cursor: auto;
}

.dash-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

header.top-bar {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 15px;
    color: var(--color-background-dark);
    background-color: var(--color-background-light);
    padding: 25px;
}

.dash-content {
    background-color: #f1f1f1;
    color: var(--color-background-dark);

    min-height: calc(100vh - 50px - 32px);

    padding: 25px;
}

.dash-content h1 {
    font-size: 2.75rem;
    color: var(--color-background-dark);
}

.dash-table {
    width: 100%;
}

.dash-table .user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-table .actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-nav-button {
    text-decoration: none;
    background-color: var(--color-background-light);
    color: #000;
    padding: 1.2rem;
    width: 75%;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
}

.dash-nav-button:hover {
    background-color: #FFF;
    color: #000;
    transition: ease-in-out 0.2s;
}

.top-bar {
    color: #1f1f1f;
}

.color-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20vh;
}

.color-button {
    padding: 10px;
}

/* ---------
// LOG-IN //
--------- */

/* Fullscreen */
.login {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100vw;
    height: 100vh;
}

.login form {
    align-items: center;
    justify-content: center;

    border: 1px solid #e3e3e3;
    border-radius: 10px;

    min-width: 375px;
    max-width: 600px;
    min-height: 425px;

    padding: 40px;
    margin: 0 auto;
}

.homeLink {
    text-decoration: none;
    font-size: 1rem;
    background-color: var(--color-background-light);
    padding: 0.5%;
    border-radius: 4px;
    color: var(--color-background-dark);
}

.sectionOneDetails {
    margin: 6%;
}

.sectionOneDetails h1 {
    font-size: 2rem;
    padding-top: 2%;
}

.sectionOneDetails form {
    display: block;
    margin-bottom: 3%;
}

.hoverEffect:hover {
    cursor: var(--cursor-pointer);
}

.detailButtons {
    display: flex;
    flex-direction: column;
    font-size: 3rem;
    margin-bottom: 3.5%;
    gap: 1vw;
}

#aa {
    background-color: var(--color-background-light);
    color: var(--color-background-dark);
    width: 40%;
    display: flex;
    position: absolute;
    left: 30%;
    right: 0;
    margin: auto;
    top: 34%;
    height: auto;
    padding: 5%;
    text-align: left;
    box-sizing: content-box;
}

#aa h3 {
    font-size: 2rem;
}

#menuItems div {
    display: flex;
    gap: 1.2vw;
    padding: 0;
}

#menuItems p:hover {
    cursor: pointer;
}

.detailsText {
    width: 10%;
    text-align: center;
    color: var(--color-background-dark);
    background-color: var(--color-background-light);
    border-radius: 5px;
    padding: 1%;
}

.detailsText:hover {
    cursor: var(--cursor-pointer);
}

.sectionOneDetails form {
    border: 2px solid var(--color-background-light);
    width: 30%;
    border-radius: 5px;
    padding: 5px;
}

.sectionOneDetails form div {
    padding-bottom: 4%;
}


#vegan:hover {
    cursor: var(--cursor-pointer);
}

/*Modal*/
.modal {
    opacity: 0;
    transition: all 0.7s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border: none;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 16px 22px 0 rgba(0, 0, 0, 0.6);
    background-color: var(--color-background-light);
}

.detailsTopbar {
    display: flex;
    justify-content: space-between;
}

.details-body button {
    padding: 7px;
    border: none;
    border-radius: 4px;
    cursor: var(--cursor-pointer);
    font-size: 1.5rem;
    display: block;
    width: 100%;
}

#order {
    max-width: 150px;
}


.detailButtons {
    max-width: 150px;
}

#modalTop {
    display: flex;
    flex-direction: row;
    gap: 0.5vw;
    background-color: var(--color-background-dark);
}

.modal[open] {
    opacity: 1;
    transition-delay: 0s;
}

.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

#orderDiv {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#orderDiv p {
    margin: 0;
}

#amountDiv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2vw;
}

#amountDiv button {
    background-color: var(--color-background-light);
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 5px;
    outline: none;
    appearance: none;
    color: goldenrod;
    background: none;
    border: 0;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
}

button[type=submit] {
    cursor: pointer;
}

.modal-content h1 {
    margin: 0;
    padding: 20px;
    background-color: var(--color-background-dark);
    color: white;
    text-transform: capitalize;
}

#modalContent {
    padding: 10px;
}

.modal-content img {
    width: 300px;
}

.detailModal[open] {
    padding: 0;
}

#modal-image {
    opacity: 100%;
    object-fit: cover;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#veganThing {
    color: green;
}

#vegetarianThing {
    color: blue;
}

#glutenThing {
    color: red;
}

#orderNames {
    text-decoration: none;
    font-weight: normal;
}

.details-body h1 {
    font-size: 3rem;
}

.details-body h2 {
    font-size: 2rem;
}

.details-body p {
    font-size: 1.5rem;
}

.details-body label {
    font-size: 1.5rem;
}

.details-body a {
    font-size: 1.5rem;
}

/* MEDIA QUERYS */
@media (max-width: 768px) {
    /*INDEX*/
    nav {
        flex-direction: column;
        height: auto;
    }

    .search-bar {
        min-width: 90%;
    }

    ul#search-results {
        min-width: 90%;
        top: 45vh;
        left: 5%;
    }

    .search-bar input {
        font-size: 1.3rem;
    }

    section.search {
        margin-top: -295px;
        margin-bottom: 2%;
    }

    footer {
        padding: 20px;
        max-width: 100%;
    }

    .footer-container {
        flex-direction: column;
        align-items: start;
    }

    footer .right-column {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 30px;
    }

    footer .left-column {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .grid-container {
        grid-template-columns: none;
    }

    /*DETAILS*/
    #aa {
        width: 94%;
        left: 0;
        right: 10%;
        top: 20%;
        padding: 3%;
        position: relative;
        margin-bottom: 5%;
    }

    #aa h3 {
        font-size: 1.5rem;
    }

    .sectionOneDetails form {
        width: 88%;
        padding: 10px;
        position: fixed;
        bottom: 0;
        z-index: 100;
        background-color: var(--color-background-light);
        color: var(--color-background-dark);
    }

    .sectionOneDetails form div {
        padding-bottom: 3%;
    }

    .detailButtons {
        font-size: 2rem;
        margin-bottom: 6%;
        width: 100%;
        max-width: none;
        gap: 3vw;
    }

    #focus {
        margin-top: 7vw;
    }

    .detailsText {
        width: 100%;
        font-size: 1.2rem;
    }

    .detailsContact {
        padding-bottom: 40vw;
    }

    .detailsContact p, .detailsContact a {
        font-size: 1.3rem;
    }

    .homeLink {
        text-align: center;
        display: flex;
        align-items: center;
    }
}


