/*##########
## Layout ##
##########*/
* {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

.notification {
	border-radius: 10px;
}

/* Layout content */
.dui-layout-content {
	overflow-x: auto;
}


/*##############
## Left panel ##
##############*/
.dui-left-drawer {
    min-width: 345px;
    overflow-y: auto;
    height: 100%;
}

#error-filter-loading > h3, #error-filter-loading > p {
    color: red;
    padding: 1rem;
}

#error-filter-loading > h3 {
	margin-bottom: 10px;
}

#error-filter-loading ~ p {
    margin-top: 5px;
}

#info-data-limit {
	color: gray;
	margin-top: 10px;
}

.dui-card-body {
	padding: 10px 10px 0 10px;
}

.dui-panel-body {
    padding: 10px;
}

.dui-panel-body div#select-container {
    margin: 5px;
}

.dui-panel-footer {
	padding: 5px;
}

.dui-form-select {
	margin: auto;
}


/*################
## Body content ##
################*/
/* The main container of HomeView */
main {
    display: flex;
    align-items: center;
    justify-content: center;
}


/*################
## Bubble chart ##
################*/
/* General style of the card containing the elements linked to bubble chart */
.chart-card {
    height: 80vh;
    width: 100%;
    max-width: 1500px; /* Reasonable limit even on big screens */
    min-width: 370px;
    box-sizing: border-box;
}

/* Bubble chart's canvas container */
.chart-card div#chart-box {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3; /* Maintains the ratio even in responsive mode */
    min-height: 540px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: white;
}

/* Bubble chart's canvas */
div#chart-box canvas#bubble {
    width: 100%;
    height: 100%;
}

div#chart-box div#zoom-hint {
	position: absolute;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Small legends below the graph */
.chart-card small {
	color: red;
	margin: 10px 0 20px 0;
	text-align: center;
}

/* Buttons below the graph */
.chart-card div.buttons-card {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.buttons-card #download-div {
    display: flex;
    justify-content: center;
}

#download-div .download-buttons {
    margin: 3px;
}

.buttons-card #icon-buttons-card {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#icon-buttons-card #zoom-div {
	display: flex;
    justify-content: center;
}

#zoom-div .zoom-buttons {
	margin: 2px;
	padding: 0;
}


/*####################
## Markdown content ##
####################*/
.markdown-content {
    line-height: 1.6;
    font-size: 14px;
    padding: 1rem;
}

/* Titles */
.markdown-content h1 {
	text-align: center;
    font-size: 1.8em;
    border-bottom: 2px solid rgba(96, 125, 139, 0.5);
    padding-bottom: 0.3em;
}

.markdown-content h2 {
    font-size: 1.5em;
    margin-top: 1em;
    border-bottom: 1px solid rgba(96, 125, 139, 0.25);
    padding-bottom: 0.2em;
}

/* Lists */
.markdown-content ul {
    margin-left: 1.5em;
    list-style-type: disc;
}

.markdown-content ul ul {
    margin-left: 1.5em;
    list-style-type: circle;
}

.markdown-content li {
    margin-bottom: 0.4em;
}

/* Paragraphs */
.markdown-content p {
    margin-bottom: 0.8em;
}

.markdown-content blockquote p strong {
    color: red;
}


/*##########
## Footer ##
##########*/
.dui-layout-footer {
	display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    flex-wrap: wrap;
    font-size: 14px;
}

/* Left aligned paragraph */
.dui-layout-footer p {
	flex: 1;
    text-align: left;
    margin: 0;
}

/* Centered list of links */
.dui-layout-footer #footer-links {
	flex: 2;
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

/* Links in the list */
#footer-links li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    white-space: nowrap;
}

#footer-links li a:hover {
    text-decoration: underline;
    font-weight: normal;
    cursor: pointer;
}



/*################
## Responsivity ##
################*/
@media (max-width: 768px) {
	.dui-left-drawer {
        width: 55vw;
    }
}

@media (max-width: 600px) {
	.chart-card div.buttons-card {
       flex-direction: column;
       align-items: center;
    }

    .buttons-card #download-div {
       justify-content: center;
       flex-wrap: wrap;
       gap: 10px;
    }

}

@media (max-width: 548px) {
	.dui-layout-header {
	   height: 2.5rem;
	}

	.dui-card-main-header {
	   gap: 0.5rem;
	}
	.chart-card {
	   width: 90vw;
	}

    .dui-layout-footer {
       min-height: 2.5rem;
       flex-direction: column;
       align-items: flex-start;
       text-align: left;
    }
    .dui-layout-footer p {
        width: 100%;
        margin-bottom: 1rem;
    }
    .dui-layout-footer #footer-links {
        width: 100%;
        justify-content: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 400px) {
    .chart-card {
       width: 95vw;
    }
}
