.irm-map-container {
    position: relative;
    margin: 0 auto;
    padding-top: 0;
    overflow: visible;
    display: flex;
    justify-content: center;
    max-width: 100%;
    width: 100%;
}

.irm-map {
    width: 100%;
    height: 100%;
}

.irm-map .irm-region {
    transition: fill 0.2s ease;
    cursor: pointer;
}

.irm-map .irm-region path,
.irm-map .irm-region {
    pointer-events: all;
}

/* Отключаем стандартные браузерные подсказки */
.irm-map [title] {
    pointer-events: none !important;
}

.irm-map .irm-region:hover {
    opacity: 0.9;
}

.irm-map .irm-region.irm-active {
    stroke: #333;
    stroke-width: 2;
}

/* Стили для вкладок федеральных округов */
.irm-federal-districts-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px 10px 10px;
    margin-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.irm-tab-btn {
    padding: 10px 18px;
    border: 2px solid transparent;
    border-radius: 25px;
    background: #f5f5f5;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.irm-tab-btn:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.irm-tab-btn.active {
    background: var(--tab-color, #3498db);
    color: #fff;
    border-color: var(--tab-color, #3498db);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.irm-tab-btn[data-district="all"].active {
    background: #2c3e50;
    border-color: #2c3e50;
}

/* Анимация регионов при фильтрации */
.irm-map .irm-region.irm-hidden {
    opacity: 0.15;
    pointer-events: none;
}

.irm-map .irm-region.irm-highlight {
    opacity: 1;
    filter: brightness(1.1);
}

/* Modal Styles */
.irm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.irm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.irm-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: irm-modal-slide-in 0.3s ease-out;
}

@keyframes irm-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.irm-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

.irm-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.irm-modal-body {
    padding: 30px;
}

.irm-modal-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
    line-height: 1.3;
}

.irm-modal-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 15px;
}

.irm-modal-text p {
    margin: 0 0 15px 0;
}

.irm-modal-text p:last-child {
    margin-bottom: 0;
}

.irm-modal-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.irm-modal-button {
    display: inline-block;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.irm-modal-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.irm-modal-button:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .irm-modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .irm-modal-body {
        padding: 20px;
    }

    .irm-modal-title {
        font-size: 20px;
    }

    /* Адаптивная высота карты для мобильных */
    .irm-map-container.irm-mobile-adaptive {
        height: auto !important;
        aspect-ratio: 2 / 1.3;
        min-height: 250px;
    }

    .irm-map-container.irm-mobile-adaptive {
        touch-action: manipulation;
    }

    .irm-map-container.irm-mobile-adaptive .irm-map .irm-region {
        transition: fill 0.15s ease;
    }

    /* Адаптивность вкладок */
    .irm-federal-districts-tabs {
        gap: 8px;
        padding: 15px 8px 8px;
    }

    .irm-tab-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .irm-map-container.irm-mobile-adaptive {
        aspect-ratio: 2 / 1.4;
        min-height: 200px;
    }

    .irm-federal-districts-tabs {
        gap: 6px;
        padding: 10px 5px 5px;
    }

    .irm-tab-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
}
