@import url('https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@300;700&display=swap');

#login-modal,
#admin-panel {
    display: none;
}

#login-modal.open,
#admin-panel.open {
    display: flex !important;
}

#login-user:focus,
#login-pass:focus {
    border-color: #CD1719 !important;
    outline: none;
}

#admin-etab:focus,
#admin-cond:focus {
    border-color: #CD1719 !important;
    outline: none;
}

#admin-add-btn:hover {
    background: #a01215 !important;
}

#admin-history::-webkit-scrollbar {
    width: 5px;
}

#admin-history::-webkit-scrollbar-thumb {
    background: #CD1719;
    border-radius: 3px;
}

#show-all-establishments-btn.selected {
    border: 2px solid #CD1719 !important;
}

#infobox-content::-webkit-scrollbar {
    width: 8px;
    position: absolute;
    left: 0;
    z-index: 10;
    overflow-x: hidden;
}

#infobox-content::-webkit-scrollbar-track {
    background: rgba(230, 230, 230, 0.5);
    border-radius: 3px;
    padding-left: 16px;
    min-width: 260px;
    max-width: 95vw;
    width: fit-content;
    box-sizing: content-box;
}

#infobox-content::-webkit-scrollbar-thumb {
    background: #CD1719;
    border-radius: 3px;
}

#infobox-content::-webkit-scrollbar-thumb:hover {
    background: #CD1719;
}

#infobox-content span {
    line-height: 1.18;
    margin-bottom: 4px;
    display: block;
    text-indent: -1.2em;
    padding-left: 1.2em;
    padding-right: 18px;
    hanging-punctuation: first;
    font-weight: normal;
}

#infobox-content .cond-group {
    margin-bottom: 8px;
}

#infobox-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 260px;
    max-width: 95vw;
    width: fit-content;
    box-sizing: content-box;
    overflow-x: hidden;
    padding-right: 18px;
    font-size: 18px;
    font-weight: bold;
    padding: 4px 0px;
    width: fit-content;
    max-width: 95vw;
    white-space: normal;
    overflow-x: hidden;
    text-align: left !important;
    margin-left: 0 !important;
}

html,
body,
* {
    font-family: 'Open Sans Condensed', Arial, sans-serif !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans Condensed', Arial, sans-serif !important;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Open Sans Condensed', Arial, sans-serif !important;
    font-weight: 700;
    background: #ffffff;
    color: #000000;
    overflow: hidden;
}

.map-container {
    display: flex;
    width: 100%;
    height: 100vh;
    gap: 4px;
    padding: 6px;
    background: #ffffff;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    padding: 6px;
}

.main-map {
    flex: 1;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 3px solid #CD1719;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none !important;
}

.domtom-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 250px;
    height: calc(100vh - 12px);
    overflow: visible;
    padding: 6px;
    background-color: transparent;
    border-radius: 4px;
    position: relative;
    z-index: 5;
}

.domtom-panel.left-panel {
    order: -1;
}

.domtom-panel.right-panel {
    order: 1;
}

.domtom-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0px;
    margin-bottom: 0;
    background: #ffffff;
    border: 3px solid #CD1719;
    border-radius: 0;
    overflow: hidden !important;
    margin-top: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    flex: 1 1 0;
    min-height: 0;
    position: relative;
    z-index: 20 !important;
    height: 200px;
    max-height: 200px;
}

.domtom-map .maplibregl-control-container {
    overflow: visible !important;
}

.domtom-map .maplibregl-ctrl-top-right {
    top: 2px !important;
    right: 2px !important;
}

.domtom-map .maplibregl-ctrl-scale {
    font-size: 9px !important;
    line-height: 1.1 !important;
    padding: 0 3px !important;
    min-width: 30px !important;
    background-color: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid #555 !important;
    color: #000 !important;
}

.domtom-box h4 {
    padding: 3px 8px 2px 8px;
    background-color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    border-bottom: 3px solid #000000;
    text-align: center;
}

