#container {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(280px, .92fr) minmax(0, 1.28fr);
    grid-template-areas: "top1 top2" "esito bottom";
    align-items: stretch
}

#top1,
#top2,
#esito,
#bottom {
    padding: 14px;
    border-radius: var(--ui-radius-sm);
    background: color-mix(in srgb, var(--mc-panel) 94%, transparent);
    box-shadow: var(--ui-shadow-strong)
}

#esito,
#bottom {
    display: grid;
    gap: 10px;
    align-content: start
}

#esito h4,
#bottom h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1
}

.section-row {
    display: flex;
    gap: 12px
}

.section-row>.section-icon {
    align-self: flex-start
}

.section-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0
}

#top1 h2,
#top2 h2 {
    margin: 0 0 12px;
    font-size: 24px;
    border-bottom: 1px solid var(--mc-hover-border);
    padding: 8px
}

.section-icon {
    width: 24px;
    height: 24px;
    vertical-align: -4px;
    margin-right: 8px;
    margin-top: 16px;
    flex-shrink: 0
}

.section-icon-lg {
    width: 48px;
    height: 48px;
    margin-right: 0
}

#top1,
#top2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%
}

#top1 #btnStorna,
#top2 #btnStatistiche {
    margin-top: auto
}

#top1 {
    grid-area: top1
}

#top2 {
    grid-area: top2
}

#esito {
    grid-area: esito
}

#bottom {
    grid-area: bottom
}

#top2,
#bottom {
    overflow: hidden
}

#esito {
    background: color-mix(in srgb, var(--mc-panel) 94%, transparent)
}

#bottom {
    max-height: 80vh;
    min-height: 0;
    display: flex;
    flex-direction: column
}

#bottom .section-row {
    flex: 1;
    min-height: 0
}

#bottom .section-col {
    flex: 1;
    min-height: 0;
    padding-top: 16px
}

#esito .section-col {
    padding-top: 16px
}

#esitoStornoContent,
#results {
    min-height: 46px
}

#results {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border-radius: 12px;
    padding-right: 6px
}

#esitoStornoContent p,
#results p {
    margin: 0
}

@media (orientation: portrait) and (max-width:1100px) {
    #container {
        grid-template-columns: 1fr;
        grid-template-areas: "top1" "esito" "top2" "bottom"
    }

    #bottom {
        max-height: none
    }

    #results {
        max-height: none
    }
}