/* Стилі для адаптивного розміщення карти та бічної панелі */
.map-container {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
}

#registry-section {
    position: absolute;
    top: 0;
    right: -40%;
    width: 40%;
    height: 100%;
    background: white;
    z-index: 1000;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                visibility 0s linear 0.3s;
    cursor: default !important; /* Прибираємо курсор resize */
}

#registry-section.active {
    right: 0;
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                visibility 0s linear 0s;
    cursor: default !important;
}

#map-section {
    flex: 1;
    transition: all 0.3s ease;
    width: 100%;
}

body.registry-open #map-section {
    width: 60%;
}

/* Стилі для контейнера реєстру */
#registry-container {
    height: calc(100% - 50px); /* Висота з урахуванням панелі інструментів */
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Оптимізація розміру тексту та відступів в таблиці */
.registry-table {
    font-size: 0.875rem;
}

.registry-table td,
.registry-table th {
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.registry-stats {
    font-size: 0.8rem !important;
}

/* Зменшуємо відступи для іконок */
.registry-stats i {
    font-size: 0.9rem;
    margin-right: 2px !important;
}

#registry-container::-webkit-scrollbar {
    width: 8px;
}

#registry-container::-webkit-scrollbar-track {
    background: transparent;
}

#registry-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Стилі для кнопки закриття */
.close-registry {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
    display: none;
}

#registry-section.active .close-registry {
    display: block;
}

/* Стилі для перемикача в табі */
#registry-tab .form-switch {
    margin-left: 8px;
    margin-top: 1px;
}

#registry-tab .form-check-input {
    width: 32px;
    height: 18px;
    cursor: pointer;
}

/* Оптимізація для мобільних пристроїв */
@media (max-width: 768px) {
    #registry-section {
        width: 100%;
        right: -100%;
    }

    body.registry-open #map-section {
        width: 0;
    }
}
