html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

#map {
    height: calc(100vh - 16px);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
    border:8px grey ridge;
}
#loading-overlay {
    position: absolute;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: all;
}
#loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loading-box {
    text-align: center;
}

.spinner {
    margin: 0 auto 10px;
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2em;
    color: #333;
}

/* Attribute panel styles */
.attr-sidepanel {
    position: fixed;
    height: 100%;
    width: 350px;
    max-width: 90%;
    top: 0;
    left: -400px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    font-family: sans-serif;
}

.attr-sidepanel.open {
    left: 0;
}

.attr-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.attr-panel-overlay.visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.attr-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.attr-panel-header h3 {
    margin: 0;
    font-size: 18px;
}

.attr-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attr-panel-body {
    padding: 15px;
}

.attrpopup {
    font-family: sans-serif;
    font-size: 11px;
    padding: 3px;
}

.attrpopup h4 {
    margin: 6px 0 4px;
    font-size: 14px;
    border-bottom: 1px solid #ccc;
}

.popup-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
}

.popup-table td {
    padding: 4px 6px;
    vertical-align: top;
}

.popup-table .even {
    background-color: #f9f9f9;
}

.popup-table .odd {
    background-color: #ffffff;
}

.popup-key {
    font-weight: bold;
    width: 40%;
    white-space: nowrap;
}

.popup-value {
    width: 60%;
    word-break: break-word;
}

.file-list {
    list-style: none;
    padding-left: 0;
    margin: 4px 0;
}

.file-list li {
    margin-bottom: 4px;
}


/* Media queries for responsive design */
@media screen and (max-width: 768px) {
    .attr-sidepanel {
        width: 80%;
    }
}

@media screen and (max-width: 480px) {
    .attr-sidepanel {
        width: 100%;
        height: 80%;
        left: 0;
        top: 100%;
        transition: top 0.3s ease;
    }
    
    .attr-sidepanel.open {
        top: 20%;
        left: 0;
    }
}

.projectinfo {
    background-color: #f5f5f5;
    font-size: 16px;
    padding: 10px;
    width: 200px;
}