
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

main {
    display: flex;
    height: 100%;
    width: 100%;
}

#map {
    flex: 1;
    height: 100%;
}

#sidebar {
    width: 300px;
    height: 100%;
    background-color: white;
    border-left: 1px solid #ccc;
    overflow-y: auto;
}

.sidebar-content {
    padding: 15px;
}

#drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

#drop-zone.dragover {
    background-color: #e9ecef;
    border-color: #0d6efd;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-zone-content p {
    margin: 0;
    color: #495057;
}

.drop-zone-content .small {
    font-size: 0.875em;
    color: #6c757d;
}

#layers-container {
    margin-top: 20px;
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.layers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.layers-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #212529;
}

.action-button {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.action-button:hover {
    background-color: #0b5ed7;
}

.action-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#layers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.layer-item:hover {
    background-color: #e9ecef;
}

.layer-item input[type="checkbox"] {
    margin: 0;
}

.layer-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.1em;
    line-height: 1;
}

.layer-remove:hover {
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
}

/* Dialog Styles */
.dialog {
    position: fixed;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.dialog[hidden] {
    display: none;
}

.dialog-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 500px;
    max-width: 90%;
    max-height: 50vh;
    display: flex;
    flex-direction: column;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.dialog-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #212529;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #6c757d;
    cursor: pointer;
    padding: 0 5px;
}

.dialog-close:hover {
    color: #dc3545;
}

.dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(50vh - 120px);
}

#properties-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.property-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.property-row input {
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.property-row input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.property-delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.1em;
}

.property-delete:hover {
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
}

#add-property {
    width: 100%;
    margin-top: 10px;
}
