:root {
    --primary-color: #144e59;
    --secondary-color: #e2ff64;
    --background: #dddddd;
}

.loader-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 10px;
}
.loader-text {
    font-family: 'Poppins', sans-serif;
    color: #333;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


header {
    background-color: var(--primary-color);
}

hr {
    border: none;
    height: 1px;
    /* Altezza della linea */
    background-color: var(--primary-color);
    /* Colore di sfondo */
}


.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
}

footer {
    color: white;
    background-color: var(--primary-color);
    clear: both;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto;
    height: fit-content;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 8pt;
}

.footer-container p {
    margin: 0;
    /* Rimuove il margine predefinito del paragrafo */
}

.footer-container a {
    margin-left: 10px;
    /* Aggiunge uno spazio tra il testo e l'immagine */
}

.CC {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 3px;
    font-size: small;
    font-style: oblique;
    /* height: 15px; */
}

#mainDocument {
    height: 100vh;

    /* SemiBold */
    background-color: var(--background);
    margin: 0;
    max-width: 100vw;
    overflow-y: hidden;
}
#mainFonti {
    height: 100vh;

    /* SemiBold */
    background-color: var(--background);
    margin: 0;
    max-width: 100vw;
    overflow-y: hidden;
}
#mainOfferte {
    height: 100vh;

    /* SemiBold */
    background-color: var(--background);
    margin: 0;
    max-width: 100vw;
    overflow-y: hidden;
}
#mainSondaggi {
    height: 100vh;

    /* SemiBold */
    background-color: var(--background);
    margin: 0;
    max-width: 100vw;
    overflow-y: hidden;
}
body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    margin: 0;
}

.main-height {
    display: flex;
    height: 100%;
    width: 100%;

}

iframe {
    overflow-y: scroll;
}

.section-height {
    height: 100%;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--primary-color);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

nav li {
    float: left;
}

nav li a {
    display: block;
    color: white;
    text-align: center;
    padding: 7px 7px;
    text-decoration: none;
    font-size: 10pt;
}

nav li a:hover {
    background-color: var(--secondary-color);
    color: black;
}

th {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--primary-color);
    color: white;
    font-size: 10pt;


}

table,
th,
td {
    border: 1px solid white;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    text-align: left;
}

td {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 9pt;
    /* normal */
}

.no-border {
    border: none;
    background-color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    /* SemiBold */
    color: white;

}

.no-border-horizontal {
    border-bottom: none;
    border-top: none;
    background-color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    /* SemiBold */
    color: white;


}

.no-border-bottom {
    border-bottom: none;
    background-color: var(--primary-color);
    color: white;

}

.border-top {
    border-top: 1px solid white;
}

.header-row {
    background-color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    /* SemiBold */
    color: white;

}

.button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
}

.button:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.title {
    margin-left: 15px;
}

.selected {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.description {
    font-size: smaller;
    padding-top: 1px;
    padding-bottom: 0px;
    padding-left: 15px;
    padding-right: 15px;
    overflow-y: hidden;
}

.button-desc-container{
    display: flex; 
    flex-direction: column; 
    align-items: start;
    gap: 0.5rem;
}

.button-desc-container p{
    margin-bottom: 0;
}

.italic {
    font-style: italic;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
} 

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    min-width: 8vw;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table .description-cell {
    min-width: 30vw;
    border-bottom: none;
}

.data-table .link-cell{
    max-width: 15vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

}

.container #loading {
    align-self: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

#mainFrame-sondaggi {
    will-change: contents;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.girafe,
.ggiraph-svg {
    contain: layout style paint;
    transform: translateZ(0);
}

/* Tooltip specific styles */
.custom-tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    z-index: 1000;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    width: 8vw;
    word-wrap: break-word;
}

.custom-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

.custom-tooltip.show {
    opacity: 1;
}

.data-table th.trimmed {
    cursor: help;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#bibliotecheContainer .data-table th{
    white-space: nowrap;
}

@media (max-width: 768px) {
    .ggiraph-svg {
        pointer-events: none !important;
    }
    
    .girafe * {
        animation: none !important;
        transition: none !important;
    }
}
