/* ==========================================================================
   LayoutCharts.css
   - root: Some fast and quick optical changes (often use)
   - structure chart-wrapper, chart-header, chart-box, icon, toool-tipps
   ========================================================================== */
:root {
    /* Header */
    --chart-header-bg: #e7e7e7;
    --chart-header-text: #000;
    --chart-header-font-size: 20px;     /* Fonts size */
    --chart-header-font-weight: bold;       /* Fonts weight */

    /* Box */
    --chart-box-bg: #fff;
    --chart-box-border-color: #e7e7e7;
    --chart-box-border: 1px solid var(--chart-box-border-color);
    --chart-box-padding: 10px;


    /* Info-Icon or Tooltip */
    --info-icon-bg: transparent;
    --info-icon-border: #6b6b6b;
    --info-icon-color: #6b6b6b;
    --info-tooltip-bg: #FFF9C4;
    --info-tooltip-color: #000;
    --info-tooltip-width: 250px;

    /* Dashboard */
    --dashboard-tile-height: 300px;
    --dashboard-gap: 5px;

    /* Flex/Vertical chart boxes */
    --chart-gap: 20px;
    --chart-box-vertical-gap: 30px;

    /* Wordcloud */
    --wordcloud-height: 600px;
}

/* ------------------- Basic structure of Chart-Wrapper*/
.chart-wrapper {
    margin-bottom: 25px;
    width: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--chart-header-bg);
    color: var(--chart-header-text);
    font-weight: var(--chart-header-font-weight);
    padding: 8px 12px;
    font-size: var(--chart-header-font-size);
    border: var(--chart-box-border);
    /*border-bottom: none;*/
    border-radius: 0;
}

.chart-title {
    flex: 1;
}

.chart-box {
    border: var(--chart-box-border);
    border-top: none;
    border-radius: 0;
    padding: var(--chart-box-padding);
    background: var(--chart-box-bg);
    width: 100%;
    height: auto;
    box-sizing: border-box;

}

/* -------------------------- Intro Box */
.chart-box.intro-box {
    font-size: 18px !important;
    border-top: var(--chart-box-border);
}

/*-----------------------  Chart Layouts: Flex / Vertikal */
/* Open Access and Jounals*/
.chart-box-inner-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--chart-gap);
}

.chart-box-inner-flex > div {
    flex: 0 0 45%;
    width: auto;
    height: 400px;
    max-width: 450px;
}

/*-------------- Top 10 Bar*/
.chart-box-vertical {
    display: flex;
    flex-direction: column;
    gap: var(--chart-box-vertical-gap);
}

.chart-box-vertical > div {
    width: 100%;
    height: 400px;
    padding: 10px;
    border: var(--chart-box-border);
    background: var(--chart-box-bg);
    box-sizing: border-box;
    overflow: hidden;
}

.chart-box-vertical > div .js-plotly-plot {
    width: 100% !important;
    height: 100% !important;
}

/*-------------------------  Wordcloud Chart */
#wordcloud {
    width: 100% !important;
    max-width: 100% !important;
    height: var(--wordcloud-height);
    /*margin-bottom: 10px;*/
    /*margin-top: 30px;*/
}
/* wordcloud svg button setting*/
#wordcloud .wordcloud-download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#wordcloud:hover .wordcloud-download-btn {
    opacity: 1;
}

#researchGroupChord{
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* --------------------------- Info-Icon + Tooltip */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--info-icon-border);
    background-color: var(--info-icon-bg);
    color: var(--info-icon-color);
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--info-tooltip-bg);
    color: var(--info-tooltip-color);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: normal;
    white-space: pre-line; /*space -> reduce, \n -> used*/
    word-wrap: break-word;
    text-align: justify;
    text-align-last: left;
    line-height: 1.6;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    width: var(--info-tooltip-width);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* statistics Dashboard */
/*
.dashboard-flex .tile-img {
    width: 100%;
    height: var(--dashboard-tile-height);
    object-fit: contain;
    object-position: center;
    display: block;
    background-color: #fff;
}

.dashboard-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--dashboard-gap);
}

.dashboard-flex > .chart-wrapper {
    flex: 0 0 48%;
    max-width: 48%;
    height: 400px;
}
*/