* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif !important;
}

#map {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.msgalert {
    margin: auto;
    top: 60px;
    z-index: 999999;
    animation: movebottom 0.6s;
}

@keyframes movebottom {
    from {
        top: -60px
    }

    to {
        top: 60px
    }
}

.submap {
    height: 250px;
}

.mapbtn {
    position: absolute;
    /* display: block; */
    border-radius: 4px;
    background-color: white;
    color: black;
    z-index: 1000;
}

.mapbtn button {
    width: 30px;
    height: 30px;
    border: solid 1px #0a4b67;
    text-align: center;
}

.removedisabled {
    background-color: #65737e;
}

.mapbtnactive {
    background-color: #009c9d;
    border-color: white;
    color: white;
}

.mapbtn:hover button {
    background-color: #009c9d;
    border-color: white;
    color: white;
}

.topmenu {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1000;
}

.topmenu a {
    text-decoration: none;
}

.ascmenu {
    background-color: #0a4b67;
    border: 1px solid white;
}

.ascmenuitem {
    border-radius: 7px;
    /* padding: 0; */
}

.ascmenuitem:hover {
    background-color: #009c9d;
}

.ascmenuitem a {
    color: white;
    width: 100%;
    display: block;
    text-align: center;
}

.btnmenu {
    text-decoration: none;
    font-size: 1.8rem;
    background-color: #009c9d;
    border: 1px solid white;
    padding: 3px;
    color: white;
}

.btnmenu:hover {
    background-color: #0a4b67;
    transition: all 0.3s ease;
}

.tablebtn {
    text-align: center;
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    width: 63px;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
    color: white;
    margin: auto;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom-style: none;
}

.movebtnup {
    bottom: 320px;
}

.resultsdiv {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 0;
    width: 100%;
    background-color: #e9edee;
    z-index: 1;
    border-radius: 8px 8px 0 0;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
}

.showresults {
    display: block;
    height: 320px;
}

.btnasc {
    background-color: #009c9d;
    color: white;
    transition: 0.3s;
    font-weight: 600;
}

.btnasc:hover {
    background-color: #0a4b67;
    color: white;
}

.btnupload {
    background-color: #e9edee;
    color: #0a4b67;
    transition: 0.3s;
    font-weight: 700;
}

.btnupload:hover {
    background-color: #c9cbcc;
}

.main-content {
    position: relative;
    min-height: 100vh;
    top: 0;
    transition: all 0.5s ease;
    width: 100%;
}

.mapcontent {
    display: flex;
    justify-content: space-between;
}

.layerlabels {
    margin-left: 10px;
}

input[type='checkbox'] {
    accent-color: #009c9d;
}

input[type='radio'] {
    accent-color: #009c9d;
}

#popcontainer {
    position: absolute;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 0 !important;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    min-width: 350px;
}

#popcontainer:after,
#popcontainer:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

#popcontainer:after {
    border-top-color: white;
    border-width: 10px;
    left: 48px;
    margin-left: -10px;
}

#popcontainer:before {
    border-top-color: #cccccc;
    border-width: 11px;
    left: 48px;
    margin-left: -11px;
}

.coordinatesbox {
    position: absolute;
    color: #333333;
    font-weight: 500;
    font-size: 11px;
    padding: 3px 5px 3px 5px;
    background-color: #ffffffc5;
    bottom: 35px;
    right: 7px;
    border-radius: 5px;
    border: 1px solid gray;
}

.scalebox {
    position: absolute;
    color: #333333;
    font-weight: 700;
    font-size: 11px;
    padding: 3px 5px 3px 5px;
    background-color: #ffffffc5;
    bottom: 60px;
    right: 7px;
    border-radius: 5px;
    border: 1px solid gray;
}

.ol-attribution {
    text-align: left;
    color: #333333;
    font-weight: 600;
    /* font-size: 11px; */
    background-color: #ffffffc5;
    bottom: 0px;
    right: 7px;
    border-radius: 5px;
    border: 1px solid gray;
}

.maptooltip {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    color: white;
    font-weight: 500;
    padding: 4px 8px;
    opacity: 0.9;
    white-space: nowrap;
    font-size: 12px;
    cursor: default;
    user-select: none;
}

.tooltip-measure {
    opacity: 1;
    font-weight: bold;
}

.tooltip-static {
    background-color: #ffcc33;
    color: black;
    border: 1px solid white;
}

.tooltip-measure:before,
.tooltip-static:before {
    border-top: 6px solid rgba(0, 0, 0, 0.5);
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    content: "";
    position: absolute;
    bottom: -6px;
    margin-left: -7px;
    left: 50%;
}

.tooltip-static:before {
    border-top-color: #ffcc33;
}

