.home {
    font-size: 1.3em;
    margin: auto;
    width: 50%;

    border: 3px solid lightgrey;
    border-radius: 10px;
    padding-bottom: 1em;
    padding-left: 1em;
    padding-right: 1em;

    h1, h2, footer {
        text-align: center;
    }
}

html {
    font-family: sans-serif;
}

main.game {
    display: flex;
    flex-direction: column;
    height: 99dvh;
}

.matchup-heading {
    text-align: center;

    h2, h3 {
        margin: .1em;
    }
}

/* Side-by-side matchup */
#matchup {
    flex-grow: 1;
    display: flex;
    gap: 0.5em;
    opacity: 1;
    transition: opacity 0.15s ease-out;
}

#matchup.htmx-added {
    opacity: 0;
}

#matchup.htmx-swapping {
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.dish {
    display: block;
    flex: 1 1 0;
    border: 5px solid grey;
    background-size: cover;
    background-position: center center;
    position: relative;
}

@media (max-aspect-ratio: 1/1) {
    .matchup {
        flex-direction: column;
    }
}

.header, .footer {
    background-color: #000000bf;
    color: #fff;
}

.header {
    padding: .2em .5em;
    font-size: 1.2em;
}

.dish:hover {
    border-color: yellow;
    cursor: pointer;
}

.location {
    float: right;
}

.expand-icon {
    height: 2em;
    margin-left: .5em;
    filter: invert(100%);
}

.expand-icon:hover {
    transform: scale(1.5);
}

.result {
    display: none;
}

noscript {
    display: block;
    text-align: center;
    padding: 1em;
    border-radius: 5px;
    border: 5px solid red;
    background-color: lightyellow;
    color: black;
    margin: 1em;
}

#matchup.display-results .result {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    font-size: 3em;
    transform: translate(-50%, -50%);
    text-align: center;
}

#matchup.display-results .dish {
    transition: all 0.2s ease-out;
}

#matchup.display-results .dish-green {
    background-color: darkgreen;
    background-blend-mode: multiply;
}

#matchup.display-results .dish-red {
    background-color: darkred;
    background-blend-mode: multiply;
}

.footer {
    display: flex;
    gap: .2em;
    justify-content: space-between;
    align-items: center;
    bottom: 0;
    position: absolute;
    width: 100%;
    h3, h4 {
        margin: .2em .5em;
    }    
}

/* https://www.w3schools.com/howto/howto_css_modal_images.asp */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal:hover {
    cursor: default;
}

.modal-content {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    max-height: 90%;
    max-width: 90%;
}
