html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

/* Flex container for sidebar & map */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar on the left */
#sidebar {
    flex: 0 0 280px;
    padding: 1rem;
    background: #f7f7f7;
    border-right: 1px solid #ddd;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

#sidebar input,
#sidebar button {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    font-size: 1rem;
    box-sizing: border-box;
}

.btn-refresh {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background: #4aa3df;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-refresh:hover {
    background: #3e93c8;
}

button.secondary {
    background: #eee;
    margin-top: 0.5rem;
}

.tip {
    font-size: 0.9rem;
    color: #555;
    background: #fff8d9;
    padding: 0.75rem;
    border-left: 4px solid #ffcf33;
    border-radius: 4px;
}

.summary {
    margin-top: 1rem;
    padding: 1rem;
    background: #eef6ff;
    border-left: 4px solid #3399ff;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Price-based cluster colours */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster div {
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    border-radius: 50%;
    border: 3px solid #fff;
    text-align: center;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    line-height: 34px;
}

/* Cheaper clusters */
.marker-cluster-low div {
    background-color: rgba(76, 175, 80, 0.8);   /* green */
    color: #fff;
}

/* Mid-range clusters */
.marker-cluster-mid div {
    background-color: rgba(255, 193, 7, 0.9);   /* amber */
    color: #333;
}

/* Expensive clusters */
.marker-cluster-high div {
    background-color: rgba(244, 67, 54, 0.9);   /* red */
    color: #fff;
}

/* Standalone property markers (coloured by price) */
.price-marker {
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}

.price-marker-low {
    background-color: #4caf50;  /* green */
}

.price-marker-mid {
    background-color: #ffc107;  /* amber */
}

.price-marker-high {
    background-color: #f44336;  /* red */
}

.price-legend {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f4ff;
    border-radius: 4px;
    font-size: 0.9rem;
}

.legend-low  { background-color: rgba(76, 175, 80, 0.9);  }
.legend-mid  { background-color: rgba(255, 193, 7, 0.9);  }
.legend-high { background-color: rgba(244, 67, 54, 0.9);  }

/* Align legend dots with Bootstrap labels */
.amenity-item.form-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* tiny colour dots beside labels */
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/*  colour palette (distinct from cluster markers) */
.legend-education,
.amenity-education {
    background-color: #7b1fa2; /* purple */
}

.legend-parks,
.amenity-parks {
    background-color: #c871c2ff; /* teal */
}

.legend-transport,
.amenity-transport {
    background-color: #455a64; /* slate grey */
}

/* Map container takes rest of width from sidebar out */
#map {
    flex: 1 1 auto;
    height: 100%;
    min-width: 0;
}

.container,
.container-fluid,
.row {
    margin: 0;
    padding: 0;
}

.leaflet-container {
    width: 100%;
    height: 100%;
}