/* base (hidden) */
.legend {
    display: none;
    position: absolute;
    top: 50px;
    right: 5px;
    height: auto;
    max-height: calc(100vh - 50px - 95px);
    width: 180px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font: 0.75rem/1.2 sans-serif;
    color: #333;
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .legend {
        width: 220px;
        top: 40px;
        max-height: calc(100vh - 40px - 80px);
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .legend {
        position: fixed;
        top: 10vh;
        /* 10% down */
        left: 10px;
        /* 10px from left edge */
        right: 10px;
        /* 10px from right edge */
        max-width: 280px;
        /* cap at 280px even on larger phones */
        max-height: 80vh;
        /* 80% of viewport height */
        margin: 0 auto;
        /* center within those left/right bounds */
        transform: none;
        /* remove any previous translateX */
        font-size: 0.9rem;
        border-radius: 4px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
        padding: 0;
        /* or whatever you prefer */
    }

    /* touch‐friendly padding tweaks */
    .legend .toggle-trigger {
        padding: 10px 12px;
    }

    .legend .col-12 {
        padding: 8px 12px;
    }

    .legend-icon {
        font-size: 0.8rem;
        /* border: 1px solid black; */
    }

    .legend-text {
        font-size: 0.9rem;
    }
}


.legend-icon {
    font-size: 0.6rem;
}

/* species colors */
.color-abalone {
    color: rgb(115, 178, 255);
}

.color-bivalve {
    color: rgb(163, 255, 115);
}

.color-flatfish {
    color: rgb(168, 112, 0);
}

.color-trout {
    color: rgb(132, 0, 168);
}

.color-pangasius {
    color: rgb(168, 0, 0);
}

.color-salmon {
    color: rgb(231, 190, 203);
}
.color-farmstd {
    color: rgb(233, 237, 238);
    /* border: 1px solid black; */
    /* border-radius: 50%; */
    /* font-size: 0.5rem; */
}
.color-seaweed {
    color: rgb(0, 255, 197);
}

.color-seriola {
    color: rgb(255, 120, 26);
}

.color-shrimp {
    color: rgb(235, 235, 65);
}

.color-ssm {
    color: rgb(233, 38, 3);
}

.color-tilapia {
    color: rgb(210, 169, 241);
}

.color-tmf {
    color: rgb(255, 0, 197);
}

.color-feedmill {
    color: #4A9976;
}

.bi-plus-circle.legend-icon {
    font-size: 0.6rem;
    /* feedmill icon */
}

.color-feedmill {
    color: #4A9976;
}

#specieslegend .col-12 {
    padding-left: 0;
    padding-right: 0;
}

/* polygon for legend*/
.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid #333;
    flex-shrink: 0;
    margin-right: 6px;
}

/* line for legend*/
.legend-line {
    display: inline-block;
    width: 24px;
    height: 0;
    border-top: 3px solid;
    flex-shrink: 0;
    margin-right: 6px;
}

.legend-section .toggle-trigger {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 10px;
    margin: 4px 0;
    background-color: #e8f6f5;
    border-radius: 4px;
    color: #004d4d;
    cursor: pointer;
    user-select: none;
}

/* Hover/Focus state */
.legend-section .toggle-trigger:hover,
.legend-section .toggle-trigger:focus {
    background-color: #d0eeed;
}

/* Keep arrow aligned */
.legend-section .toggle-trigger .indicator {
    margin-left: auto;
    /* push arrow to the right */
    font-style: normal;
}


.legend.open {
    display: block;
    max-height: 400px;
    overflow-y: auto;
}

/* Legend item text */
.legend p {
    margin: 0;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Section toggle header */
.section-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    padding: 6px 8px;
    background: #f0f0f0;
    user-select: none;
}

/* Indicator (arrow) */
.section-toggle .indicator {
    margin-left: auto;
    font-style: normal;
    transition: transform 0.2s;
}

/* Content area */
.section-content {
    padding: 4px 12px 8px;
    display: block;
    transition: max-height 0.3s ease;
    overflow: hidden;
    max-height: 1000px;
    /* big enough to show all items */
}

/* When collapsed */
.section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Rotate the arrow on collapse */
.section-toggle.collapsed .indicator {
    transform: rotate(-90deg);
}

/* Individual items */
.item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.legendbtn {
    width: 100px;
    background-color: #009c9d;
    border: 1px solid white;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border-radius: 20px;
}

.legendbtn:hover {
    background-color: #0a4b67;
    color: white;
    transition: 0.3s;
}


.addfilterbtn {
    width: 100%;
    background-color: #009c9d;
    border: 1px solid white;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border-radius: 5px;
    padding: 10px;
}