.domtom-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    flex: 1 1 0 !important;
    overflow: hidden !important;
    position: relative;
    z-index: 20 !important;
    box-shadow: none !important;
    filter: none !important;
    border: none !important;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

.domtom-map canvas,
.domtom-map .maplibregl-canvas,
.domtom-map .maplibregl-canvas-container {
    width: 100% !important;
    height: 100% !important;
}

.domtom-map .maplibregl-popup {
    z-index: 999999 !important;
}

.domtom-map .maplibregl-canvas-container {
    overflow: visible !important;
}

.domtom-map .maplibregl-popup-anchor-top,
.domtom-map .maplibregl-popup-anchor-bottom,
.domtom-map .maplibregl-popup-anchor-left,
.domtom-map .maplibregl-popup-anchor-right {
    overflow: visible !important;
}

.domtom-map canvas,
.domtom-map .maplibregl-canvas {
    box-shadow: inset 0 0 0 3px #CD1719 !important;
    filter: none !important;
    border-radius: 0 !important;
}

.legend {
    position: absolute !important;
    bottom: auto !important;
    right: auto !important;
    top: -300px !important;
    left: 0 !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 10px 10px 10px !important;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 2px solid #000000;
    z-index: 1000;
    min-width: 0 !important;
    max-width: 95vw !important;
    width: fit-content !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    backdrop-filter: blur(8px);
    font-family: 'Open Sans Condensed', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #000000;
    white-space: nowrap;
    box-sizing: border-box !important;
    overflow-x: visible !important;
}

#main-map-filters-btn {
    position: relative !important;
    width: auto;
    height: auto;
    margin-right: 0;
    margin-bottom: 0;
    z-index: 1202 !important;
    top: 0;
    left: 0;
}

#map-bottom-controls {
    pointer-events: auto;
}

#main-map-export-btn {
    margin-left: 0;
}

#main-map-filters-btn>.legend-activate,
#export-pdf-btn {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1203 !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 3px 14px !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#main-map-filters-btn>.legend-activate:hover,
#export-pdf-btn:hover {
    background: #f0f0f0 !important;
    border-color: #000000 !important;
    color: #000000 !important;
}

#main-map-filters-btn>.legend-activate.legend-btn-open {
    border: 2px solid #CD1719 !important;
    color: #CD1719 !important;
}

#main-map-filters-btn>.legend-activate.legend-btn-open:hover {
    border-color: #CD1719 !important;
    color: #CD1719 !important;
}

.legend-condemnations {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 9px 7px 9px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 2px solid #000000;
    z-index: 999999 !important;
    max-width: 360px;
    backdrop-filter: blur(8px);
    font-family: 'Open Sans Condensed', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #000000;
}

.legend-condemnations button,
.legend-condemnations .legend-btn,
.legend-condemnations .legend-btn-condemnations {
    pointer-events: auto !important;
    z-index: 1000000 !important;
}

.legend-condemnations .legend-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 5px 2px 5px 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    gap: 0;
}

.legend-condemnations .legend-header h3 {
    text-align: left;
    flex: 1;
    font-size: 13px;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.maplibregl-ctrl button.maplibregl-ctrl-zoom-in:before,
.maplibregl-ctrl button.maplibregl-ctrl-zoom-out:before {
    color: #CD1719 !important;
    font-weight: bold !important;
    text-shadow: none !important;
}

.maplibregl-ctrl button {
    color: #CD1719 !important;
}

.map-title {
    position: absolute !important;
    top: 11px !important;
    left: 53% !important;
    transform: translateX(-50%) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    padding: 5px 10px !important;
    font-size: 8px !important;
    border-radius: 6px !important;
    z-index: 1001 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    border: 2.5px solid #CD1719 !important;
    backdrop-filter: blur(8px);
    width: max-content !important;
    max-width: 70% !important;
    height: auto !important;
}

.map-title h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #000000;
    text-align: center;
    font-family: 'Open Sans Condensed', sans-serif;
    letter-spacing: 0.2px;
    line-height: 1.3;
    white-space: nowrap;
}

