/* Estilos para o modo embed */
.embed-mode {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.embed-mode .embed-container {
    height: 100vh;
    width: 100vw;
    padding: 0;
    margin: 0;
}

.embed-mode .embed-map-full-height {
    height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.embed-mode .map-card {
    height: 100vh !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.embed-mode .map-content {
    height: calc(100vh - 60px) !important;
}

.embed-mode .map-header {
    height: 60px !important;
    min-height: 60px !important;
    padding: 10px 15px !important;
}

.embed-mode .map-canvas {
    height: 100% !important;
}

.embed-mode .map-sidebar {
    height: 100% !important;
    overflow-y: auto !important;
}

/* Ocultar elementos desnecessários no modo embed */
.embed-mode .nav-tabs,
.embed-mode .page-header {
    display: none !important;
}

/* Ajustar o container principal no modo embed */
.embed-mode .main-container {
    height: 100vh !important;
    width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
}

.embed-mode .content-area {
    height: 100vh !important;
    width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Garantir que o mapa ocupe toda a altura disponível */
.embed-mode #selectedMapContainer {
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ajustar scrollbars no modo embed */
.embed-mode .map-sidebar::-webkit-scrollbar {
    width: 6px;
}

.embed-mode .map-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.embed-mode .map-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.embed-mode .map-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsividade para mobile - ajustar layout para telas pequenas */
@media (max-width: 768px) {
    .embed-mode .map-layout {
        flex-direction: column !important;
        height: 100% !important;
    }
    
    .embed-mode .map-display-container {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .embed-mode .map-content {
        flex: 1 !important; /* Ocupa todo o espaço disponível menos a sidebar */
        min-height: 0 !important; /* Permite que o flex funcione corretamente */
        height: auto !important;
    }
    
    .embed-mode .map-container {
        height: 100% !important;
    }
    
    .embed-mode .map-canvas {
        height: 100% !important;
    }
    
    .embed-mode .map-sidebar {
        height: 150px !important; /* Altura fixa menor para a sidebar */
        width: 100% !important;
        min-width: auto !important;
        border-left: none !important;
        border-top: 1px solid #dee2e6 !important;
        overflow-y: auto !important;
        flex-shrink: 0 !important; /* Não permite que a sidebar encolha */
    }
    
    .embed-mode .sidebar-section {
        padding: 6px !important; /* Reduzido ainda mais */
    }
    
    .embed-mode .sidebar-section h4 {
        font-size: 12px !important; /* Reduzido ainda mais */
        margin-bottom: 4px !important; /* Reduzido ainda mais */
    }
    
    .embed-mode .attribute-item {
        padding: 2px 0 !important; /* Reduzido ainda mais */
        font-size: 10px !important; /* Reduzido ainda mais */
    }
    
    .embed-mode .legend-item {
        padding: 2px 0 !important; /* Reduzido ainda mais */
        font-size: 10px !important; /* Reduzido ainda mais */
    }
    
    .embed-mode .search-controls .form-group {
        margin-bottom: 4px !important; /* Reduzido ainda mais */
    }
    
    .embed-mode .search-controls input,
    .embed-mode .search-controls select {
        font-size: 12px !important; /* Reduzido ainda mais */
        padding: 4px 5px !important; /* Reduzido ainda mais */
    }
    
    /* Garantir que o container principal use toda a altura */
    .embed-mode .main-container,
    .embed-mode .content-area,
    .embed-mode #selectedMapContainer {
        height: 100% !important;
        min-height: 100% !important;
    }
    
    /* Remover margens e paddings que podem causar espaços em branco */
    .embed-mode .filters {
        margin: 0 !important;
        padding: 5px !important;
    }
    
    .embed-mode .map-header {
        padding: 5px 10px !important;
        height: auto !important;
        min-height: auto !important;
    }
}

