/* ==========================================================================
   Componente: Mapa de Geolocalización Interactivo
   ========================================================================== */

.map-demo-card {
    background: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
    padding: 1rem;
}

.map-window-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-window-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.map-dot.red    { background: #ff5f56; }
.map-dot.yellow { background: #ffbd2e; }
.map-dot.green  { background: #27c93f; }

.map-window-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Área del Mapa */
.map-canvas {
    height: 350px;
    background: radial-gradient(circle at 70% 30%, #17153b, #09090b);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin: 8px;
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), 
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-svg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.map-svg-layer.active {
    opacity: 1;
}

/* Pines de ubicación */
.map-pin-container {
    position: absolute;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.map-pin-container.active {
    opacity: 1;
    pointer-events: auto;
}

.map-pin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 10px currentColor;
    cursor: pointer;
}

.map-pin.purple { background: #651fff; color: #651fff; }
.map-pin.green  { background: #27c93f; color: #27c93f; }
.map-pin.yellow { background: #ffbd2e; color: #ffbd2e; }

/* Tooltips de pedidos */
.map-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.95);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-weight: 600;
}

/* Zonas de Calor (Heatmap) */
.map-heat-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.map-heat-layer.active {
    opacity: 1;
}

.heat-point {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.heat-point.large {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(101, 31, 255, 0.18) 0%, transparent 70%);
}

.heat-point.medium {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
}

/* Radios de Cobertura */
.map-coverage-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.map-coverage-layer.active {
    opacity: 1;
}

.coverage-circle {
    position: absolute;
    border: 1px dashed rgba(101, 31, 255, 0.4);
    background: rgba(101, 31, 255, 0.02);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-coverage 4s infinite linear;
}

@keyframes pulse-coverage {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.7; }
}

/* Botones de Control de Demo */
.map-demo-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1.5rem;
}

.btn-map-control {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.btn-map-control:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.btn-map-control.active {
    background: #651fff !important;
    border-color: #651fff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(101, 31, 255, 0.3) !important;
}
