/*The default Modal from htmx docs */
#modal {
    /* Underlay covers entire screen. */
    position: fixed;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;

    /* Flexbox centers the .modal-content vertically and horizontally */
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Animate when opening */
    animation-name: fadeIn;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

#modal > .modal-underlay {
    /* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
    position: absolute;
    z-index: -1;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
}

#modal > .modal-content {
    /* Position visible dialog near the top of the window */
    margin-top: 10vh;

    /* Sizing for visible dialog */
    width: 80%;
    max-width: 600px;

    /* Display properties for visible dialog*/
    border: solid 1px #999;

    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
    background-color: white;
    padding: 20px;

    /* Animate when opening */
    animation-name: zoomIn;
    animation-duration: 150ms;
    animation-timing-function: ease;

    position: relative;
}

#modal.closing {
    /* Animate when closing */
    animation-name: fadeOut;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

#modal.closing > .modal-content {
    /* Animate when closing */
    animation-name: zoomOut;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

/* The design for the add modal. */

.modal-form-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
    margin-left: 5%;
}

.add-label {
    color: var(--hrdc-theme-teal);
    font-size: 24px;
    font-family: 'Gotham Bold';
    text-align: center;
}

label, th.modal-label {
    color: var(--hrdc-theme-teal);
    font-size: 12px;
    font-family: 'Gotham Book';
    font-weight: bold;
    text-align: left;
}

input#product_name,
input#inventory,
input#ideal_stock,
input[data-field="name"],
input[data-field="multiplier"],
input[data-field="price"],
input[data-field="count"]
{
    color: #ffffff;
    border-color: var(--hrdc-theme-teal);
    border-radius: 5px;
    font-family: 'Gotham Book';
    text-indent: 5px;
    color: var(--hrdc-theme-teal);
    box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.14) inset;
    display: grid;
    padding: 0.7em 0.7em;
}

input#donation {
    color: #f5f5f5;
    border-color: var(--hrdc-theme-teal);
    border-radius: 5px;
    box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.14) inset;
    transform: scale(1.5);
    position: relative;
}

input#donation:hover {
    cursor: pointer;
}

.add-category-id {
    background-color: #ffffff;
    border-color: var(--hrdc-theme-teal);
    border-radius: 5px;
    font-family: 'Gotham Book';
    color: var(--hrdc-theme-teal);
    box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.14) inset;
    display: grid;
    padding: 1em 3.3em;
}

button#add-product-label, button#new_unit {
    background-color: var(--hrdc-theme-teal);
    border: none;
    color: white;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Gotham Book';
    padding: 1rem 1rem;
}

button.btn-danger, button.product-danger-button {
    background-color: #ffffff;
    border-style: none;
}

.close-icon {
    width: 2rem;
}

.close-icon:active {
    filter: brightness(0) invert(1);
}

button#add-product-label:hover, button#new_unit:hover {
    background-color: var(--hrdc-theme-green-yellow);
    border: none;
    color: white;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Gotham Book';
    display: grid;
    padding: 1rem 1rem;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    margin-right: 5%;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes zoomOut {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.9);
    }
}