/**
 * Pochven Map Features CSS
 *
 * Styles for Pochven-specific map features including heatmap colors,
 * indicator icons, and Thera connection highlighting.
 *
 * @package Eve_Weather
 * @since 1.3.0
 */

/* ============================================
   DANGER HEATMAP COLORS
   ============================================ */

/* High danger - intense red */
.leaflet-marker-icon.danger-high {
    filter: drop-shadow(0 0 15px rgba(255, 50, 50, 1)) drop-shadow(0 0 25px rgba(255, 0, 0, 0.8)) !important;
}

.leaflet-marker-icon.danger-high .number {
    background: rgba(200, 30, 30, 0.9) !important;
    border: 2px solid #ff4444 !important;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.8);
}

.leaflet-marker-icon.danger-high::before {
    content: '⚠️';
    position: absolute;
    top: -26px;
    left: -20px;
    font-size: 14px;
    animation: pulse-danger 1s infinite;
    z-index: 998;
}

/* Medium danger - orange */
.leaflet-marker-icon.danger-medium {
    filter: drop-shadow(0 0 12px rgba(255, 165, 0, 0.9)) drop-shadow(0 0 20px rgba(255, 140, 0, 0.6)) !important;
}

.leaflet-marker-icon.danger-medium .number {
    background: rgba(180, 100, 20, 0.9) !important;
    border: 2px solid #ffa500 !important;
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.7);
}

/* Low danger - yellow */
.leaflet-marker-icon.danger-low {
    filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.7)) drop-shadow(0 0 15px rgba(200, 200, 50, 0.5)) !important;
}

.leaflet-marker-icon.danger-low .number {
    background: rgba(120, 120, 30, 0.9) !important;
    border: 2px solid #cccc00 !important;
}

/* No danger - safe green tint */
.leaflet-marker-icon.danger-none {
    filter: drop-shadow(0 0 5px rgba(50, 200, 100, 0.5)) !important;
}

.leaflet-marker-icon.danger-none .number {
    background: rgba(30, 80, 50, 0.9) !important;
    border: 2px solid #44aa66 !important;
}

/* ============================================
   INDICATOR ICONS
   ============================================ */

/* Common indicator badge styling */
.eve-pod-warning,
.eve-ratting-indicator,
.eve-value-indicator,
.eve-thera-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 25, 0.9);
    border: 1px solid rgba(100, 150, 200, 0.5);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: help;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Pod kill warning (skull) */
.eve-pod-warning {
    position: absolute;
    top: -24px;
    right: -12px;
    font-size: 12px;
    animation: shake 0.5s infinite;
    border-color: rgba(255, 100, 100, 0.7);
    background: rgba(50, 10, 10, 0.9);
}

/* NPC ratting indicator */
.eve-ratting-indicator {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    border-color: rgba(100, 200, 100, 0.7);
    background: rgba(10, 40, 20, 0.9);
}

/* ISK value indicator */
.eve-value-indicator {
    position: absolute;
    top: -22px;
    left: -18px;
    font-size: 11px;
    border-color: rgba(255, 215, 0, 0.7);
    background: rgba(50, 40, 10, 0.9);
}

/* Thera connection indicator */
.eve-thera-indicator {
    position: absolute;
    bottom: -22px;
    right: -18px;
    font-size: 11px;
    width: 28px;
    border-radius: 12px;
    animation: glow-thera 2s infinite alternate;
    border-color: rgba(100, 200, 255, 0.8);
    background: rgba(10, 30, 50, 0.9);
}

/* Thera connection glow effect on marker */
.leaflet-marker-icon.has-thera-connection {
    filter: drop-shadow(0 0 10px rgba(100, 200, 255, 0.8)) !important;
}

/* Kill count in tooltip */
.eve-kill-count {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 0.9em;
}

/* ============================================
   THERA INFO PANEL (Sidebar)
/* ============================================
   THERA CONNECTION PANEL (Compact + Mobile Responsive)
   ============================================ */

.eve-thera-panel {
    background: rgba(50, 100, 150, 0.2);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 10px;
}

.eve-thera-panel h5 {
    color: #7dd3fc;
    margin: 0 0 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(100, 200, 255, 0.2);
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eve-thera-panel h5::before {
    content: '🌀';
    font-size: 11px;
}

.eve-thera-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 120px;
    overflow-y: auto;
}

.eve-thera-panel li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.eve-thera-panel li:last-child {
    border-bottom: none;
}

.eve-thera-panel .badge {
    display: inline-block;
    padding: 1px 5px;
    background: rgba(100, 200, 255, 0.2);
    border-radius: 3px;
    font-size: 9px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* No connections message */
.eve-no-connections {
    color: #94a3b8;
    font-size: 11px;
    margin: 4px 0;
    font-style: italic;
}

.eve-thera-count {
    color: #7dd3fc;
    font-size: 10px;
    margin: 0;
}

/* Floating panel (when no sidebar active) */
#map .eve-thera-panel {
    position: absolute;
    bottom: 15px;
    left: 50px;
    z-index: 1000;
    max-width: 220px;
    min-width: 160px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .eve-thera-panel {
        padding: 6px 8px;
        margin-top: 8px;
    }

    .eve-thera-panel h5 {
        font-size: 11px;
        margin-bottom: 4px;
        padding-bottom: 4px;
    }

    .eve-thera-panel ul {
        max-height: 80px;
    }

    .eve-thera-panel li {
        padding: 3px 0;
        font-size: 10px;
    }

    .eve-thera-panel .badge {
        font-size: 8px;
        padding: 1px 4px;
    }

    #map .eve-thera-panel {
        left: 10px;
        bottom: 10px;
        max-width: 180px;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    #map .eve-thera-panel {
        left: 5px;
        right: 5px;
        bottom: 5px;
        max-width: none;
        min-width: auto;
    }

    .eve-thera-panel ul {
        max-height: 60px;
    }
}


/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse-danger {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

@keyframes glow-thera {
    0% {
        filter: drop-shadow(0 0 2px rgba(100, 200, 255, 0.5));
    }

    100% {
        filter: drop-shadow(0 0 8px rgba(100, 200, 255, 1));
    }
}

/* ============================================
   LEGEND ADDITIONS
   ============================================ */

.eve-map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(20, 30, 50, 0.9);
    border: 1px solid rgba(100, 200, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    font-size: 11px;
    color: #94a3b8;
}

.eve-map-legend h6 {
    margin: 0 0 8px 0;
    color: #e2e8f0;
    font-size: 12px;
}

.eve-map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.eve-map-legend-icon {
    width: 20px;
    text-align: center;
}