* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container{
    height: 100vh;
    padding: 0;
}

header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 24px;
    text-transform: uppercase;
}

.subtitle {
    color: #7f8c8d;
    font-size: 14px;
    max-width: 150px;
    line-height: 14px;
}

.toolbar{
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 2000;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 5px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
}

.toolbar-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 37px;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary.active {
    background: #27ae60;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-secondary.active {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.icon {
    font-size: 16px;
}

.select-layer {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.layer-buttons {
    display: flex;
    gap: 5px;
}

.btn-layer {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-layer:hover {
    background: #f5f5f5;
    border-color: #3498db;
}

.btn-layer.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.map-label {
    background: transparent !important;
    border: none !important;
}

.label-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    pointer-events: none;
}

.map-container{
    position: fixed;
    inset: 0;
    /* top:0 right:0 bottom:0 left:0 */
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}
.leaflet-top.leaflet-left {
    top: 80px;
}
.coordinates-panel {
    position: absolute;
    bottom: 70px;
    left: 20px;
	display: flex;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 12px;
    max-width: 300px;
}

.coord-label {
    margin-right: 4px;
    color: #2c3e50;
}

#coordinates-display {
    color: #7f8c8d;
}

.info-panel{
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 5px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgb(255 255 255 / 67%);
}

.info-item {
    /* margin-bottom: 8px; */
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: #2c3e50;
}
.copyright,
.copyright a{color: #b4b6b7;text-decoration: none;}

@media (max-width: 768px) {
    .toolbar{
        top: 8px;
        left: 8px;
        right: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        flex-direction: row;
    }

    .toolbar-group {
        justify-content: space-between;
        display: flex;
    }
    .subtitle{
    display: none;
}
    .toolbar-group.layer-buttons{
    justify-content: center;
}
    .toolbar-group.layer-buttons .btn-layer{
    padding: 6px 14px;
}

    .btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    .select-layer {
        width: 100%;
    }

    .map-container {
        /* height: calc(100vh - 350px); */
        /* min-height: 400px; */
    }
    .info-panel{
        left: 8px;
        right: 8px;
        bottom: 8px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .coordinates-panel{
        left: 10px;
        right: 10px;
        bottom: 170px;
    }

    header h1 {
        font-size: 20px;
    }
}


.leaflet-draw-toolbar {
    margin-top: 10px;
}

.leaflet-draw-toolbar a {
    background-color: #fff;
    border: 1px solid #ccc;
}


.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

#object-name-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

#object-name-input:focus {
    outline: none;
    border-color: #3498db;
}
#object-photo-input {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

#object-photo-input:focus {
    outline: none;
    border-color: #3498db;
}

#photo-preview {
    margin-top: 10px;
}

#photo-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

#photo-filename {
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-buttons .btn {
    min-width: 100px;
}
.photo-modal {
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 20000;
}

.photo-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.photo-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 20001;
}

.photo-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.popup-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

