/* Стили для страницы с интерактивной картой GTA RP */

/* Основные стили для страницы */
.map-page {
    background-color: #111;
}

/* Стили для шапки страницы */
.map-header {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)), 
                url('../images/map/map-header-bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 120px 0 50px;
    text-align: center;
    color: #fff;
    position: relative;
}

.map-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(to top, #111, transparent);
}

.map-header-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.map-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}

.map-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Основной контейнер карты */
.map-container {
    display: flex;
    position: relative;
    min-height: 700px;
    background-color: #111;
    padding: 30px;
    gap: 30px;
}

/* Сайдбар с фильтрами и списком локаций */
.map-sidebar {
    width: 320px;
    flex-shrink: 0;
    background-color: rgba(30, 30, 35, 0.9);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 800px;
}

.map-filters {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-filters h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.filter-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.filter-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 1rem;
    color: #fff;
}

.filter-item[data-category="government"] .filter-icon,
.legend-icon.government {
    background-color: #3f51b5;
}

.filter-item[data-category="business"] .filter-icon,
.legend-icon.business {
    background-color: #4caf50;
}

.filter-item[data-category="entertainment"] .filter-icon,
.legend-icon.entertainment {
    background-color: #e91e63;
}

.filter-item[data-category="service"] .filter-icon,
.legend-icon.service {
    background-color: #ff9800;
}

.filter-item[data-category="criminal"] .filter-icon,
.legend-icon.criminal {
    background-color: #f44336;
}

.filter-item[data-category="landmark"] .filter-icon,
.legend-icon.landmark {
    background-color: #9c27b0;
}

.filter-text {
    color: #fff;
    font-size: 1rem;
}

/* Список локаций */
.map-location-list {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.map-location-list h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.location-search {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

.location-search input {
    flex-grow: 1;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
}

.location-search button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    cursor: pointer;
}

.location-search input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.5);
}

.locations {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.location-item:hover {
    background-color: rgba(255, 165, 0, 0.15);
    transform: translateY(-2px);
}

.location-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #fff;
}

.location-info {
    flex-grow: 1;
}

.location-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
    font-size: 1rem;
}

.location-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Обертка карты */
.map-wrapper {
    flex-grow: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    height: 800px;
}

.game-map {
    width: 100%;
    height: 100%;
    background-color: #222;
}

/* Контроли карты */
.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
}

.map-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.map-control:hover {
    background-color: #ff9800;
    transform: scale(1.1);
}

/* Стили для попапа с информацией о локации */
.location-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.location-popup.active {
    opacity: 1;
    visibility: visible;
}

.location-popup-content {
    background-color: #1a1a1a;
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.location-popup.active .location-popup-content {
    transform: scale(1);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    z-index: 2;
}

.close-popup:hover {
    color: #fff;
}

.location-popup-header {
    padding: 20px;
    background-color: #232323;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.location-popup-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.location-category {
    padding: 5px 12px;
    border-radius: 20px;
    background-color: #ff9800;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.location-popup-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.location-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.location-popup-image:hover img {
    transform: scale(1.05);
}

.location-popup-description {
    padding: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 1rem;
}

.location-popup-details {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
}

.detail-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff9800;
    font-size: 1rem;
    margin-right: 15px;
}

.detail-content {
    flex-grow: 1;
}

.detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 3px;
}

.detail-value {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

/* Мобильная легенда */
.map-legend-mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 500;
}

.legend-toggle {
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 30px;
    color: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.legend-toggle i {
    margin-right: 8px;
    font-size: 1rem;
    color: #ff9800;
}

.legend-content {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 10px;
    background-color: rgba(30, 30, 35, 0.95);
    border-radius: 8px;
    padding: 15px;
    width: 250px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    display: none;
}

.legend-content.active {
    display: block;
    animation: fadeIn 0.3s forwards;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.9rem;
    color: #fff;
}

.legend-text {
    color: #fff;
    font-size: 0.9rem;
}

/* Стили для маркеров на карте (Leaflet) */
.leaflet-marker-icon {
    transition: transform 0.2s, filter 0.2s;
}

.leaflet-marker-icon:hover {
    transform: scale(1.2) !important;
    filter: drop-shadow(0 0 5px rgba(255, 165, 0, 0.8));
    z-index: 1000 !important;
}

.marker-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.marker-icon::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #333;
}

.marker-icon.government {
    background-color: #3f51b5;
}
.marker-icon.government::before {
    border-top-color: #3f51b5;
}

.marker-icon.business {
    background-color: #4caf50;
}
.marker-icon.business::before {
    border-top-color: #4caf50;
}

.marker-icon.entertainment {
    background-color: #e91e63;
}
.marker-icon.entertainment::before {
    border-top-color: #e91e63;
}

.marker-icon.service {
    background-color: #ff9800;
}
.marker-icon.service::before {
    border-top-color: #ff9800;
}

.marker-icon.criminal {
    background-color: #f44336;
}
.marker-icon.criminal::before {
    border-top-color: #f44336;
}

.marker-icon.landmark {
    background-color: #9c27b0;
}
.marker-icon.landmark::before {
    border-top-color: #9c27b0;
}

/* Стили для тултипов на карте */
.leaflet-popup-content-wrapper {
    background-color: rgba(30, 30, 35, 0.95);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content {
    margin: 8px 12px;
    color: #fff;
}

.leaflet-popup-tip {
    background-color: rgba(30, 30, 35, 0.95);
}

.map-tooltip {
    padding: 5px 0;
}

.tooltip-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: #ff9800;
    font-size: 1rem;
}

.tooltip-category {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
}

.tooltip-category i {
    margin-right: 5px;
    font-size: 0.8rem;
}

.tooltip-action {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #ff9800;
    cursor: pointer;
    display: inline-block;
}

.tooltip-action:hover {
    text-decoration: underline;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 1200px) {
    .map-container {
        gap: 20px;
        padding: 20px;
    }
    
    .map-sidebar {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .map-header h1 {
        font-size: 2.8rem;
    }
    
    .map-header p {
        font-size: 1.1rem;
    }
    
    .map-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .map-sidebar {
        width: 100%;
        max-height: none;
        height: auto;
    }
    
    .map-location-list {
        max-height: 300px;
    }
    
    .map-wrapper {
        height: 600px;
    }
}

@media (max-width: 767px) {
    .map-header {
        padding: 100px 15px 40px;
    }
    
    .map-header h1 {
        font-size: 2.4rem;
    }
    
    .map-header p {
        font-size: 1rem;
    }
    
    .map-container {
        padding: 10px;
    }
    
    .map-sidebar {
        display: none;
    }
    
    .map-wrapper {
        height: 500px;
        border-radius: 6px;
    }
    
    .map-legend-mobile {
        display: block;
    }
    
    .location-popup-content {
        width: 90%;
    }
    
    .location-popup-header h3 {
        font-size: 1.3rem;
    }
    
    .location-popup-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .map-header h1 {
        font-size: 2rem;
    }
    
    .map-wrapper {
        height: 400px;
    }
    
    .location-popup-image {
        height: 150px;
    }
} 