/**
 * Map View Styles
 */

:root {
    --haico-primary: #7FD4A0;
    --haico-dark: #2D5F3F;
    --haico-white: #FFFFFF;
    --haico-shadow: rgba(0, 0, 0, 0.1);
}

/* Map Container */
.haico-dist-map-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
}

#haico-dist-map {
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--haico-shadow);
    z-index: 1;
}

/* Scroll hint overlay */
.haico-map-scroll-hint {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
    border-radius: 8px;
}

.haico-map-scroll-hint.active {
    display: flex;
}

.haico-map-scroll-hint-text {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--haico-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.haico-hint-desktop {
    display: inline;
}

.haico-hint-mobile {
    display: none;
}

@media (max-width: 768px) {
    .haico-hint-desktop {
        display: none;
    }
    
    .haico-hint-mobile {
        display: inline;
    }
}

/* Legend */
.haico-dist-map-legend {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--haico-shadow);
    z-index: 1000;
}

.haico-dist-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.haico-dist-legend-item:last-child {
    margin-bottom: 0;
}

.haico-dist-legend-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.haico-dist-legend-marker-distributor {
    background: #3388ff;
}

.haico-dist-legend-marker-headquarters {
    background: #46b450;
}

/* Side Panel (Desktop) */
.haico-dist-side-panel {
    position: absolute;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px var(--haico-shadow);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.haico-dist-side-panel.active {
    right: 0;
}

.haico-dist-close-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.haico-dist-close-panel:hover {
    color: #000;
}

.haico-dist-panel-content {
    padding: 60px 30px 30px;
}

.haico-dist-panel-logo {
    text-align: center;
    margin-bottom: 20px;
    display: none;
}

.haico-dist-panel-logo.show {
    display: block;
}

.haico-dist-panel-logo img {
    max-width: 200px;
    height: auto;
}

.haico-dist-panel-name {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 20px;
    color: var(--haico-dark);
}

.haico-dist-panel-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.haico-dist-panel-field {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.haico-dist-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--haico-primary);
}

.haico-dist-panel-field > div {
    flex: 1;
    line-height: 1.6;
}

.haico-dist-panel-field a {
    color: var(--haico-primary);
    text-decoration: none;
}

.haico-dist-panel-field a:hover {
    text-decoration: underline;
}

/* Mobile Panel */
@media screen and (max-width: 768px) {
    .haico-dist-side-panel {
        right: auto;
        left: 0;
        bottom: -100%;
        top: auto;
        width: 100%;
        height: auto;
        max-height: 80vh;
        border-radius: 20px 20px 0 0;
        transition: bottom 0.3s ease;
    }
    
    .haico-dist-side-panel.active {
        bottom: 0;
        right: auto;
    }
    
    .haico-dist-panel-content {
        padding: 50px 20px 30px;
    }
}

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

.haico-dist-overlay.active {
    display: block;
}

@media screen and (min-width: 769px) {
    .haico-dist-overlay {
        display: none !important;
    }
}
