/* ==============================================
   BASE STYLES
   ============================================== */

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

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* ==============================================
   LAYOUT & CONTAINERS
   ============================================== */

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.container {
    width: 100% !important;
    padding: 0 !important;
}

/* Card Content */
.card-content {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* ==============================================
   NAVIGATION STYLES
   ============================================== */

/* Brand Container */
.brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 1rem;
}

.brand-logo {
    position: static !important;
    float: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0;
    align-self: flex-start;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    padding-bottom: 20px;
    line-height: 0.5;
}

/* Navigation Wrapper */
.nav-wrapper .right li {
    margin-right: 1rem; /* decrease this to move it left, or set to 0 */
}

.nav-wrapper .right {
    margin-right: 0.5rem; /* reduce or adjust as needed */
}

.nav-wrapper a:hover,
.nav-wrapper a:focus {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Navigation Icons */
.nav-icon {
    margin-right: 0 !important; /* remove any extra right margin */
    font-size: 30px !important;
    cursor: pointer !important;
    transition: color 0.3s !important;
}

/* ==============================================
   MAP STYLES
   ============================================== */

/* Main Maps */
#map0, #map1, #map2, #map3, #map4 {
    aspect-ratio: 4/3 !important;
    width: 100% !important;
    height: auto !important;
}

/* Map Containers */
.main-map-card {
    max-width: none !important;
}

.mini-map-container {
    height: auto !important;
    flex: 0 0 50% !important;
}

.main-map-card .card-content,
.mini-map-container .card-content {
    height: auto !important;
    padding: 10px !important;
}

/* Map Titles */
.map-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ==============================================
   LEGEND STYLES
   ============================================== */

.legend-title {
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

/* Categorical Legends */
.legend-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legend-category {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Continuous Legends */
.legend-gradient {
    margin-top: 10px;
}

.gradient-bar {
    height: 16px;
    width: 100%;
    border-radius: 3px;
    margin-bottom: 5px;
}

.gradient-labels {
    display: flex;
    justify-content: space-between;
    position: relative;
    height: 20px;
}

.gradient-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 12px;
}

.legend-note {
    font-style: italic;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

/* ==============================================
   FORM CONTROLS & INPUT STYLES
   ============================================== */

/* Input Containers */
.input-container {
    position: relative;
    width: 100%;
}

.map-variable-container .input-container {
    margin-bottom: 5px;
}

.input-field {
    padding-top: 5px;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    /* or whatever width */
}







.pins-list {
    max-height: 100px;
    overflow-y: auto;
}

.pin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    margin: 2px 0;
    background-color: #e3f2fd;
    border-radius: 4px;
    font-size: 12px;
}

.pin-address {
    flex: 1;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pin-coordinates {
    font-size: 10px;
    color: #666;
    margin-right: 8px;
}

.pin-remove {
    cursor: pointer;
    color: #f44336;
    font-weight: bold;
    font-size: 14px;
}

.pin-remove:hover {
    color: #d32f2f;
}

@media only screen and (max-width: 992px) {
    .col.l2 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .button-group .btn {
        margin-bottom: 5px;
    }
}




#address-search {
    width: 100%;
    padding-right: 40px;
    /* space for the button */
    box-sizing: border-box;
}

.search-wrapper #search-button {
    position: absolute !important;
    right: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 18px !important;
    padding: 0 8px !important;
    color: #333 !important;
    height: auto !important;
    line-height: normal !important;
    text-transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
}

.search-wrapper #search-button:hover,
.search-wrapper #search-button:focus {
    color: #007bff !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Disabled Controls */
select:disabled,
input:disabled {
    color: #9e9e9e !important;
    background-color: #f5f5f5 !important;
    border-bottom: 0.5px solid #e0e0e0 !important;
    cursor: not-allowed;
}

.input-field select:disabled+label,
.input-field input:disabled+label {
    color: #bdbdbd !important;
}

.input-field.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.mini-map-controls.disabled {
    opacity: 0.6;
    position: relative;
}

.mini-map-controls.disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* ==============================================
   AUTOCOMPLETE STYLES
   ============================================== */

.autocomplete-list,
#map-autocomplete-list,
#autocomplete-list {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    width: 100%;
    z-index: 10000 !important;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background-color: #f1f1f1;
}

/* ==============================================
   CHIP STYLES
   ============================================== */

/* Property Chips */
.property-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    margin: 3px;
    background-color: #e0e0e0;
    border-radius: 16px;
    font-size: 14px;
}

.property-remove {
    margin-left: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Dataset Chips */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* space between chips */
}

.chip {
    flex: 1 1 120px;  /* grow and shrink, start at 120px */
    max-width: 25%;   /* or adjust to number of chips per row */
    min-width: 150px; /* don't get smaller than 120px */
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: center;
    height: auto !important;
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.dataset-remove {
    margin-left: 6px;
    font-weight: bold;
}

/* ==============================================
   TOOLTIP STYLES
   ============================================== */

.material-tooltip {
    max-width: 200px !important;
    white-space: normal !important;
    text-align: center;
    transform: translateX(0) !important; /* Prevent odd offsets */
}

/* ==============================================
   RESPONSIVE STYLES
   ============================================== */

@media only screen and (max-width: 992px) {
    .brand-logo {
        position: static !important;
        transform: none !important;
        height: auto !important;
        line-height: normal !important;
    }
}


/* ==============================================
   EXPORT
   ============================================== */

input[type="checkbox"].filled-in:checked + span:after {
    background-color: #0277bd !important;
    border-color: #0277bd !important;
}

input[type="checkbox"].filled-in:focus:not(:checked) + span:before {
    border-color: #0277bd !important;
}