@font-face {
    font-family: 'Chocolates';
    src: url('/fonts/Chocolates/TT\ Chocolates\ Trial\ Regular.otf');
}

html * {
    font-family: 'Chocolates';
    color: #2a5948;
}

h1 {
    border-bottom: 4px dotted #f27457;
    width: 100%;
}

@media only screen and (max-width: 601px) {
    h1 {
        font-size: 25pt;
    }

    h2 {
        font-size: 21pt;
    }

    h3 {
        font-size: 17pt;
    }
}

body {
    background: #f2f2f2;
}

div.sticky-heading {
    position: sticky;
    top: 0;
    background-color: #f2f2f2;
    align-self: flex-start;
    background: linear-gradient(180deg, rgba(242,242,242,1) 90%, rgba(242,242,242,0) 100%);
    /* Padding, not margin, because I want more background visible below the div */
    padding-bottom: 10px;
    z-index: 100;
    margin-top: -10;
}

form.sticky-heading {
    display: inline;
}

input[type=submit], button[type=submit], a {
    border: 2px solid #d99a25;
    background-color: inherit;
    padding: 0.2em 0.4em;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition-duration: 100ms;
    border-radius: 0.5em;
    margin: 0.1em;
}

input[type=submit].destructive-button,
button[type=submit].destructive-button,
a.destructive-button {
    background-color: #c07575;
    border: 2px solid #d64040;
    color: #472428;
}

input[type=submit]:hover, button[type=submit]:hover, a:hover {
    background-color: #2a5948;
    border-color: #2a5948;
    color: #f2f2f2;
}

input[type=submit].destructive-button:hover,
button[type=submit].destructive-button:hover,
a.destructive-button:hover {
    background-color: #653238;
    border: 2px solid #653238;
}

.multiple-submit-buttons {
    display: flex;
    align-items: center;
    gap: 1em;
}

.quick-status {
    font-style: italic;
    color: #9d6556;
}

.quick-item-summary {
    font-style: italic;
    font-size: 17px;
}

.hint-text {
    font-style: italic;
    font-size: 17px;
}

.recipe-ingredient-label {
    flex-grow: 2;
}

.edit-controls {
    display: flex;
    justify-content: space-between;
}

tr:nth-child(odd) {
    background-color: #f2f2f2;
    filter: brightness(85%);
}

@media only screen and (max-width: 601px) {

    .shopping-date {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .shopping-date label {
        flex-grow: 2;
        text-wrap: nowrap;
        padding-right: 2px;
    }
}

.input-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

@media only screen and (max-width: 601px) {
    .input-line label {
        font-size: 15pt;
    }
}

.notes {
    display: flex;
    flex-direction: row;
    gap: 5px;
    width: 100%;
}

.notes-textarea {
    width: 100%;
    height: 200pt;
}

/* Hide the arrow buttons in <input type="number" /> */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide the arrow buttons in <input type="number" /> */
/* Firefox */
input[type=number] {
  appearance: textfield;
}

.proper-word {
    text-transform: capitalize;
}

.proper-word-for-status {
    text-transform: capitalize;
}


@media only screen and (min-width: 600px) {
    html {
        font-size: 15pt;
    }
    input, button {
        font-size: 15pt;
        margin: 3px;
    }
}

@media only screen and (max-width: 601px) {
    html {
        font-size: 17pt;
    }

    input, button {
        font-size: 17pt;
    }
}

/* Combined checkbox and scale input */

.check-and-scale-scale {
    margin-left: 5px;
    height: 100%;
    display: flex;
    align-items: center;
}

@media only screen and (min-width: 600px) {
    .check-and-scale-scale {
        width: 35px;
    }
}

@media only screen and (max-width: 601px) {
    .check-and-scale-scale {
        width: 100%;
    }
}

.check-and-scale-scale-text {
    margin-left: 5px;
}

@media only screen and (min-width: 600px) {
    .check-and-scale-scale-text {
        height: 14px;
    }
}

@media only screen and (max-width: 601px) {
    .check-and-scale-scale-text {
        width: 150px;
        height: 35px;
        font-size: 12pt;
    }
}

/* Fancy-ass checkbox */

.check {
    position: absolute;
    overflow: hidden;
    clip: rect(0 0 0 0);
    height: 1px;
    width: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
}

.check + label {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    height: 35px;
    color: #2a5948;
}

.check:focus + label {
    box-shadow: #2a5948;
}

@media only screen and (max-width: 601px) {
    .check + label {
        flex-grow: 2;
    }
}

.check + label::before {
    content: " ";
    display: inline-block;
    vertical-align: middle;
    margin-right: 3px;
    background-color: white;
    border-width: 1px;
    border-style: solid;
    border-color: #2a5948;
    border-radius: 4px;
    box-shadow: none;
    flex-shrink: 0;
}

@media only screen and (min-width: 600px) {
    .check + label::before {
        width: 14px;
        height: 14px;    
    }
}

@media only screen and (max-width: 601px) {
    .check + label::before {
        width: 35px;
        height: 35px;
    }
}

.check:checked + label::after {
    content: " ";
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBmaWxsPSIjZDk5YTI1IiBkPSJNMCA5NkMwIDYwLjY1IDI4LjY1IDMyIDY0IDMySDM4NEM0MTkuMyAzMiA0NDggNjAuNjUgNDQ4IDk2VjQxNkM0NDggNDUxLjMgNDE5LjMgNDgwIDM4NCA0ODBINjRDMjguNjUgNDgwIDAgNDUxLjMgMCA0MTZWOTZ6Ii8+PC9zdmc+");
    background-repeat: no-repeat;
    background-position: center center;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0px;
    left: 0px;
    top: 0px;
    text-align: center;
    background-color: transparent;
    font-size: 10px;
}

.check:checked + label.proper-word {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    color: #abbab4;
    text-decoration-color: #2a5948;
}

@media only screen and (min-width: 600px) {
    .check:checked + label::after {
        background-size: 12px 12px;
        height: 35px;
        width: 16px;
    }
}

@media only screen and (max-width: 601px) {
    .check:checked + label::after {
        background-size: 25px 25px;
        height: 35px;
        width: 37px;    
    }
}

[popover] {
    transition: opacity 0.2s, transform 0.2s, display 0.2s allow-discrete;
    transform: translateY(3rem);

    &:popover-open {
        opacity: 1;
        transform: none;

        @starting-style {
            & {
                opacity: 0;
                transform: translateY(-1rem);
            }
        }
    }
}

.popover-button-container {
    display: inline-flex
}

@media only screen and (min-width: 600px) {
    div.ingredient-edit-layout-right {
        & > h2 {
            margin-top: 0px
        }
    }

    .ingredient-edit-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ingredient-edit-layout > * {
        padding:1rem;
    }
}
