body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

.navbar_color {
    color: #0C59CF;
}

.content_color {
    color: #1180F1;
}


/*Labels in Search page*/
.note-label {
    position: relative;
    top: -25px;
    left: 20px;
    width: 150px;
    margin-left: 3px;
    background: white;
    color: #1180F1;
    border: 1px solid #1180F1;
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    padding: 3px;
    box-shadow: 1px 1px 3px #1180F1;
    display: inline-block;
    border-radius: 5px;
    cursor: pointer;
}

/*Inputs in Search page*/
.custom-select-container {
    position: relative;
    width: 300px;
}

.custom-select-input {
    width: 100%;
    padding: 5px 10px;
    box-sizing: border-box;
    border: 1px solid black;
}

.custom-select-input.invalid {
    border-color: red;
    background-color: #ffe6e6;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 4px;
    display: none;
}

.custom-options {
    position: absolute;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    display: none;
}

.custom-options-entity{
    width: 400px;
}

.custom-option {
    padding: 10px;
    cursor: pointer;
}

.custom-option:hover {
    background-color: #f0f0f0;
}
/*End*/

/*Progressive bar in Search page*/
#progressContainer {
  width: 300px;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 1rem;
  display: none;
}

#progressBar {
  height: 20px;
  width: 0%;
  background-color: #0C59CF;
}

/*Dialog in Home page*/
dialog {
    padding: 20px;
    border: none;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.copy-btn {
    background-color: transparent;
    display: inline-block;
    margin-top: 0.6rem; 
    text-align: center;
    position: relative;
    border: none;
    line-height: 2.4rem;
    color: #000000;
    width: auto;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
/*End*/

/*Inputs in browseEntity page*/
.custom-select-input-browse {
    width: 35%;
    padding: 5px 10px;
    box-sizing: border-box;
    border: 1px solid black;
}

/*Background color of the canvas in browseEntity*/
#viz:fullscreen {
  background-color: white !important;
}

/*Blue button*/
.blue-button {
    background-color: #1180F1; 
    color: white; 
    border-color: #1180F1; 
    border-radius: 0.2rem
}

/*Reverse button*/
.reverse-button {
    background-color: #fff; 
    border: 2px solid #1180F1; 
    border-radius: 0.2rem; 
    cursor: pointer; 
    margin-left: 2rem; 
    width: 30px; 
    height: 30px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Celle generali (tabella principale e sottotabelle) */
#rel-table td {
    white-space: pre-wrap;   /* mantieni gli a capo */
    word-break: break-word;  /* evita overflow */
    max-width: 500px;        /* più largo di default */
    padding: 8px 12px;       /* un po' più di spazio interno */
    vertical-align: top;     /* allinea in alto se c'è molto testo */
}

/* Sottotabelle */
#rel-table td table {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    table-layout: fixed;
}
#rel-table td table td {
    border: none;
    max-width: 500px;   
    padding: 4px 8px;
    word-break: break-word;
}

.expandable {
    max-height: 150px;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.3s ease;
}

.expandable.expanded {
    max-height: 500px;       /* altezza quando espanso, abbastanza per mostrare le props */
    overflow: auto;
}

.expandable a:hover {
    text-decoration: underline;
}
/* Sottotabelle per Entity Basics e Properties */
#entity-table td table {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    table-layout: fixed;
}

/* Celle chiave */
#entity-table td table td:first-child {
    border: none;
    padding: 4px 8px;
    max-width: 200px;        /* aumenti qui per chiavi lunghe */
    white-space: nowrap;      /* evita a capo */
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis; /* taglia con "..." se troppo lungo */
}

/* Celle valore */
#entity-table td table td:last-child {
    border: none;
    padding: 4px 8px;
    max-width: 400px;        /* oppure più grande se vuoi */
    word-break: break-word;
    white-space: normal;
}

/* Div espandibile per valori */
#entity-table td table td:last-child .expandable {
    max-height: 100px;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.2s ease;
}

#entity-table td table td:last-child .expandable.expanded {
    max-height: 400px;  /* espande al click */
    overflow: auto;
}
/* Riga sottotabella */
#entity-table td table tr {
    border-bottom: 1px solid #ccc;
}
/* Celle generali tabella incoming relationships */
#incoming-rel-table td {
    white-space: pre-wrap;   
    word-break: break-word;  
    max-width: 500px;        
    padding: 8px 12px;       
    vertical-align: top;     
}

/* Sottotabelle in incoming relationships */
#incoming-rel-table td table {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    table-layout: fixed;
}

#incoming-rel-table td table td {
    border: none;
    max-width: 500px;   
    padding: 4px 8px;
    word-break: break-word;
}

/* Div espandibili per valori delle sottotabelle */
#incoming-rel-table td table td .expandable {
    max-height: 100px;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.2s ease;
}

#incoming-rel-table td table td .expandable.expanded {
    max-height: 400px;
    overflow: auto;
}

/* Riga sottotabella */
#incoming-rel-table td table tr {
    border-bottom: 1px solid #ccc;
}
/* Celle generali tabella incoming relationships */
#incoming-rel-table td {
    white-space: pre-wrap;   
    word-break: break-word;  
    max-width: 500px;        
    padding: 8px 12px;       
    vertical-align: top;     
}

/* Sottotabelle in outgoing relationships */
#outgoing-rel-table td table {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    table-layout: fixed;
}

#outgoing-rel-table td table td {
    border: none;
    max-width: 500px;   
    padding: 4px 8px;
    word-break: break-word;
}

/* Div espandibili per valori delle sottotabelle */
#outgoing-rel-table td table td .expandable {
    max-height: 100px;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.2s ease;
}

#outgoing-rel-table td table td .expandable.expanded {
    max-height: 400px;
    overflow: auto;
}

/* Riga sottotabella */
#outgoing-rel-table td table tr {
    border-bottom: 1px solid #ccc;
}

.scrollable-table {
    max-height: 400px; /* puoi regolare l'altezza */
    overflow-y: auto;
}
#incoming-rel-table td:first-child,
#outgoing-rel-table td:first-child {
    min-width: 150px;   /* maggiore spazio per RNA-KG ID */
    max-width: 200px;   /* evita overflow troppo grande */
    word-break: break-word;  /* consente il wrap se necessario */
}