/**
 * Dojos Map Styles
 */

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Map container */
#dojos-map {
    height: 600px;
    border-radius: 0.5rem;
    z-index: 1;
}

/* Dojos list sidebar */
#dojos-list {
    max-height: 600px;
    overflow-y: auto;
}

/* Dojo list item hover effect */
.dojo-list-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dojo-list-item:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
}

.dojo-list-item.active {
    background-color: #e7f1ff;
    border-left-color: #0d6efd;
    font-weight: 500;
}

/* Leaflet popup customization - ULTRA COMPACT */
.leaflet-popup-content-wrapper {
    border-radius: 0.375rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 180px;
    max-width: 220px;
    max-height: 320px;
    overflow-y: auto;
}

/* Dojo popup content - MINIMAL */
.dojo-popup-content {
    padding: 0.4rem;
}

.dojo-popup-photo {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-bottom: 0.4rem;
}

.dojo-popup-content h6 {
    font-size: 0.85rem;
    color: #212529;
    margin-bottom: 0.3rem;
    line-height: 1.1;
    font-weight: 600;
}

.dojo-popup-content p {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
    color: #6c757d;
    line-height: 1.2;
}

.dojo-popup-content p i {
    font-size: 0.65rem;
    width: 12px;
    text-align: center;
}

.dojo-popup-content a {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.7rem;
}

.dojo-popup-content a:hover {
    text-decoration: underline;
}

.dojo-popup-content .btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.4rem;
    line-height: 1.2;
}

/* Leaflet popup close button - Excentré en haut à droite */
.leaflet-popup-close-button {
    display: block !important;
    position: absolute;
    top: -8px !important;
    right: -8px !important;
    padding: 6px 10px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    font-size: 20px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    width: 28px;
    height: 28px;
    text-align: center;
}

.leaflet-popup-close-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-close-button span {
    display: block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 16px;
}

/* Custom scrollbar for popup */
.leaflet-popup-content::-webkit-scrollbar {
    width: 4px;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Scrollbar styling for dojo list */
#dojos-list::-webkit-scrollbar {
    width: 8px;
}

#dojos-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#dojos-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#dojos-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    #dojos-list {
        max-height: 300px;
    }

    #dojos-map {
        height: 400px !important;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .leaflet-popup-content {
        max-width: 200px;
        max-height: 280px;
    }
}

@media (max-width: 767.98px) {
    .dojo-popup-content {
        padding: 0.3rem;
    }

    .dojo-popup-photo {
        height: 60px;
    }

    .dojo-popup-content h6 {
        font-size: 0.8rem;
    }

    .dojo-popup-content p {
        font-size: 0.65rem;
    }

    #dojos-map {
        height: 350px !important;
    }

    .leaflet-popup-content {
        max-width: 180px;
        max-height: 250px;
    }

    .dojo-popup-content .btn {
        font-size: 0.65rem;
        padding: 0.25rem 0.3rem;
    }
}

/* Map section spacing */
.map-section {
    background-color: #f8f9fa;
}

/* Card styling */
.card {
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Badge styling */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Icons spacing */
.fas {
    color: #6c757d;
}

/* List group item spacing */
.list-group-item h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
}

.list-group-item small {
    font-size: 0.8rem;
}

/* Loading state (optional) */
.map-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px;
    background-color: #f8f9fa;
}

.map-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}
