html,body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Roboto", "Segoe UI", "Helvetica Neue", sans-serif;
}

header {
    background-color: #00304d;
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 1.5rem;
    height: 60px;
    align-content: center;
}

#mapId {
    height: calc(100vh - 60px);
    width: 100%;
    position: relative;
    z-index: 0;
}

.menuInfo {
    position: absolute;
    top: 75px;
    left: 15px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-button {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 8px;
    height: 48px;
    padding: 0 12px;
    border: 2px solid #333;
    background-color: white;
    border-radius: 4px;
    font-size: large;
    font-weight: 600;
    color: #333;
    box-sizing: border-box;
    white-space: nowrap;
}

.layer-button.selected {
    background-color: lightblue;
}

.layer-button:hover {
    color: #007bff;
    cursor: pointer;
}

.layer-button:active {
    background-color: lightblue;
    transform: scale(0.95);
}

.drag-handle {
    cursor: grab;
    margin-right: 8px;
    font-size: 1.2rem;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

.drag-handle:active {
    cursor: grabbing;
}

.button-label {
    flex: 1;
    pointer-events: none;
}

.static-button {
    transform: none !important;
    pointer-events: none;
    background-color: inherit !important;
    color: inherit !important;
}

.custom-tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    white-space: normal;
    max-width: 240px;
    word-wrap: break-word;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.15s ease;
}


.layer-panel {
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 5px;
    max-width: 200px;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 1001;
}

.layer-panel ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.layer-panel li {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}


.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.loading-spinner .spinner {
    border: 4px solid #ccc;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}


.info.legend {
    background: white;
    padding: 8px 12px;
    font: 14px/1.4 "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    line-height: 1.5em;
}

.info.legend i {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    background: #ccc;
    border-radius: 3px;
}




/*info page*/
.info-page{
    padding: 2rem;
    margin: 0;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    overflow: auto;
    box-sizing: border-box;
}

.info-page .container h5 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-page .container p {
    margin-bottom: 1.25rem;
}

.info-page .container ul {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

/* Layer Descriptions */
.label-icons > button {
    margin-top: 0.75rem;
}

.label-icons > div {
    margin-bottom: 1.25rem;
    margin-left: 1.5rem;
}

/* Icon Labels */
.icon-labels {
    margin-bottom: 1.5rem;
}

.icon-labels div {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.icon-labels i {
    min-width: 2rem;
    min-height: 2rem;
    display: flex;
    color: #333;
    border: 2px solid #333;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-right: 1rem;
}
.attribution-list li {
    line-height: 1.3;
}

.modal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    border-radius: 8px;
    max-width: 900px;
    width: 80%;
    height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 36px;
    background: none;
    border: none;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    overflow: auto;
}

/* Sidebar Menu */
.openbtn {
    width: 2rem;
    height: 2rem;
    display: flex;
    float: left;
    justify-content: center;
    align-items: center;
}

.openbtn:hover {
    background-color: #444;
}

.closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
}

.sidebar {
    width: 0;
    overflow-x: hidden;
    transition: 0.5s;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #134362;
    padding-top: 60px;
}

.sidebar.open {
    width: 250px;
}

.shifted {
    margin-left: 250px;
}

#main,
#menuInfo {
    transition: 0.5s;
}

.menuInfo .sortable-ghost {
    opacity: 0.4;
    transform: scale(0.98);
    background-color: #ddd !important;
    border-style: dashed !important;
    box-shadow: none !important;
}

body.dragging .custom-tooltip {
    display: none !important;
}

.sidebar a {
    padding-left: 1.5rem;
    margin: 0.5rem;
    display: block;
    color: #e0e0e0;
    font-size: 1.5rem;
    text-decoration: none;
}

.sidebar a:hover {
    color: white;
}


.graph-panel {
    position: absolute;
    top: 70px;
    right: 10px;
    width: 350px;
    max-height: 60vh;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    z-index: 999;
}

.graph-panel.hidden {
    display: none;
}

