/**
 * radarStyles.css
 * Estilos para marcadores e alertas de radar
 */

/* ============================================
   MARCADOR DE RADAR NO MAPA
   ============================================ */

.radar-marker-container {
    z-index: 500 !important;
}

.radar-marker {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 3px solid #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                0 0 0 2px rgba(255, 0, 0, 0.2);
    animation: radar-pulse 2s ease-in-out infinite;
}

.radar-marker-inner {
    width: 26px;
    height: 26px;
    background: #fff;
    border: 2.5px solid #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-speed {
    color: #000;
    font-weight: 800;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    line-height: 1;
}

@keyframes radar-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                    0 0 0 2px rgba(255, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 0, 0, 0.4),
                    0 0 0 4px rgba(255, 0, 0, 0.15);
    }
}

/* ============================================
   ALERTA DE RADAR (FLUTUANTE)
   ============================================ */

.radar-alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.radar-alert.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.radar-alert.warning {
    border-color: #ffaa00;
    background: rgba(40, 30, 0, 0.95);
}

.radar-alert.danger {
    border-color: #ff0000;
    background: rgba(40, 0, 0, 0.95);
    animation: radar-alert-flash 0.5s ease-in-out infinite;
}

@keyframes radar-alert-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.radar-alert-icon {
    font-size: 28px;
    line-height: 1;
}

.radar-alert-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radar-alert-speed {
    font-size: 22px;
    font-weight: 700;
    color: #ff3b3b;
    line-height: 1;
}

.radar-alert.warning .radar-alert-speed {
    color: #ffaa00;
}

.radar-alert-dist {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

/* ============================================
   LOADING INDICATOR
   ============================================ */

.radar-loading {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    display: none;
}

.radar-loading.show {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radar-loading::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SEARCH ENGINE - BADGES DE PRECISÃO
   ============================================ */

.gps-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.gps-result-badge.exact {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.gps-result-badge.interpolated {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

/* Tooltip para badges */
.gps-result-badge[title] {
    cursor: help;
}

/* Loading melhorado para busca */
.gps-search-loading {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gps-search-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4285F4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
