/* CSS AOP-helpFinder network */
/* Thomas Jaylet - Universite Paris Cite, INSERM UMRS-1124 */



/* ------ Banière avec nom AOP-helpFinder ------ */

.top-banner {
    background-color: #0c1a3c;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
}


/* ------ Réseau ------ */
#cy {
    z-index: 1;
    position: relative;
    flex-grow: 1;
    width: 100%;
    overflow: auto;
    border: 2px solid gray;
    height: auto;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
/*----------------------------------------------*/


/* ------ Hamburger + volet au clic ------ */
.sidebar label,
.sidebar select,
.sidebar input[type="number"],
.sidebar button {
    display: block;
    margin: 0 auto;
    text-align: center;
}


.sidebar select,
.sidebar input[type="number"] {
    width: 50%;
    margin: 0 auto; 
    pointer-events: auto;
}


.filter-title,
.network-layout,
.network-statistics,
.network-enrichment {
    text-align: left;
    color: #FFA500;
    text-decoration: underline;
    margin-left: 15px;
    padding-top: 10px;
    padding-bottom: 5px;
    font-size: 1.2em; 
}

.sidebar .form-group label,
.sidebar .form-group select,
.sidebar .form-group input,
.sidebar button {
    font-size: 0.9em;
}


.filter-section,
.layout-section {
    margin-bottom: 20px; 
}

/*----------------------------------------------*/



/* ------ Save_data + volet au clic ------ */
.saved_bar_title {
    text-align: left;
    color: #FFA500;
    text-decoration: underline;
    margin-left: 15px;
    padding-top: 10px;
    padding-bottom: 5px;
    font-size: 1.2em; 
}

.saved_bar .form-group:first-child {
    margin-top: 0;
}


#saved_bar #downloadImage,
#saved_bar #downloadImageSVG,
#saved_bar #DownloadTSV,
#sidebar #statistics,
#sidebar #aopWikiButton,
#sidebar #UniprotButton,
#sidebar #KEGGButton,
#sidebar #ReactomeButton,
#sidebar #WikiPathwaysButton,
#sidebar #DisGeNETButton,
#sidebar #DISEASESButton,
#sidebar #HPAButton {
    display: block;
    background-color: white;
    color: black;
    text-align: center;
    width: 50%;
    margin: 0 auto;
    font-size: 0.9em;
}

#sidebar #aopWikiButton,
#sidebar #UniprotButton,
#sidebar #KEGGButton,
#sidebar #ReactomeButton,
#sidebar #WikiPathwaysButton,
#sidebar #DisGeNETButton,
#sidebar #DISEASESButton,
#sidebar #HPAButton {
    margin: 10px auto;
}
/*----------------------------------------------*/

.indent {
    margin-left: 20px;
}



/* ------ Legendes + volet au clic ------ */
.legend_title{
    text-align: left;
    color: #FFA500;
    text-decoration: underline;
    margin-left: 15px;
    padding-top: 10px;
    padding-bottom: 5px;
    font-size: 1.2em; 
}


#legend-sidebar .section-title {
    display: block; 
    text-align: left;
    color: #FFA500;
    margin-left: 15px;
    margin-top: 20px;
    font-size: 1em;
}


.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    text-align: left;
    color: #FFA500;
    margin-left: 30px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 0.8em;
}

.legend-icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;  /* Forme ronde pour les noeuds */
    margin-right: 5px;
}

/* Existing nodes */
#event-node {
    background-color: #FFD700;
}

#stressor-node {
    background-color: #FF4500;
}

/* New nodes */
#aopWiki-node {
    background-color: #808000;
    width: 15px;
    height: 10px;
    border-radius: 0; /* Rectangle */
}

#uniprot-node, #kegg-node, #reactome-node, #wikipathways-node {
    width: 0;
    height: 0;
    border-left: 7.5px solid transparent;
    border-right: 7.5px solid transparent;
    border-bottom: 15px solid;
    border-radius: 0; /* Rectangle */
}

#uniprot-node {
    border-bottom-color: #77B5FE; /* Uniprot triangle color */
}

#kegg-node {
    border-bottom-color: blue; /* KEGG triangle color */
}

#reactome-node {
    border-bottom-color: yellow; /* reactome triangle color */
}

#wikipathways-node {
    border-bottom-color: orange; /* wikipathways triangle color */
}

#disgenet-node, #diseases-node {
    width: 15px;
    height: 15px;
    background-color: #DC143C; /* Color for DisGeNET */
    transform: rotate(45deg); /* Diamond */
    border-radius: 0; /* Ensure it's not rounded */
}

#diseases-node {
    background-color: magenta; /* Color for DISEASES */
}



/* Pour l'arête de confiance, forme de tiret */
.legend-edge {
    display: inline-block;
    width: 20px;
    height: 4px;
    border-radius: 0;
    margin-right: 5px;
}
/*----------------------------------------------*/







/* ------ Gerer les volets des differents boutons de la navbar ------ */
.sidebar,
.saved_bar,
.legend-sidebar {
    position: absolute;
    z-index: 10;
    top: 47px;
    right: 0;
    width: 0;
    height: 100%;
    border-bottom-right-radius: 10px; 
    max-height: 100%; 
    overflow-x: hidden;
    transition: width 0.5s;
    background-color: #0c1a3c;
    color: #fda500 
    
}
.sidebar .form-group,
.saved_bar .form-group,
.legend-sidebar .form-group {
    margin-top: 20px;
}


