.business-finder-container {
    width: 100%;
    height: 90vh;
    position: relative;
    overflow: hidden; /* Prevent scrollbars when dragging to edges */
}

div#page {
    margin: 0;
    max-width: 2500px;
}

#business-finder-map {
    width: 100%;
    height: 100%;
}

.business-finder-actions {
    visibility: hidden;
    position: absolute;
    z-index: 1000;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: move;
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 200px;
    touch-action: none; /* Prevent scrolling on touch devices while dragging */

    & h1 {
        margin: 0;
    }
}

.business-info-container {
    min-width: 35ch;
}

.business-info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

.business-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;

    & h3 {
        margin: 0;
    }
    & p {
        margin: 0;
        font-weight: 700;
    }
}

.business-info-address-container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-direction: column;
}

.business-finder-actions.dragging {
    opacity: 0.8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.business-finder-drag-handle {
    width: 24px;
    height: 24px;
    background-color: var(--accent-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    cursor: move;
}

.business-finder-drag-handle::before {
    content: "⋮⋮";
    color: var(--accent);
    font-weight: bold;
    line-height: 1;
}

.business-finder-search-button, #use-location-button {
    padding: 8px 16px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.business-finder-legend {
    position: absolute;
    top: 50%;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 15px;
    transform: translateY(-50%);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.business-finder-legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 3rem;
}

.business-finder-legend-item-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.business-finder-legend-item-text {
    font-size: 0.8rem;
    text-align: center;
    font-weight: 700;
}

.business-finder-search-button:hover, #use-location-button:hover {
    background-color: var(--accent-dark);
}

.business-finder-search-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#business-finder-search-input {
    min-width: 25ch;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#use-location-button {
    white-space: nowrap;
}

#use-location-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#clear-search-button {
    background-color: var(--contrast-3);
}

#clear-search-button:hover {
    background-color: var(--contrast-2);
}

@media (max-width: 768px) {
    .business-finder-actions {
        flex-direction: column;
        position: relative;
    }

    #business-finder-search-input,
    .business-finder-search-button,
    #use-location-button,
    #clear-search-button {
        width: 100%;
        margin: 5px 0;
    }


.business-finder-actions-header {
    display: grid;
    gap: 1em;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);

    & #business-finder-search-input {
        grid-column: 1 / 3;
        min-width: 10ch;
    }

    & #business-finder-search-input.searched {
        grid-column: 1 / 2;
    }
}

div#content {
    display: grid;
    grid-template-columns: 1fr;
}

.business-finder-actions.background-grid {
    grid-row: 2 / 3;
}

.business-finder-container {
    grid-row: 1 / 2;
    height: 75vh;
}
.business-finder-drag-handle {
    display: none;
}
}