/* ПРИНУДИТЕЛЬНОЕ РАСШИРЕНИЕ ПОПАПА MapLibre GL */
.youtube-popup-wrapper .maplibregl-popup-content {
    padding: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    overflow: hidden !important;
    background: rgba(10, 18, 32, 0.75) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    max-width: none !important;
    width: auto !important;
    min-width: 560px !important;
}

.youtube-popup-wrapper .maplibregl-popup {
    max-width: none !important;
}

.youtube-popup-wrapper .maplibregl-popup-anchor-top .maplibregl-popup-tip,
.youtube-popup-wrapper .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: rgba(10, 18, 32, 0.75) !important;
    border-bottom-color: rgba(10, 18, 32, 0.75) !important;
}

.youtube-popup-clean {
    width: 560px !important;
    background: transparent;
    color: white;
    display: block !important;
}

.youtube-title {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
    text-align: center;
    width: 560px;
    box-sizing: border-box;
}

.youtube-player-container {
    width: 560px !important;
    height: 315px !important;
    background: transparent;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.youtube-player-container iframe {
    width: 560px !important;
    height: 315px !important;
    border: none !important;
    display: block !important;
}

.youtube-error-clean {
    width: 560px !important;
    height: 315px !important;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.youtube-error-clean p {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.youtube-error-clean a {
    color: #ff0000;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 24px;
    border: 2px solid #ff0000;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.youtube-error-clean a:hover {
    background: #ff0000;
    color: white;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .youtube-popup-wrapper .maplibregl-popup-content {
        min-width: 350px !important;
    }
    
    .youtube-popup-clean {
        width: 350px !important;
    }
    
    .youtube-title {
        width: 350px;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .youtube-player-container {
        width: 350px !important;
        height: 197px !important;
    }
    
    .youtube-player-container iframe {
        width: 350px !important;
        height: 197px !important;
    }
    
    .youtube-error-clean {
        width: 350px !important;
        height: 197px !important;
    }
}

@media (max-width: 480px) {
    .youtube-popup-wrapper .maplibregl-popup-content {
        min-width: 300px !important;
    }
    
    .youtube-popup-clean {
        width: 300px !important;
    }
    
    .youtube-title {
        width: 300px;
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .youtube-player-container {
        width: 300px !important;
        height: 169px !important;
    }
    
    .youtube-player-container iframe {
        width: 300px !important;
        height: 169px !important;
    }
    
    .youtube-error-clean {
        width: 300px !important;
        height: 169px !important;
    }
}

/* Убираем кнопку закрытия */
.youtube-popup-wrapper .maplibregl-popup-close-button {
    display: none !important;
}
/* YouTube маркеры */
.youtube-marker {
    background: #ff0000;
    border: 2px solid #cc0000;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.youtube-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.youtube-marker.featured {
    animation: pulse 2s infinite;
    background: linear-gradient(45deg, #ff0000, #ff4444);
    border-color: #ffaa00;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}
