/**
 * Styles for Espace Meunerie Map
 */

.esm-map-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.esm-map-controls {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.esm-filter-buttons {
    display: flex;
    gap: 10px;
}

.esm-filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.esm-filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.esm-filter-btn.esm-active {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.esm-search-box {
    flex: 1;
    max-width: 300px;
}

.esm-search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.esm-search-box input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.esm-direction-controls {
    display: flex;
    justify-content: center;
}

.esm-direction-control-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.esm-direction-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

#esm-map {
    position: relative;
}

.esm-info-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
    width: 100%;
}

.esm-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
    display: block;
}

.esm-info-card.esm-hidden {
    display: none;
}

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

.esm-mobile-overlay.esm-visible {
    display: block;
}

.esm-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esm-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.esm-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.esm-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.esm-card-content {
    padding: 20px;
}

.esm-card-content p {
    margin: 0 0 12px 0;
    line-height: 1.5;
    color: #333;
}

.esm-card-content strong {
    color: #555;
    font-weight: 600;
}

.esm-card-content a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.esm-card-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.esm-card-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.esm-job-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.esm-job-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.esm-direction-btn,
.esm-clear-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.esm-direction-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

.esm-direction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.esm-clear-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.esm-clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Custom scrollbar for info card */
.esm-info-card::-webkit-scrollbar {
    width: 6px;
}

.esm-info-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.esm-info-card::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.esm-info-card::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
    .esm-map-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .esm-filter-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .esm-search-box {
        max-width: 100%;
    }
    
    .esm-info-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        width: 90vw;
        z-index: 10000;
        margin: 0;
    }
    
    .esm-info-card {
        max-height: 70vh;
        width: 100%;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    
    .esm-card-actions {
        flex-direction: column;
    }
    
    .esm-job-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .esm-direction-btn,
    .esm-clear-btn {
        flex: none;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .esm-map-controls {
        padding: 10px;
    }
    
    .esm-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .esm-search-box input {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .esm-direction-control-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .esm-info-panel {
        max-width: 95vw;
        width: 95vw;
    }
    
    .esm-info-card {
        max-height: 80vh;
    }
    
    .esm-card-header {
        padding: 15px;
    }
    
    .esm-card-header h3 {
        font-size: 16px;
    }
    
    .esm-card-content {
        padding: 15px;
    }
    
    .esm-job-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}
