html, body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

#header {
    flex-shrink: 0;
    padding-left: 20px;
}

#fullscreen-demo {
    position: relative;
    flex: 1;
    min-height: 350px;
}

#demo-map {
    height: 100%;
    margin: 0;
    padding: 0;
}

#demo-zoom {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#demo-zoom .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 26px;
    line-height: 1;
    touch-action: manipulation;
}

#demo-controls {
    position: absolute;
    bottom: 38px;
    left: 0;
    width: 100%;
    z-index: 1000;
    text-align: center;
    pointer-events: none;
    padding: 0 8px;
}

.demo-control-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

#demo-controls .btn,
#demo-zoom .btn {
    pointer-events: auto;
    background: rgba(70, 70, 70, 0.9);
    color: white;
    border-radius: 0;
}

#demo-controls .btn.raster-only {
    background: rgba(110, 110, 110, 0.7);
}

#demo-controls .btn[aria-pressed="true"],
#demo-controls .btn:hover,
#demo-zoom .btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.9);
}

#demo-controls .btn[aria-pressed="true"] {
    box-shadow: inset 0 -3px #31a4b5;
}

#demo-controls .btn:focus-visible,
#demo-zoom .btn:focus-visible {
    outline: 3px solid #31a4b5;
    outline-offset: 2px;
}

#demo-raster-hint {
    /* Reserve the note's space in both modes so the buttons stay in place. */
    visibility: hidden;
    display: inline-block;
    max-width: 100%;
    margin: 6px 0 0;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 10px;
}

@media (max-width: 767px) {
    #demo-controls {
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    #demo-controls .btn {
        padding: 6px 8px;
        font-size: 13px;
    }
}
