/* NavLink Color */
.nav-link:hover {
    color: red !important;
    /* Replace with your desired color */
}

.nav-link.active {
    color: #006ec9 !important;
    /* Replace with your desired color */
}

footer {
    height: 160px;
}

/* dcc datepicker */
#date_range_picker {
    width: 100%;
}


.row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.row>* {
    width: 100%;
    padding-left: 0px;
    padding-right: 0px;
    margin-right: 0px;
    margin-left: 0px;

}

[class*="col-"] {
    padding-left: 4px;
    padding-right: 4px;
    box-sizing: border-box;
}


/* Small devices (576px and up) */
@media (min-width: 320px) and (max-width: 576px) {
    .Select-value {
        display: flex;
        width: 95%;
    }

    .dash-bootstrap .Select--multi .Select-value {
        min-width: 200px;
    }

    .Select-value-label {
        overflow: hidden;
        text-overflow: ellipsis;
        width: 90%;
    }

    .Select-multi-value-wrapper {
        width: 92%;
    }
}

main {
    width: 100%;
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 80%;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 80%;
    }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 80%;
    }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1300px) {
    .container {
        max-width: 80%;
    }
}

/* XXL devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 80%;
    }
}

/* XXL devices (1400px and up) */
@media (min-width: 1500px) {
    .container {
        max-width: 80%;
    }
}


/* Small devices (576px and down) - Portrait mode */
@media screen and (max-width: 576px) and (orientation: portrait) {
    .leaflet-container {
        height: 70vh;
        /* Increase height for portrait on small devices */
    }
}

/* Small devices (576px and down) - Landscape mode */
@media screen and (max-width: 576px) and (orientation: landscape) {
    .leaflet-container {
        height: 50vh;
        /* Less height in landscape */
    }
}


/* Wide screens (1280px and up) */
@media screen and (min-width: 1280px) {
    .leaflet-container {
        height: 65vh;
    }
}

/* Normal screens (between 768px and 1280px) */
@media screen and (min-width: 768px) and (max-width: 1280px) {
    .leaflet-container {
        height: 50vh;
    }
}


/* Transparent Tooltip */
.transparent-tooltip {
    background-color: rgba(200, 200, 200, 0.3);
    border: none;
    color: black;
}


.trapeye-tooltip {
    background-color: rgba(33, 37, 41, 0.92);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    min-width: 140px;
    max-width: 240px;
    white-space: normal;
}

.leaflet-tooltip.custom-main-tooltip {
    border: none;
    white-space: pre-line;
}

.leaflet-tooltip.custom-main-tooltip.hidden-by-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.leaflet-tooltip.custom-main-tooltip .trapeye-observation-tooltip-section {
    margin-top: 6px;
    text-align: left;
    font-size: 15px;
}

.leaflet-tooltip.custom-main-tooltip .trapeye-observation-tooltip-section strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.leaflet-tooltip.custom-main-tooltip .trapeye-observation-tooltip-media {
    margin-top: 6px;
}

.leaflet-tooltip.custom-main-tooltip .trapeye-observation-tooltip-image {
    display: block;
    width: 140px;
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    border-radius: 4px;
    margin: 6px auto 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.leaflet-tooltip.custom-main-tooltip::before {
    border-color: transparent;
}

.leaflet-tooltip.custom-main-tooltip.leaflet-tooltip-top::before {
    border-top-color: rgba(33, 37, 41, 0.92);
}

.leaflet-tooltip.custom-main-tooltip.leaflet-tooltip-bottom::before {
    border-bottom-color: rgba(33, 37, 41, 0.92);
}

.leaflet-tooltip.custom-main-tooltip.leaflet-tooltip-left::before {
    border-left-color: rgba(33, 37, 41, 0.92);
}

.leaflet-tooltip.custom-main-tooltip.leaflet-tooltip-right::before {
    border-right-color: rgba(33, 37, 41, 0.92);
}

/* Custom CSS for dcc.Slider marks to appear horizontal on the rightmost end */
.rc-slider-mark-text {
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    text-anchor: right !important;
}


/* Custom CSS for the unfoldable trapeye map markers with observations */
.custom-div-icon .custom-marker-container {
    position: relative;
    display: inline-block;
    overflow: visible;
}

.custom-div-icon .custom-marker-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.custom-marker-container[data-has-multiple="true"] .custom-marker-circle {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.75), 0 0 0 12px var(--marker-halo-color, rgba(13, 110, 253, 0.45));
}

.custom-div-icon:hover .custom-marker-circle {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.custom-div-icon:hover .custom-marker-container[data-has-multiple="true"] .custom-marker-circle {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.75), 0 0 0 15px var(--marker-halo-color, rgba(13, 110, 253, 0.45));
}

.custom-div-icon .custom-marker-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    pointer-events: none;
    transition: top 0.25s ease, left 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.25));
    z-index: 1;
}

.custom-marker-container[data-has-multiple="true"] .custom-marker-overlay::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
    filter: blur(3px);
    z-index: -1;
}


.custom-div-icon:hover .custom-marker-container[data-has-multiple="true"] .custom-marker-overlay::before {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
}

.custom-marker-container .custom-marker-overlay:first-of-type {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  pointer-events: none;
}

.custom-marker-container[data-has-center="true"] .custom-marker-overlay:first-of-type {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.custom-div-icon:hover .custom-marker-overlay {
    top: var(--overlay-top, 50%);
    left: var(--overlay-left, 50%);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35);
    pointer-events: auto;
    cursor: pointer;
}

.custom-div-icon .custom-marker-overlay .custom-marker-overlay-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, -6px) scale(0.9);
    background-color: rgba(33, 37, 41, 0.92);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 140px;
    max-width: 240px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: normal;
    display: none;
}

.custom-div-icon .custom-marker-overlay .custom-marker-overlay-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(33, 37, 41, 0.92) transparent transparent transparent;
}

.custom-div-icon .custom-marker-overlay:hover .custom-marker-overlay-tooltip {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.custom-div-icon .custom-marker-overlay .custom-marker-overlay-tooltip .trapeye-observation-tooltip-section {
    margin-top: 0;
    text-align: left;
}

.custom-div-icon .custom-marker-overlay .custom-marker-overlay-tooltip .trapeye-observation-tooltip-media {
    margin-top: 6px;
}

.custom-div-icon .custom-marker-overlay .custom-marker-overlay-tooltip .trapeye-observation-tooltip-image {
    display: block;
    width: 140px;
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    border-radius: 4px;
    margin: 6px auto 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Render the tooltip inside an absolute portal so it can escape the map bounds. */
.observation-tooltip-portal {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 6000;
    display: none;
}

.observation-tooltip-portal .custom-marker-overlay-tooltip {
    position: relative;
    transform: none;
    bottom: auto;
    left: auto;
    margin: 0;
    opacity: 1 !important;
    display: block !important;
    pointer-events: auto;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.observation-tooltip-portal .custom-marker-overlay-tooltip::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(33, 37, 41, 0.92) transparent transparent transparent;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
}

.observation-tooltip-portal[data-position="below"] .custom-marker-overlay-tooltip::after {
    top: -6px;
    bottom: auto;
    border-color: transparent transparent rgba(33, 37, 41, 0.92) transparent;
}