.sidebar,
.saved_bar,
.legend-sidebar {
    overflow-y: auto;
    max-height: 100vh;
}



/*----------------------------------------------*/ 



/* ------ Noeuds + edges du réseau ------ */


#event-node {
    background-color: #708090;
}

#stressor-node {
    background-color: purple;
}

#confidence-edge-1 {
    background-color: #F09E45;
}

#confidence-edge-2 {
    background-color: #F5C664;
}

#confidence-edge-3 {
    background-color: #E9F5A3;
}

#confidence-edge-4 {
    background-color: #9ECD6E;
}

#confidence-edge-5 {
    background-color: #489657;
}

#edge-size {
    background-color: #C4C6C6;
}

.save_data, .legend-toggle, .delete-selected, .undo, .fullscreen-toggle, .reset-toggle, .zoom-in, .zoom-out, .hamburger, .help-toggle {
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0c1a3c;
    width: 30px;
    height: 30px;
    display: inline-block;
    text-indent: -9999px;
    overflow: hidden;
    border: none;
    padding: 0;

  }

.save_data {
    background-image: url('../includes/img/network_img/Save.png');
  }
  

.legend-toggle {
    background-image: url('../includes/img/network_img/Legend.png');
  }
  

.delete-selected {
    background-image: url('../includes/img/network_img/Delete.png');
  }
  
.undo {
    background-image: url('../includes/img/network_img/test.png');
  }



  .fullscreen-toggle {
    background-image: url('../includes/img/network_img/Full_screen.png');
  }


 .reset-toggle {
    background-image: url('../includes/img/network_img/Reset.png');
  }


 .zoom-in{
    background-image: url('../includes/img/network_img/Zoom_in.png');
  }


 .zoom-out {
    background-image: url('../includes/img/network_img/Zoom_out.png');
  }


  .hamburger {
    background-image: url('../includes/img/network_img/Hamburger.png');
  }

  
.help-toggle {
    background-image: url('../includes/img/network_img/Help.png');
  }





  

.main-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    height: 80vh;
    margin: 20px auto;
    max-width: 1400px;
    gap: 20px;
}


.right-container {
    flex: 3; /* Prend 30% de l'espace disponible */
    border-radius: 10px;
    height: auto;
    position: relative;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 20px auto;
    width: 100%;
    overflow: hidden;
}


/* ------ Contient la navbar et le cy ------ */

.network-container {
    flex: 7; /* Prend 70% de l'espace disponible */
    position: relative;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    height: auto;
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;

}
/*----------------------------------------------*/







.data_bar-header {
    height: 47px;
    min-height: 47px;
    background-color: #0c1a3c;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    display: none;
    overflow: hidden;
}


#data-header-title {
    font-size: 1em;
    color: #FFA500;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    width: 100%;
    margin: 0;
}


.data_bar-content {
    width: 100%;
    overflow-x: auto; 
    overflow-y: auto;
}



.table th,
.table td {
    padding: 5px;
    border: 1px solid #dddddd;
}

.table th {
    background-color: #f2f2f2;
    text-align: center;
    vertical-align: middle;
    padding: 10px 0;
}


.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}


.table tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.table tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.data_bar-header {
    position: relative;
}



.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    padding: 0;
    border: none;
    background-color: #0c1a3c; 
    color: #FFFFFF;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}





/* ------ Barre au dessus du réseau ------ */
.navbar {
    min-height: 40px;
    background-color: #0c1a3c;
    display: flex;
    flex-wrap: nowrap;
    align-items: center; 
    padding: 0 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    justify-content: space-around;
    overflow-x: auto;
}




/* Style pour le popup */
.help-popup {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2;
}

.help-popup-content {
    position: relative;
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    height: 70%;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 0;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}





/*NEW */
#Node-RightClick-Menu {
    position: absolute;
    background-color: #0c1a3c;
    min-width: 100px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
    display: none;
    z-index: 1000;
}
#Node-RightClick-Menu div {
    padding: 4px;
    cursor: pointer;
    color: #fda500;
    border-radius: 4px;
}
#Node-RightClick-Menu div:hover {
    background-color: #fda500;
    color: #0c1a3c;
}

#Nodeapopto-RightClick-Menu div.disabled {
    color: #ccc;
    cursor: not-allowed;
}

#Node-RightClick-Menu div:hover:not(.disabled) {
    background-color: #f1f1f1;
}





.enrichment-group {
    display: flex;
    flex-direction: column;
}

.network-enrichment {
    margin-bottom: 5px;
}

.checkbox-aopwiki {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
}


.checkbox-aopwiki label {
    margin: 0;
    display: inline-block;
}


.bstyle {
    display: block;
    background-color: #0c1a3c;
    color: #fda500;
    border: none;
    text-align: center;
    width: 50%;
    margin: 0 auto;
    font-size: 0.9em;
    border-radius: 10px;
    padding: 5px 5px;
}


.bstyle:disabled {
    background-color: #cccccc; 
    color: #666666;
}



.button-label {
    color: #fda500;
    text-align: center;
    text-decoration: underline;
    display: block;
    margin-bottom: 10px;
}







.loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    flex-direction: column;
}

.loading-overlay p {
    font-size: 18px;
    color: #0c1a3c;
    font-style: italic;
    margin-top: 20px;
}

.spinner {
    border: 8px solid #0c1a3c; 
    border-top: 8px solid #fda500;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-note {
    font-size: 0.700rem !important;
    color: #666666 !important;
    margin-top: 10px !important;
    font-style: italic !important;
    text-align: center !important;
}


