/* Контейнер карты */
.yml-map-container {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

/* Панель управления */
.yml-controls {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.yml-controls h4 {
    margin: 0 0 15px 0;
    color: white;
    font-weight: 600;
}

/* Поиск */
.yml-search-container {
    display: flex;
    margin-bottom: 20px;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.yml-search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.yml-search-input::placeholder {
    color: #999;
}

.yml-search-button {
    padding: 12px 20px;
    background: #2196F3;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.yml-search-button:hover {
    background: #1976D2;
}

.yml-search-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Сетка категорий */
.yml-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Карточки категорий */
.yml-category-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.yml-category-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.yml-category-card.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.yml-category-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.yml-category-icon img {
    width: 24px;
    height: 24px;
    object-fit: cover;
}

.yml-category-icon .dashicons {
    font-size: 24px;
    color: white;
}

.yml-category-info {
    flex: 1;
}

.yml-category-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.yml-category-count {
    font-size: 14px;
    opacity: 0.8;
}

/* Информация о результатах */
.yml-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.9;
}

.yml-reset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.yml-reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Карта */
.yml-map {
    height: calc(100% - 200px);
    min-height: 300px;
    position: relative;
}

/* Индикатор загрузки */
.yml-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.yml-loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.yml-loading span {
    font-size: 14px;
    color: #666;
}

/* Всплывающие подсказки меток */
.yml-balloon {
    max-width: 300px;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.yml-balloon-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
}

.yml-balloon-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.yml-balloon-body {
    padding: 15px;
    background: white;
}

.yml-balloon-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 8px;
}

.yml-balloon-description {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.4;
}

.yml-balloon-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.yml-balloon-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.yml-balloon-info-item .dashicons {
    font-size: 16px;
    color: #2196F3;
}

.yml-balloon-phone {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.yml-balloon-phone:hover {
    text-decoration: underline;
}

.yml-balloon-hours {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 6px;
    margin-top: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .yml-controls {
        padding: 15px;
    }
    
    .yml-categories-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .yml-category-card {
        padding: 12px;
    }
    
    .yml-category-icon {
        width: 40px;
        height: 40px;
    }
    
    .yml-results-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .yml-map {
        height: calc(100% - 250px);
    }
}

@media (max-width: 480px) {
    .yml-search-container {
        margin-bottom: 15px;
    }
    
    .yml-search-input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .yml-search-button {
        padding: 10px 15px;
    }
    
    .yml-balloon {
        max-width: 250px;
    }
}