/* info panel */
.rusnetim-info-panel {
    position: relative;
    box-sizing: border-box;
    overflow-y: auto;
}
.rusnetim-info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ccc;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2000;
    color: #333;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 0;
    box-sizing: border-box;
}
.rusnetim-gallery {
    margin-bottom: 15px;
}
.rusnetim-gallery-main {
    margin-bottom: 10px;
}
.rusnetim-gallery-main a {
    display: block;
    cursor: pointer;
}
.rusnetim-gallery-main img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.rusnetim-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}
.gallery-thumb.active-thumb {
    border-color: #1e98ff;
}

/* lightbox */
.rusnetim-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rusnetim-lightbox .rusnetim-lightbox-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rusnetim-lightbox img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain !important;
    border-radius: 4px;
}

.rusnetim-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
}

.rusnetim-lightbox-prev,
.rusnetim-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 100001;
    transition: background 0.2s;
}

.rusnetim-lightbox-prev:hover,
.rusnetim-lightbox-next:hover {
    background: rgba(0,0,0,0.8);
}

.rusnetim-lightbox-prev {
    left: 20px;
}

.rusnetim-lightbox-next {
    right: 20px;
}

/* cluster list */
.rusnetim-cluster-list h3 {
    margin: 0 0 10px;
}
.rusnetim-cluster-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rusnetim-cluster-item {
    padding: 5px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.rusnetim-cluster-item:hover {
    background: #f5f5f5;
}
.rusnetim-cluster-item-name {
    display: block;
}

/* category filter base styles (dynamic colors will be added inline) */
.rusnetim-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.rusnetim-cat-btn {
    display: inline-block;
    cursor: pointer;
    border: none;
    background: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}
.rusnetim-cat-group {
    margin-bottom: 10px;
}
.rusnetim-cat-group-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}
.rusnetim-cat-group .rusnetim-cat-btn {
    margin-right: 8px;
    margin-bottom: 5px;
}
/* Обычный select для фильтра категорий (если не используется nice-select) */
.rusnetim-native-select {
    display: block !important;
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}
.rusnetim-native-select:hover {
    border-color: #888;
}
.rusnetim-native-select:focus {
    border-color: #1e98ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30,152,255,0.2);
}
.rusnetim-cat-select {
    display: block !important;
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.rusnetim-cat-select:hover {
    border-color: #888;
}
.rusnetim-cat-select:focus {
    border-color: #1e98ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30,152,255,0.2);
}
.rusnetim-category-filter .nice-select {
    display: none !important;
}
.rusnetim-category-filter select.rusnetim-cat-select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
@media (max-width: 767px) {
    .rusnetim-map-wrapper {
        position: relative;
        overflow: hidden;
    }

    .rusnetim-info-panel {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 10000;
        background: #fff;
        transition: transform 0.3s ease;
        box-shadow: none;
        overflow-y: auto;
        box-sizing: border-box;
        transform: translateX(100%);
    }

    .rusnetim-info-panel.left-side {
        transform: translateX(-100%);
    }

    .rusnetim-info-panel.rusnetim-panel-open {
        transform: translateX(0) !important;
    }

    .rusnetim-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
        display: none;
    }

    .rusnetim-overlay.active {
        display: block;
    }
    .rusnetim-info-close {
        width: 40px;
        height: 40px;
        font-size: 32px;
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.6);
        color: white;
        border-radius: 50%;
        z-index: 10001;
    }
}