/* Sanit Sales Map - Frontend Styles */

.sanit-sales-map-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.sanit-sales-map-wrapper {
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sanit-sales-map-svg {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.sanit-sales-map-svg svg {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.sanit-sales-map-svg path {
    fill: #dde4e6;
    stroke: #fff;
    stroke-width: 0.5;
    transition: fill 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.sanit-sales-map-svg path:hover {
    opacity: 0.8;
}

.sanit-sales-map-svg .sanit-sales-country {
    cursor: pointer;
}

/* Zoom Controls */
.sanit-sales-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 100;
}

.sanit-sales-zoom-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s ease;
}

.sanit-sales-zoom-controls button:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* Popup */
.sanit-sales-popup {
    position: absolute;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.sanit-sales-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sanit-sales-popup-header {
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sanit-sales-popup-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.sanit-sales-popup-close {
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sanit-sales-popup-close:hover {
    opacity: 1;
}

.sanit-sales-popup-content {
    padding: 20px;
}

.sanit-sales-popup-betreuer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.sanit-sales-popup-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    flex-shrink: 0;
}

.sanit-sales-popup-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sanit-sales-popup-info strong {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sanit-sales-popup-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.sanit-sales-popup-info a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.sanit-sales-popup-info a:hover {
    text-decoration: underline;
}

.sanit-sales-popup-stats {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.sanit-sales-popup-stat {
    text-align: center;
    flex: 1;
}

.sanit-sales-popup-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.sanit-sales-popup-stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Legend */
.sanit-sales-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #eee;
}

.sanit-sales-legend-title {
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.sanit-sales-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.sanit-sales-legend-item:hover {
    background: #eee;
}

.sanit-sales-legend-item.active {
    border-color: #333;
    background: #fff;
}

.sanit-sales-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sanit-sales-legend-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.sanit-sales-legend-count {
    font-size: 12px;
    color: #888;
    background: #fff;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Map Title */
.sanit-sales-map-title {
    text-align: center;
    padding: 25px 20px 15px;
    background: #fff;
    border-radius: 12px 12px 0 0;
}

.sanit-sales-map-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.sanit-sales-map-title p {
    margin: 8px 0 0;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .sanit-sales-popup {
        width: 280px;
    }

    .sanit-sales-legend {
        justify-content: center;
    }

    .sanit-sales-zoom-controls {
        bottom: 10px;
        right: 10px;
    }

    .sanit-sales-zoom-controls button {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* Loading State */
.sanit-sales-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.sanit-sales-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: sanit-sales-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes sanit-sales-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip on hover */
.sanit-sales-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    z-index: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sanit-sales-tooltip.visible {
    opacity: 1;
}

/* Verbände Section */
.sanit-sales-verbaende {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sanit-sales-verbaende h3 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.sanit-sales-verbaende-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.sanit-sales-verband-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.sanit-sales-verband-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.sanit-sales-verband-betreuer {
    font-size: 14px;
    color: #666;
}