.map-title h2.title-wrap {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.maplibregl-ctrl-top-right {
    z-index: 1001;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    top: 10px !important;
    right: 10px !important;
}

.maplibregl-ctrl-top-right .maplibregl-ctrl {
    margin: 0 !important;
}

.maplibregl-ctrl-top-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 16px !important;
    z-index: 1001;
    top: 8px !important;
    left: 8px !important;
}

.maplibregl-ctrl-top-left .maplibregl-ctrl {
    margin: 0 !important;
}


.maplibregl-ctrl-bottom-right {
    position: absolute !important;
    left: 365px !important;
    bottom: 20px !important;
    z-index: 999 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
}

.maplibregl-ctrl-bottom-right .maplibregl-ctrl {
    position: static !important;
    margin: 0 !important;
}

.maplibregl-ctrl-group button svg,
.maplibregl-ctrl-group button svg * {
    fill: #000000 !important;
    stroke: #000000 !important;
}

.maplibregl-ctrl-group button:hover svg,
.maplibregl-ctrl-group button:hover svg * {
    fill: #000000 !important;
    stroke: #000000 !important;
}

.maplibregl-ctrl-scale {
    position: absolute !important;
    top: 5px !important;
    right: 10px !important;
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 3px !important;
    padding: 6px 10px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    height: auto !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.legend.hidden {
    height: 50px !important;
    overflow: hidden !important;
    max-height: 50px !important;
    margin-bottom: 20px !important;
}

.legend.hidden .legend-header {
    padding: 7px 7px 12px !important;
    height: auto !important;
    min-height: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    flex-direction: row !important;
}

.legend-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0px 0px 0% 0px !important;
    min-height: 40px;
    box-sizing: border-box;
}

.legend .legend-header {
    padding: 0px 0px 0px 0px !important;
    height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
}

