/**
 * Global Map Module Styles
 */

/* Map container */
#global-map-container {
    background-color: #1a1a2e;
}

/* Custom marker styles */
.global-map-marker {
    background: transparent;
    border: none;
}

/* Pulsing effect for markers */
.global-map-marker-pulse {
    position: relative;
}

.global-map-marker-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: rgba(220, 53, 69, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Crosshair animation */
#global-map-crosshair {
    animation: crosshair-pulse 2s ease-in-out infinite;
}

@keyframes crosshair-pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Search box styling */
#global-map-search .form-control {
    background-color: rgba(30, 30, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

#global-map-search .form-control:focus {
    background-color: rgba(30, 30, 46, 1);
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#global-map-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Instructions styling */
#global-map-instructions {
    font-size: 0.9rem;
    animation: fade-in-up 0.3s ease-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Map location button - for use in journal entries */
.map-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.map-location-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.map-location-btn:active {
    transform: translateY(0);
}

.map-location-btn i {
    font-size: 1rem;
}

/* Small map preview card */
.map-preview-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-preview-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.map-preview-card .map-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
}

.map-preview-card .map-preview-coords {
    color: white;
    font-size: 0.75rem;
    font-family: monospace;
}

.map-preview-card .map-preview-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc3545;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.map-preview-card:hover .map-preview-icon {
    opacity: 1;
}

/* Coordinates display badge */
.coords-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background-color: rgba(108, 117, 125, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Journal location section */
.journal-location-section {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
}

.journal-location-section .location-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #dc3545;
    font-weight: 600;
}

/* Leaflet popup customization for dark theme */
#global-map-container .leaflet-popup-content-wrapper {
    background-color: #1e1e2e;
    color: white;
    border-radius: 0.5rem;
}

#global-map-container .leaflet-popup-tip {
    background-color: #1e1e2e;
}

#global-map-container .leaflet-popup-close-button {
    color: white;
}

/* Zoom controls dark theme */
#global-map-container .leaflet-control-zoom a {
    background-color: #1e1e2e;
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

#global-map-container .leaflet-control-zoom a:hover {
    background-color: #2d2d44;
}

/* Attribution dark theme */
#global-map-container .leaflet-control-attribution {
    background-color: rgba(30, 30, 46, 0.8);
    color: rgba(255, 255, 255, 0.6);
}

#global-map-container .leaflet-control-attribution a {
    color: rgba(255, 255, 255, 0.8);
}