.addfilterbtn:hover {
    background-color: #0a4b67;
    color: white;
    transition: 0.3s;
}

.searchel {
    display: none;
    position: absolute;
    top: 10px;
    left: 50px;
    width: 300px;
    z-index: 1000;
    font-size: 14px;
}

.searchdiv {
    position: absolute;
    padding-right: 5px;
    top: 10px;
    left: 50px;
    width: calc(100% - 50px);
    font-size: 14px;
    white-space: nowrap;
}

.searchbtn {
    background-color: #0a4b67;
    color: white;
}

.autocomplete {
    display: block;
    background-color: white;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 14px;
    width: 275px;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-items div {
    padding: 5px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
}

.autocomplete-items div:hover {
    /*when hovering an item:*/
    background-color: #e9e9e9;
}

.autocomplete-active {
    /*when navigating through the items using the arrow keys:*/
    background-color: DodgerBlue !important;
    color: #ffffff;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #009c9d;
    color: white;
    border: unset;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
}

.select2-container .select2-search--inline .select2-search__field {
    line-height: 1rem !important;
    font-family: Montserrat, sans-serif !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    font-family: Montserrat, sans-serif !important;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu .dropdown-submenu {
    display: none;
    background-color: #0a4b67;
    position: absolute;
    left: 100%;
    top: -7px;
    border: 1px solid white;
    color: white;
    padding-inline: 10px;
    font-size: 14px;
}

.diffnav {
    background-color: #e9edee;
}

.diffnav a {
    font-weight: 600;
    color: #0a4b67;
}

.diffnav:hover a {
    color: white;
}

.sub-item {
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 5px;
}

.sub-item a {
    padding-inline: 10px;
}

.sub-item:hover {
    background-color: #009c9d;
}

.showsubmenu {
    display: block !important;
}

.measureinput {
    position: absolute;
    top: 220px;
    left: 52px;
    z-index: 1;
    display: none;
}

.showmeasureinput {
    display: block;
}

.box {
    float: left;
    height: 15px;
    width: 15px;
    border: 2px solid #ffcc33;
    clear: both;
}

.boxbg {
    background-color: rgba(255, 255, 255, 0.2);
}

.pabox {
    float: left;
    height: 15px;
    width: 15px;
    border: 2px solid rgba(0, 128, 0, 0.5);
    clear: both;
}

.paboxbg {
    background-color: rgba(0, 128, 0, 0.5);
}

.dhub {
  display: none;
  position: absolute;
  background-color: #fff;
  border-radius: 5px;
  width: 350px;
  font-size: 0.7rem;
  font-weight: 600;
  top: 180px;
  left: 52px;
  border: 1px solid #333;
  z-index: 1030; 
  overflow: hidden;                /* contain children */
}

.dhub.dhub--open {
  display: flex;
  flex-direction: column;
  height: 300px;      /* fixed height for the hub */
  overflow: hidden;   /* contain children */
}

#drawTab {
  flex: 1 1 auto;
  min-height: 0;      /*scrolls */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* First .row: buttons + table → grid layout */
#drawTab > .row:first-of-type {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr; /* two button columns */
  grid-template-rows: auto 1fr;   /* buttons row, then table row that grows */
  gap: 0.5rem;
  padding: 1rem;
}

/* Button alignment */
#drawTab > .row:first-of-type > .col-12.col-md-6:nth-of-type(1) {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#drawTab > .row:first-of-type > .col-12.col-md-6:nth-of-type(2) {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Table spans both columns and scrolls */
#drawTab > .row:first-of-type > .table-responsive {
  grid-column: 1 / -1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
}

/* Other rows (footer, dlist) don’t grow */
#drawTab > .row:not(:first-of-type) {
  flex: 0 0 auto;
}

/* Footer row visible */
#dhubFooter { 
  flex: 0 0 auto;
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

/* Table readability + sticky header + text clamp */
#drawTab .table { width: 100%; table-layout: fixed; }
#drawTab .table thead th { position: sticky; top: 0; z-index: 2; background: #fff; }
#drawTab .table th, 
#drawTab .table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Narrowed the checkbox column*/
#drawTab .table th:first-child,
#drawTab .table td:first-child {
  width: 24px;
  text-align: center;
  overflow: visible;     /* don't ellipsis the checkbox */
  text-overflow: clip;
  white-space: normal;
}

/* Give Site ID more room */
#drawTab .table th:nth-child(2),
#drawTab .table td:nth-child(2) {
  width: 100px;             /* adjust if need (90–120px) */
}

/* Keep icon columns visible and tight */
#drawTab .table th:nth-child(4),
#drawTab .table td:nth-child(4),
#drawTab .table th:nth-child(5),
#drawTab .table td:nth-child(5),
#drawTab .table th:nth-child(6),
#drawTab .table td:nth-child(6) {
  width: 34px; 
  text-align: center;
}