.legend h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px;
    color: #CD1719;
    font-weight: 700;
    line-height: 1 !important;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.legend-toggle {
    background: #ffffff;
    color: #000000;
    border: 2px solid #CD1719;
    border-radius: 2px;
    padding: 1px 2px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
    line-height: 1;
    margin: 0;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-toggle:hover {
    background: #f0f0f0;
    border-color: #000000;
    color: #CD1719;
}

.info-toggle {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    left: auto !important;
    background: white;
    color: #CD1719;
    border: 2px solid #000000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    padding: 5px;
    font-size: 15px;
    font-style: normal;
    font-family: Arial, sans-serif;
    cursor: pointer !important;
    transition: all 0.2s ease;
    line-height: 16px;
    flex-shrink: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000001 !important;
    pointer-events: auto !important;
}

.info-toggle:hover {
    background: rgba(205, 23, 25, 0.1);
    opacity: 1;
}

.info-popup {
    position: fixed;
    background: #fff;
    border: 2px solid #000 !important;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 220px;
    max-width: 320px;
    width: auto;
    z-index: 1100001 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    color: #000;
    font-size: 9px;
    font-weight: 300;
    top: auto;
    left: auto;
    visibility: hidden;
}

.info-popup[style*="display: block"] {
    visibility: visible;
}

.info-popup-content,
.info-popup-content * {
    color: #000;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 300 !important;
}

.info-popup-content p {
    margin: 0 0 8px 0;
}

.info-popup-content p:last-child {
    margin-bottom: 0;
}

.info-popup-content strong {
    color: #CD1719;
    font-weight: 700;
}

.legend-title {
    font-size: 10px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 2px solid #000000;
    cursor: pointer;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.legend-condemnations h3 {
    margin: 0;
    font-size: 11.5px;
    padding: 2px 1px 1px 2px !important;
    color: #CD1719 !important;
    font-weight: 600;
    min-width: 0;
    width: fit-content;
    max-width: 350px;
}

.legend-condemnations .legend-btn.legend-btn-condemnations {
    padding: 3px 5px;
    font-size: 12px;
    gap: 5px;
}

.legend-condemnations .legend-btn .count {
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 6px;
}

.legend-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 2px solid #000000 !important;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 95vw !important;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Open Sans Condensed', sans-serif;
    transition: all 0.2s ease;
    color: #000000 !important;
    text-align: left;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow: visible;
    white-space: nowrap;
    text-overflow: unset;
}

.legend-btn.selected,
.legend-btn.active {
    border: 2px solid #CD1719 !important;
}

.legend-btn-condemnations[data-condemnation="all"]:not(.selected) {
    border: 2px solid #000000 !important;
}

.legend-btn-condemnations.selected {
    border: 2px solid #CD1719 !important;
}

.legend-btn-condemnations[data-condemnation="all"].selected {
    border: 2px solid #CD1719 !important;
}

.legend span {
    color: #000000 !important;
}

.legend-condemnations span {
    color: #000000 !important;
}

.legend-btn .count {
    margin-left: auto;
    font-weight: 600;
    color: #CD1719 !important;
    font-size: 11px;
}

.legend-btn:hover {
    background-color: rgba(240, 240, 240, 0.95);
    border-color: #CD1719;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.legend-condemnations .dot {
    width: 14px;
    height: 14px;
    border-width: 3px !important;
}

.legend-btn .dot,
.legend-btn-condemnations .dot {
    border-width: 2px !important;
    border-style: solid !important;
}

.maplibregl-popup-content {
    padding: 8px 10px !important;
    font-size: 10px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    opacity: 1;
    font-weight: 400 !important;
    min-width: 240px !important;
    max-width: 280px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    box-sizing: border-box !important;
}

.maplibregl-popup {
    z-index: 3000 !important;
    max-width: 350px !important;
}

.domtom-popup {
    z-index: 999999 !important;
    pointer-events: auto !important;
}

.domtom-popup .maplibregl-popup-content {
    z-index: 999999 !important;
    padding: 8px 10px !important;
    min-width: 200px !important;
    max-width: 280px !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.domtom-map canvas,
.domtom-map .maplibregl-canvas {
    box-shadow: inset 0 0 0 3px #CD1719 !important;
    filter: none !important;
    border-radius: 0 !important;
}

.legend {
    padding: 8px 10px !important;
    min-width: 200px !important;
    max-width: 280px !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

#main-map-filters-btn>.legend {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(100% + 8px) !important;
    margin: 0 !important;
    z-index: 1204 !important;
}

.legend:not(.hidden) {
    max-height: none !important;
    overflow-y: visible !important;
    height: auto !important;
}

.maplibregl-popup-anchor-top .maplibregl-popup-content,
.maplibregl-popup-anchor-bottom .maplibregl-popup-content {
    max-height: 200px !important;
    overflow-y: auto !important;
}

.maplibregl-popup-content::-webkit-scrollbar {
    width: 6px;
}

.maplibregl-popup-content::-webkit-scrollbar-track {
    background: rgba(230, 230, 230, 0.5);
    border-radius: 3px;
}

.maplibregl-popup-content::-webkit-scrollbar-thumb {
    background: #CD1719;
    border-radius: 3px;
}

.maplibregl-popup-content::-webkit-scrollbar-thumb:hover {
    background: #CD1719;
}

.maplibregl-ctrl-scale-unit {
    font-weight: 700 !important;
}

.maplibregl-popup-tip {
    border-top-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom-color: rgba(255, 255, 255, 0.98) !important;
}


.domtom-panel::-webkit-scrollbar-track {
    background: rgba(230, 230, 230, 0.5);
    border-radius: 3px;
}

.domtom-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #CD1719 0%, #000000 100%);
    border-radius: 3px;
}

.domtom-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #000000 0%, #CD1719 100%);
}

.marker-container {
    display: block;
    width: 8px;
    position: absolute;
    right: 8px;
    z-index: 10;
}

.marker {
    width: 8px;
    height: 8px;
    background-color: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.marker-label {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #000000;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'Open Sans Condensed', Arial, sans-serif;
    text-shadow: none;
    display: none;
}

.marker-domtom {
    width: 10px;
    height: 10px;
    background-color: #000000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.marker,
.marker-domtom {
    border-width: 2px !important;
    border-style: solid !important;
}