body {
    margin: 0;
    padding: 0;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

.map-overlay {
    position: absolute;
    padding: 10px;
    font-family: Arial, sans-serif;
    top: 10px;
    left: 10px;
    z-index: 1;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.map-overlay label {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-weight: normal;
    font-size: 15px;
}

.map-overlay span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
}

#layerContent {
    position: absolute;
    top: 20px;
    left: 80px;
    width: 600px;
    background: white;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.tabs {
    display: flex;
    background: #e6f0ff;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
}

.tab.active {
    background: #ccc;
    border-bottom: 2px solid #0056b3;
}

.tab-content {
    padding: 15px;
    display: none;
    background-color: #ccc;
}

.tab-content.active {
    display: block;
}

.actions {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-size: 14px;
    color: #0056b3;
    cursor: pointer;
}

.actions span:hover {
    text-decoration: underline;
}    

.sc_catalogueColor{
    border:none;
    border-radius:0px !important;
    height: 35px !important;
    width: 250px !important;
}

.sc_catalogueColorText{
    width: 200px !important;
    height: 35px !important;
    align-content: center;
    font-size: 20px;
    color: #333;
}

.layer-toggle {
  font-family: system-ui, sans-serif;
  font-size: 14px;
}
.layer-toggle input[type="checkbox"] {
  margin-right: 6px;
}
.layer-toggle label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

#drawButton .glyphicon-remove {
    font-size: 20px;
    display: block;
    text-align: center;
    line-height: 44px;
    left: -4px;
}

#printModal{
    display:none; 
    top:20px; 
    left:80px; 
    width:1000px; 
    height:auto; 
    background:#ccc; 
    z-index:9999; 
    padding:20px; 
    position:absolute
}

#distanceDisplay{
    display: none; 
    left: 80px;
    position: relative;
    top: 195px;
    background:rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.9);
    padding:4px 8px;
    border-radius:4px;
    font-size: 15px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px;
    min-width: 100px;
    background-color: #286090;
    color: white;
    padding: 8px;
    border: 2px solid;
    width:300px;
}

.mapboxgl-ctrl-top-right {
    display: none !important;
}

/* Fish Meal legend – layout fixes */
#fishmeal-legend{
  max-width: auto;              /* room for labels */
  font-size: 13px;
  line-height: 1.4;
  padding:15px;
}

#fishmeal-legend .legend-row{
  display: flex !important;      /* override any grid/list rules */
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

#fishmeal-legend .legend-row > span{
  display: inline-block;         /* prevent odd wrapping */
  margin-bottom:0px;
}

.sc_noOfFactories{
    padding-bottom:12px;
}

#fishmeal-legend hr{
  margin: 8px 0;
  border: 0;
  border-top: 1px solid #e6e6e6;
}

/* point dots (types) */
#fishmeal-legend .dot{
  width: 11px; height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
}
#fishmeal-legend .type-a{ background:#0b5fff; margin-top: 10px; }
#fishmeal-legend .type-b{ background:#36a2eb; margin-top: 10px; }
#fishmeal-legend .type-c{ background:#ffa726; margin-top: 10px; }
#fishmeal-legend .type-d{ background:#ef5350; margin-top: 10px; }

/* green bubbles (counts) */
#fishmeal-legend .bubble{
  background:#8fddb4;
  border:2px solid #5fb686;
  border-radius:50%;
  flex: 0 0 auto;
}
#fishmeal-legend .b1{ width:10px; height:10px; }
#fishmeal-legend .b2{ width:14px; height:14px; }
#fishmeal-legend .b3{ width:18px; height:18px; }
#fishmeal-legend .b4{ width:22px; height:22px; }
#fishmeal-legend .b5{ width:26px; height:26px; }
#fishmeal-legend .b6{ width:30px; height:30px; }

/* Make number ranges stay together (1–5, 6–15, etc.) */
#fishmeal-legend .range{ white-space: nowrap; font-variant-numeric: tabular-nums; }




@media (max-width: 768px) {
  
    #map {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 100%;
    }

    .map-overlay {
      position: absolute;
      top: calc(10px + 0px);
      left: 10px;
      right: 10px;
      z-index: 1000;
      max-height: 70vh;
      overflow-y: auto;
      overflow-x: auto;
      height:800px;
    }

    #layerContent{
        position: absolute;
        top: 20px;
        left: 80px;
        width: 600px;
        background: white;
        border: 1px solid #ccc;
        box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    }

    #ownerList {
        max-height: 200px;
        overflow-y: auto;
    }

    #printModal{
        display:none; 
        top:20px; 
        left:80px; 
        width:100%; 
        height:auto; 
        background:#fff; 
        z-index:9999; 
        padding:20px; 
        position:absolute
    }
}