/* --------------------------------DRIVER JS POPOVER STYLING------------------------------------------- */
.driver-popover.asctour-theme {
    /* glassy, semi-transparent white with backdrop blur */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-width: 280px;
    padding: 0;
}

.driver-overlay,
.driver-popover,
.driver-popover-arrow,
.driver-highlighted-element,
.driver-stage {
  z-index: 20000 !important;
}

.driver-popover.asctour-theme .driver-popover-title {
    background: rgba(0, 156, 157, 0.9);
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.driver-popover.asctour-theme .driver-popover-description {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.driver-popover.asctour-theme .driver-popover-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: transparent;
    /* let the blur show through */
}

.driver-popover.asctour-theme .driver-popover-progress-text {
    font-size: 0.8rem;
    color: #555;
}

.driver-popover.asctour-theme .driver-popover-footer button {
    text-shadow: none !important;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.driver-popover.asctour-theme .driver-popover-prev-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #0a4b67;
}

.driver-popover.asctour-theme .driver-popover-next-btn,
.driver-popover.asctour-theme .driver-popover-done-btn {
    background: rgba(0, 156, 157, 0.9);
    color: #fff;
}

.driver-popover.asctour-theme .driver-popover-footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.driver-popover.asctour-theme .driver-popover-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    border: none;
    cursor: pointer;
}

.driver-popover.asctour-theme .driver-popover-close-btn:hover {
    color: #ff4d4f;
}

/* arrow “glass” rim to match title color */
.driver-popover.asctour-theme .driver-popover-arrow {
    border-color: rgba(0, 156, 157, 0.9) !important;
}

#filterRow th {
    background: #f1f1f1;
}

#filterRow select {
    width: 100%;
    font-size: 0.85rem;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.layer-list.collapsed {
    display: none;
}

.layer-header .toggle-trigger {
    cursor: pointer;
    user-select: none;
}

/* normal map */
#map canvas {
    filter: none;
}

/* when body has .colorblind-mode defined at beginning of html*/
.colorblind-mode #map canvas {
    filter: url(#colorblind-safe);
}

.colorblind-mode #specieslegend,
.colorblind-mode .legend {
    filter: url(#colorblind-safe);
}



/* ─── Legend colours ─── */
.legend-swatch.colour-persist3 {
    background: #34ff01;
}

/* 3-year persistence */
.legend-swatch.colour-9914 {
    background: #ff7f00;
}

/* 1999 & 2014 */
.legend-swatch.colour-1418 {
    background: #a2349e;
}

/* 2014 & 2018 */
.legend-swatch.colour-9918 {
    background: #e7bee3;
}

/* 1999 & 2018 */
.legend-swatch.colour-1999only {
    background: #e10f1d;
}

/* 1999 only */
.legend-swatch.colour-2014only {
    background: #2f85e6;
}

/* 2014 only */
.legend-swatch.colour-2018only {
    background: #e1de2d;
}

/* 2018 only */
.legend-swatch.colour-potential {
    background: #F57A00;
}

/* potential critical habitat */
.legend-swatch.colour-likely {
    background: #F50000;
}

/* potential critical habitat */


/* Lines */
.colour-seagrassc {
    border-color: #0074D9;
}

.colour-seagrassh {
    border-color: #FF4136;
}

.colour-seagrassd {
    border-color: #2ECC40;
}


/* ─── Colour-blind overrides (ColorBrewer Set3) ─── */
/* .colorblind-mode .legend-swatch.colour-persist3      { background: #B4B494; }
.colorblind-mode .legend-swatch.colour-9914          { background: #D4D47B }
.colorblind-mode .legend-swatch.colour-1418          { background: #81818A }
.colorblind-mode .legend-swatch.colour-9918          { background: #D7D7DA; }
.colorblind-mode .legend-swatch.colour-1999only      { background: #AFAF5D; }
.colorblind-mode .legend-swatch.colour-2014only      { background: #6060C0; }
.colorblind-mode .legend-swatch.colour-2018only      { background: #E0E09C; }

.colorblind-mode .colour-seagrassc  { border-color: #D55E00; }  
.colorblind-mode .colour-seagrassh  { border-color: #56B4E9; }
.colorblind-mode .colour-seagrassd  { border-color: #009E73; } */

/* ─── Single/Multi tab style ─── */
.tab-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 300px;
    font-family: Arial, sans-serif;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid #ccc;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    border: none;
    background: #f0f0f0;
    font-weight: bold;
}

.tab-btn.active {
    background: white;
    border-bottom: 2px solid #007BFF;
    color: #007BFF;
}


.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}   
