@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap');

* {
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    color: #212121;

    --color: rgba(114, 114, 114, 0.15);
    background-color: #191a1a;
    background-image:
        linear-gradient(0deg, transparent 24%, var(--color) 25%, var(--color) 26%, transparent 27%,transparent 74%, var(--color) 75%, var(--color) 76%, transparent 77%,transparent),
        linear-gradient(90deg, transparent 24%, var(--color) 25%, var(--color) 26%, transparent 27%,transparent 74%, var(--color) 75%, var(--color) 76%, transparent 77%,transparent);
    background-size: 55px 55px;
}

main {
    display: grid;
    grid-template-areas:
        "title title"
        "lunch-list dinner-list"
        "navigation navigation";
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    width: 100%;
    max-width: 45em;
    padding: 1.25em 1.75em;
    background-color: white;
    border-radius: 0.75em;
}

h1, h2, h3, h4, h5, button {
    font-family: "Lora", serif;
}

h1 {
    grid-area: title;
    margin: 0;
}

button {
    background-color: transparent;
    padding: 0;
    border: 0;
    font-weight: 550;
    cursor: pointer;
}

.nav-link {
    position: absolute;
    top: 0.6em;
    right: 0.6em;
    color: white;
    font-weight: 500;
    font-size: 0.8em;
    text-decoration: none;
}

.offers-link:hover {
    text-decoration: underline;
}

.lunch-list {
    grid-area: lunch-list;
}

.dinner-list {
    grid-area: dinner-list;
}

.lunch-list, .dinner-list {
    position: relative;
    display: flex;
    flex-direction: column;
}

.hidden, .popup.hidden {
    display: none;
}

.popup {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 2.3em;
    left: 0;
    width: 100%;
    height: calc(100% - 2.5em);
    background-color: white;
}

.popup-header {
    margin: 0;
    font-weight: 550;
    font-size: 20px;
    font-family: "Inter", sans-serif;
}

.popup p {
    margin: 0.8em 0;
    font-size: 0.65em;
    font-weight: 550;
}

.popup p:empty::before {
    display: inline-block;
    content: "Inga anteckningar.";
    color: #757575;
}

.popup-back-button {
    margin-top: 0.8em;
    margin-right: auto;
    font-size: 0.65em;
}

.item-header {
    margin: 0;
    font-weight: 650;
    font-size: 1.2em;
}

.item {
    display: flex;
    flex-direction: column;
    max-width: calc(100vw / 2 - 1.75em - 1em);
    padding: 0.8em 0;
    border-bottom: 1px solid #bdbdbd;
}

.week {
    font-weight: 550;
    font-size: 0.7em;
    color: #757575;
}

.week.now {
    color: oklch(54.6% 0.245 262.881);
}

.item .name-container {
    height: 22px;
    max-height: 22px;
}

.item .name {
    font-weight: 550;
    font-size: 0.9em;
    overflow-wrap: break-word;
    white-space: normal;
    cursor: pointer;
}

.item .name:empty::before {
    display: inline-block;
    content: '-';
}

.item .body {
    display: none;
}

.navigation {
    grid-area: navigation;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.navigation button {
    font-size: 0.8em;
}

@media only screen and (max-width: 550px) {
    body {
        font-size: 22px;
    }

    .item .name-container {
        height: 27px;
        max-height: 27px;
    }
}

.offers-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4em;
}

.offers-header {
    display: block;
    width: 100%;
    max-width: 22.5em;
    margin-bottom: 0.4em;
    color: white;
}

#offers {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    padding-bottom: 2em;
}

.store {
    width: 100%;
    max-width: 45em;
    padding: 1em;
    background-color: white;
    border-radius: 0.75em;
}

.store-name {
    margin: 0;
}

.offer {
    border-bottom: 1px solid #d3d3d3;
    padding: 0.8em 0;
}

.offer .content {
    display: flex;
    gap: 0.4em;
    width: 100%;
}

.offer:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.offer h4 {
    display: block;
    padding-bottom: 0.2em;
    font-family: "Inter", sans-serif;
    font-size: 0.8em;
    margin: 0;
}

.offer .name {
    display: flex;
    align-items: flex-start;
    gap: 0.4em;
}

.offer .week-tag {
    padding: 0.3em 0.5em;
    border-radius: 0.65em;

    background-color: #424242;
    color: white;
    font-size: 0.5em;
    font-weight: 550;
}

.offer .price {
    font-size: 0.8em;
}

.offer p {
    font-size: 0.7em;
    margin-bottom: 0;
}

.offer .image-link {
    margin-left: auto;
}

.offer img {
    width: auto;
    height: 3.5em;
}
