body {
    background-color: #f1f1f1;
    }

maingrid {
    position: absolute;
    display: grid;
    height: 100vh;
    margin: 0px;
    width: 100vw;
    grid-template-columns: 100vw;
    grid-template-rows: min-content 1fr min-content;
    top: 0px;
    left: 0px;
    overflow: hidden;
}

top {
    position: relative;
    display: block;
    height: min-content;
    top: 0px;
    left: 0px;
    background-color: #f1f1f1;
}

container {
    overflow-y: scroll;
    position: relative;
    display: block;
}

heading {
    display: flex;
    grid-gap: 10px;
    width: calc(100% - 40px);
    padding: 20px;
    align-items: center;
}

h3 {
    font-family: "degular-variable",sans-serif;
    font-variation-settings: 'ital' 0, 'opsz' 72, 'wght' 745;
    font-size: 42px;
    padding-top: 0.17em;
    color: #333333;
    margin-bottom: 0px;
}

i {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    width: min-content;
}

form {
    display: flex;
    grid-gap: 10px;
    width: calc(100% - 40px);
    padding: 20px;
    background-color: #f1f1f1;
}

grocery {
    display: flex;
    grid-gap: 10px;
    width: calc(100% - 80px);
    height: min-content;
    padding: 20px;
    margin: 0px 20px;
    margin-bottom: 10px;
    border-radius: 20px;
    background-color: white;
    /* justify-content: center; */
    align-items: center;
}

grocery.empty {
    background-color: transparent;
    text-align: center;
}

grocery.checked {
    opacity: 0.5;
}
grocery.checked name {
    text-decoration-line: underline;
    text-underline-offset: -40%;
    text-decoration-skip-ink: none;
    text-decoration-thickness: 3px;
}

grocery.checked .btn-edit {
    display: none;
}

grocery.checked .btn-delete {
    margin-left: auto;
}

name {
    /* font-weight: bold; */
    font-family: "inter-variable",sans-serif;
    font-variation-settings: 'wght' 700, 'slnt' 0;
    font-size: 24px;
    color: #333333;
    padding: 5px;
    width: 70%;
    white-space: pre-wrap;
    word-break: break-word;
    flex-grow: 1; /* fill space available */
}

buttons {
    margin-left: auto;
    display: flex;
    width: 70px;
}

button {
    position: relative;
    background-color: transparent;
    outline: none;
    border: none;
    font-weight: bold;
    border-radius: 10px;
    text-align: center;
    justify-content: center;
    text-decoration: none;
    display: flex;
    align-items: baseline;
    font-size: 15px;
    padding: 10px 15px;
    margin: 5px 5px 5px 0px;
    margin-right: 0px;
}

grocery.edit .btn-commit, grocery.edit .btn-cancel {
    display: flex;
}

grocery.edit .btn-edit, grocery.edit .btn-delete {
    display: none;
}

.btn-commit {
    color: rgb(87, 161, 87);
    display: none;
    display: none;
    font-size: 20px;
    height: 24px;
    padding: 8px 8px 8px 8px;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 8px;
}

.btn-cancel {
    color: #ee6765;
    display: none;
    font-size: 20px;
    height: 24px;
    padding: 8px 8px 8px 8px;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 8px;
}

.btn-clear {
    margin-left: auto;
    color: #f1f1f1;
    background-color: #333333;
    flex-grow: .5;
    height: 25px;
    align-items: center;
}

.btn-add {
    margin-left: auto;
    color: #f1f1f1;
    font-size: 16px;
    display: inline-flex;
    height: 20px;
    padding: 8px 22x 8px 22px;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #333333;
    width: 70px;
}

.btn-edit {
    color: #333333;
    display: inline-flex;
    font-size: 16px;
    height: 24px;
    padding: 8px 8px 8px 8px;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 8px;
}

.btn-delete {
    /* color: #ee6765; */
    color: rgb(87, 161, 87);
    display: inline-flex;
    font-size: 20px;
    height: 24px;
    padding: 8px 8px 8px 8px;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 8px;
}

input[type=text] {
    font-family: "instrument-sans-variable",sans-serif;
    font-variation-settings: 'wdth' 100, 'wght' 400;
    font-size: 16px;
    outline: none;
    border: none;
    border-bottom: 2px solid darkgray;
    transition: border-bottom-color 0.5s;
    border-radius: 0px;
    padding: 3px 0px;
    color: black;
    width: inherit;
    background-color: #f1f1f1;
}

input[type=text]:focus, input[type=text]:hover {
    /* transition: border-bottom-color 0.5s; */
    border-bottom: 2px solid gray;
}

grocery.edit {
    /*  */
}

grocery.edit name {
    /* border-bottom: 2px solid darkgray; */
}

.disabled {
    pointer-events:none;
    opacity: 0.3;
}

hr.new1 {
    border: 1px dashed #333333;
  }
