/**********************************/
/* @since 01/01/2025              */
/* @author K10s Open Source Team  */
/**********************************/

/* SetUp Grid */
.dashboard-header {
    grid-area: header;
}

.dashboard-header-section1 {
    grid-area: header1;
}

.dashboard-header-section2 {
    grid-area: header2;
}

.dashboard-header-section3 {
    grid-area: header3;
}

.nav {
    grid-area: nav;
}

.dashboard-main {
    grid-area: main;
}

.footer {
    grid-area: footer;
}

.dashboard-body {
    display: grid;
    grid-template-areas:
        'nav header header header header'
        'nav main main main main'
        'footer footer footer footer footer';
    grid-template-columns: 1fr 3fr 3fr 3fr;
    grid-template-rows: 2fr 9fr 0.5fr;
    gap: 16px;
    padding: 10px;
    height: 95vh;
}

/* SetUp Grid */

/* Dashboard Header */
.dashboard-header {
    display: grid;
    grid-template-areas: 'header1 header2 header3';
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.dashboard-header-section1,
.dashboard-header-section2,
.dashboard-header-section3 {
    background-color: var(--quaternary);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: 2px 0 5px var(--shadow);
    width: 100%;
    height: 190px;
    font-weight: bold;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dashboard-header-article {
    font-size: 1.2rem;
    font-weight: 700;
}

.dashboard-header-article h2 {
    margin: 10px;
    padding: 0;
}

.dashboard-header-1,
.dashboard-header-2,
.dashboard-header-3 {
    align-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text);
    font-size: 1.2rem;
}

.dashboard-header-1,
.dashboard-header-2 {
    margin-top: 0;
}

.dashboard-header-3 {
    margin-top: 5%;
}

:host ::ng-deep ngx-charts-gauge text {
    font-size: 2.2rem !important;
    transform: scale(0.85) !important;
    fill: var(--text);
}

.dashboard-progress-container {
    width: 95%;
    height: 20px;
    background-color: rgba(212, 212, 212, 0);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-left: 0.5rem;
}

.dashboard-progress-bar {
    height: 100%;
    box-sizing: border-box;
    transition: width 0.5s ease-in-out;
}

.dashboard-header-article p {
    align-self: center;
}

/* Dashboard Header */

/* Dashboard Main */
.dashboard-main {
    background-color: var(--tertiary);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: 2px 0 5px var(--shadow);
    width: 100%;
    position: relative;
}

.dashboard-fullscreen-button,
.dashboard-download-button {
    position: absolute;
    top: 10px;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    z-index: 2;
}

.dashboard-fullscreen-button {
    right: 10px;
}

.dashboard-download-button {
    right: 50px;
}

.dashboard-fullscreen-button svg,
.dashboard-download-button svg {
    fill: var(--secondary);
    width: 20px;
    height: 20px;
    pointer-events: auto;
}

.dashboard-download-button svg {
    stroke: var(--secondary);
}

.dashboard-fullscreen-button:hover,
.dashboard-download-button:hover {
    color: var(--accent);
}

.dashboard-title {
    color: var(--accent);
    display: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 3;
}

/* Dashboard Main */

.search-dropdown1,
.search-dropdown2 {
    position: absolute;
    top: 10px;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    z-index: 2;
}

.search-dropdown-button {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    background-color: var(--secondary);
    color: var(--text);
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-dropdown-button:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.search-dropdown-menu {
    position: absolute;
    top: calc(90%);
    left: 0;
    right: 0;
    background-color: var(--background);
    border: 1px solid var(--primary);
    border-radius: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 4;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.search-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown-menu li {
    color: var(--text);
    padding: 10px 15px;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.search-dropdown-menu li:hover, li.active {
    background-color: var(--accent);
    color: var(--background);
}

/* Spiderweb */
.dashboard-main-section {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spider-web {
    width: 100%;
    height: 100%;
    display: block;
}

.spider-web svg {
    pointer-events: all;
}

/* Spiderweb */

/* Media Queries */
@media screen and (max-width: 1024px) {
    .dashboard-body {
        grid-template-areas:
            'nav header'
            'main main'
            'footer footer';
        grid-template-columns: 1fr 3fr;
        grid-template-rows: 2fr 9fr 0.5fr;
    }

    .dashboard-header {
        grid-template-areas:
            'header1'
            'header2'
            'header3';
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {
    .dashboard-body {
        grid-template-areas:
            'nav'
            'header'
            'footer';
        grid-template-columns: 1fr;
        grid-template-rows: 2fr 9fr 0.5fr;
    }

    .dashboard-header {
        grid-template-areas:
            'header1'
            'header2'
            'header3';
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }

    .dashboard-header-section1,
    .dashboard-header-section2,
    .dashboard-header-section3 {
        margin-bottom: 16px;
    }

    .dashboard-main {
        display: none;
    }
}

/* Media Queries */