/* Google Maps Dashboard Styles */
#flightMap {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border-radius: inherit;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garantir que os containers pais também tenham altura total - APENAS para elementos do mapa */
.h-100.map-container {
    height: 100% !important;
    display: block !important;
}

.h-100.map-container .card-body {
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
}

.h-100.map-container .card-body .map {
    flex: 1;
    height: 100% !important;
    min-height: 400px; /* Altura mínima para garantir visibilidade */
    display: block !important;
    position: relative;
}

/* Específico para container do mapa */
.h-100.map-container .card-body.p-0 {
    padding: 0 !important;
    height: 100% !important;
}

.mapbox-container #flightMap {
    min-height: 100% !important;
}

/* Garantir que o container da linha também tenha altura mínima */
.row.g-4.mb-4 {
    min-height: 80vh; /* 80% da altura da viewport */
}

/* Media queries para responsividade - APENAS para container do mapa */
@media (max-width: 575px) {
    /* Mobile: altura menor mas visível */
    .row.g-4.mb-4 {
        min-height: 60vh;
    }
    
    #flightMap {
        height: 400px !important;
        min-height: 400px !important;
    }
    
    .h-100.map-container .card-body .map {
        min-height: 400px !important;
        height: 400px !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    /* Tablet pequeno */
    .row.g-4.mb-4 {
        min-height: 70vh;
    }
    
    #flightMap {
        height: 100% !important;
        min-height: 500px !important;
    }
    
    .h-100.map-container .card-body .map {
        min-height: 500px !important;
    }
}

@media (min-width: 768px) {
    /* Desktop: altura total */
    .row.g-4.mb-4 {
        min-height: 80vh;
    }
    
    #flightMap {
        height: 100% !important;
        min-height: 100% !important;
    }
}

/* Google Maps custom info window */
.gm-style .gm-style-iw-c {
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    max-height: none !important;
}

/* Hide Google Maps controls (we use custom ones) */
.gm-style-cc {
    display: none !important;
}

.gm-bundled-control {
    display: none !important;
}

/* Custom marker styles */
.google-map-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.google-map-marker.marker-1 {
    background-color: #10b981;
}

.google-map-marker.marker-2 {
    background-color: #f59e0b;
}

.google-map-marker.marker-3 {
    background-color: #ef4444;
}

/* Flight path animation */
@keyframes flight-move {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(10px) translateY(-10px);
    }
}

.flight-marker {
    animation: flight-move 3s ease-in-out infinite alternate;
}

/* Dark theme support */
.dark .mapbox-container #flightMap {
    filter: invert(1) hue-rotate(180deg);
}

.dark .mapbox-container #flightMap img {
    filter: invert(1) hue-rotate(180deg);
}

/* Responsive adjustments for map controls */
@media (max-width: 767px) {
    .mapbox-control-btn {
        padding: 0.5rem !important;
    }
    
    .mapbox-control-btn button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* Garantir visibilidade do mapa em mobile - APENAS para container do mapa */
    .col-12.col-lg-8 .card.h-100 {
        margin-bottom: 1rem;
        height: auto !important;
        min-height: 400px !important;
    }
    
    .col-12.col-lg-8 .card.h-100 .card-body {
        height: auto !important;
        min-height: 400px !important;
    }
}

/* Improve visibility of custom controls */
.mapbox-control-btn button {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #374151;
    transition: all 0.2s ease;
}

.mapbox-control-btn button:hover {
    background-color: white;
    border-color: #4f46e5;
    color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark .mapbox-control-btn button {
    background-color: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.dark .mapbox-control-btn button:hover {
    background-color: #1f2937;
    border-color: #6366f1;
    color: #a5b4fc;
}
