/* DmApp Location Maps & Discovery Styles */

/* ===== MAP CONTAINER ===== */

.location-map-container {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 15px 0;
}

.map-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.3s ease;
}

/* ===== MAP GRID ===== */

.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* ===== LOCATION MARKER ===== */

.location-marker {
    position: absolute;
    z-index: 10;
}

@keyframes markerBounce {
    0%, 100% {
        transform: translate(-50%, -100%);
    }
    50% {
        transform: translate(-50%, -110%);
    }
}

.location-marker:hover {
    animation: markerPulse 0.6s ease-in-out infinite !important;
}

@keyframes markerPulse {
    0%, 100% {
        transform: translate(-50%, -100%) scale(1);
    }
    50% {
        transform: translate(-50%, -100%) scale(1.1);
    }
}

/* ===== MAP CONTROLS ===== */

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.map-control-btn {
    width: 35px;
    height: 35px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background: #00FF00;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 255, 0, 0.3);
}

.map-control-btn:active {
    transform: scale(0.95);
}

/* ===== ZOOM INDICATOR ===== */

.map-zoom-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

/* ===== COORDINATES DISPLAY ===== */

.map-coords-display {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

/* ===== NEARBY TEAMS CONTAINER ===== */

.nearby-teams-container {
    padding: 20px;
}

.team-discovery-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #00FF00;
    animation: cardSlideIn 0.5s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.team-discovery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 255, 0, 0.2);
}

.join-team-btn {
    background: linear-gradient(135deg, #00FF00, #00CC00);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.join-team-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.4);
}

.join-team-btn:active {
    transform: scale(0.95);
}

/* ===== LOCATION SHARING INDICATOR ===== */

.location-sharing-active {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00FF00, #00CC00);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.4);
    z-index: 9999;
    animation: shareLocationPulse 2s ease-in-out infinite;
}

@keyframes shareLocationPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 255, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 255, 0, 0.7);
    }
}

/* ===== LIVE LOCATION BADGE ===== */

.live-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    animation: liveBadgePulse 1.5s ease-in-out infinite;
}

.live-location-badge::before {
    content: '🔴';
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes liveBadgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ===== FRIEND LOCATION MARKERS ===== */

.friend-location-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #00FF00;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.4);
    animation: markerAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes markerAppear {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.friend-location-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== DISTANCE INDICATOR ===== */

.distance-indicator {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

/* ===== MAP LOADING ===== */

.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.map-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #00FF00;
    border-radius: 50%;
    animation: mapLoadingSpin 0.8s linear infinite;
}

@keyframes mapLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TEAM CATEGORY BADGE ===== */

.team-category-badge {
    display: inline-block;
    background: rgba(0, 255, 0, 0.1);
    color: #00AA00;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== MEETUP TIME INDICATOR ===== */

.meetup-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 13px;
    margin-top: 8px;
}

/* ===== INTERACTIVE MAP OVERLAY ===== */

.map-interactive-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 255, 0, 0.05) 100%);
}

/* ===== MOBILE OPTIMIZATIONS ===== */

@media (max-width: 768px) {
    .location-map-container {
        height: 250px;
    }
    
    .map-controls {
        gap: 6px;
    }
    
    .map-control-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .team-discovery-card {
        padding: 15px;
    }
    
    .join-team-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .nearby-teams-container {
        padding: 15px;
    }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .location-marker,
    .team-discovery-card,
    .live-location-badge,
    .friend-location-marker {
        animation: none !important;
    }
    
    .map-canvas {
        transition: none !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */

@media (prefers-contrast: high) {
    .location-map-container {
        border: 2px solid currentColor;
    }
    
    .map-control-btn {
        border-width: 3px;
    }
    
    .team-discovery-card {
        border-width: 3px;
    }
}

/* ===== DARK MODE ===== */

@media (prefers-color-scheme: dark) {
    .team-discovery-card {
        background: #2a2a2a;
        color: white;
    }
    
    .map-coords-display > div {
        background: rgba(0, 0, 0, 0.9) !important;
        color: white !important;
    }
    
    .nearby-teams-container h3 {
        color: white !important;
    }
}
