@import "global.css";

body {
    box-sizing: border-box;
}

h1 {
    line-height: 1.5;
}

.main-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 2vw;
    padding: 2vw;
}

.main-box, .products-box {
    background-color: var(--md-sys-color-surface);
    border-radius: 1.1rem;
    border: max(0.1rem, 0.1vw) solid var(--md-sys-color-secondary);
    padding: 2vw;
    box-shadow: 0 calc(0.2em * 1vw) calc(4em * 1vw) calc(0.4em * 1vw) rgba(0, 0, 0, 0.25);
    margin-top: 2vh;
    flex: 1 1 48%;
}

.products-box {
    min-width: 48%;
}

input[type="file"]::file-selector-button {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    padding: 0.5em 2%;
    border-radius: 0.4em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #004d00; /* Darker green background on hover */
}



.attribute {
    margin: 2%;
}

label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

search {
    display: flex;
}

search input[type="text"] {
    text-align: center;
    padding: calc(.375rem * 0.5vw) calc(.75rem * 0.5vw) calc(.375rem * 0.5vw) calc(40px * 0.5vw);
}

.center {
    margin: 3vh auto auto;
    text-align: center;
}

input[type="text"] {
    width: calc(98% - 2vw);
    padding: 2%;
    margin-bottom: 10%;
    border: min(1vw, 0.1em) solid var(--md-sys-color-primary);
    border-radius: 0.4em;
    background-color: var(--md-sys-color-on-primary);
    color: var(--md-sys-color-on-background);
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--md-sys-color-secondary-fixed-dim);
    outline: none;
    box-shadow: rgba(3, 102, 214, 0.3) 0 0 0 0.15em;
}

button {
    display: block;
    min-width: 100%;
    font-size: 1.1em;
    color: var(--md-sys-color-on-primary);
    background-color: var(--md-sys-color-primary);
    cursor: pointer;
    text-align: center;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.foodBox {
    border-radius: 0.5rem;
    box-shadow: rgba(0, 0, 0, 0.24) 0 min(3px, 1vw) 8px;
    padding: 2vw;
    margin: 3vh 0 2vh;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    background-color: var(--md-sys-color-primary-container);
}

.foodImage {
    object-fit: scale-down;
    max-height: 20em;
    max-width: 50%;
}

input.radar-autocomplete-input {
    width: 100%;
    margin: auto;
}

#autocomplete {
    padding-bottom: 0;
}

textarea {
    padding: 2%;
    line-height: 1.8em;
    color: var(--md-sys-color-on-background);
    vertical-align: middle;
    background-color: var(--md-sys-color-on-primary);
    background-repeat: no-repeat;
    background-position: right 0.5em center;
    border: 1% solid var(--md-sys-color-primary);
    border-radius: 0.4em;
    outline: none;
    box-shadow: rgba(225, 228, 232, 0.2) 0 min(2px, 1vw) 0 0 inset;

    :focus {
        border-color: var(--md-sys-color-secondary-fixed-dim);;
        outline: none;
        box-shadow: rgba(3, 102, 214, 0.3) 0 0 0 0.2em;
    }

    min-width: 100%;
    margin: auto auto 2vh auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

@media screen and (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }

    .foodImage {
        margin-left: 25%;
    }

    button.modify {
        max-width: 80%;
    }

    .main-box, products-box {
        margin-left: auto;
        margin-right: auto;
    }
}