.map-container { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 200px; } .map-box { z-index: 1; height: 100%; width: 100%; min-height: 0; flex-grow: 1; } .map-search { --searchWidth: 400px; position: absolute; z-index: 2; top: 10px; left: calc((100% - var(--searchWidth)) / 2); height: auto; width: var(--searchWidth); max-width: 90%; opacity: 0.8; transition: opacity var(--animationSpeed); input { background: inherit; } .field { background: var(--surfaceColor) !important; box-shadow: var(--boxShadow); } .dropdown { border: 0; max-height: 180px; } &:focus-within { opacity: 1; } }