span.orange {
    color: var(--span_orange);
    font-weight: bold;
}

span.vert {
    color: var(--span_vert);
    font-weight: bold;
}

span.jaune {
    color: var(--span_jaune);
    font-weight: bold;
}

span.rouge {
    color: var(--span_rouge);
    font-weight: bold;
}

.bouton-diag {
    color: var(--body_color_1);
    text-decoration: none;
    font-size: 15px;
    font-family: 'open-sans', 'arial';
    line-height: 30px;
    font-weight: normal;
    border: none;
    padding: 3px 10px;
    margin: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    background: var(--input_bg_submit);
    border: 1px solid var(--navbar_button_border);
    transition: 0.05s;
    cursor: pointer;

    &.list {
        max-width: 280px;
        overflow-wrap: anywhere;
    }

    &.active {
        color: var(--body_color_2);
        background: var(--bouton_diag_active_bg);
        border: 1px solid var(--navbar_button_border_hover);
        box-shadow: 0px 0px 15px -5px var(--box_shadow);
    }

    &:hover {
        color: var(--body_color_2);
        background: var(--purple_gradient_1);
        border: 1px solid var(--navbar_button_border_hover);
        box-shadow: 0px 0px 15px -5px var(--purple_shadow_2);
    }

    &:active {
        transform: scale(0.95);
        transition: 0.05s ease-out;
    }

    &.border-purple {
        border-left: 2px solid var(--purple_gradient_1);
    }

    &.border-yellow {
        border-left: 2px solid var(--span_jaune);
    }

    &.border-red {
        border-left: 2px solid var(--span_rouge);
    }

    &.border-green {
        border-left: 2px solid var(--span_vert);
    }
}

.bouton-diag:hover img.copy {
    filter: var(--img_copy_filter_hover);
}

img.copy {
    position: relative;
    width: 20px;
    top: 1px;
    margin-top: -10px;
    margin-left: 1px;
    vertical-align: text-bottom;
    cursor: pointer;
    transform: scale(1) rotate(0deg);
    filter: var(--img_copy_filter);
    transition: transform 0.1s ease-in-out;
}

.list.summary {
    summary {
        position: relative;
        text-indent: -25px;
        font-size: 15px;
        padding: 10px;
        padding-left: 35px;
        padding-right: 40px;

        &::after {
            content: '';
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 8px solid #596894;
        }
    }

    details {
        background: var(--summary_details_bg);
        border: 1px solid var(--summary_details_border);
        margin: 0px;
        margin-bottom: 3px;
        padding: 0px;
        border-radius: 5px;
        transition: 0.05s;

        &:hover {
            background: var(--summary_details_bg_hover);
            border: 1px solid var(--summary_details_border_hover);
            transition: 0.05s;
        }

        &[open] {
            background: var(--summary_details_bg_open);
            border: 1px solid var(--summary_details_border_hover);
            margin-bottom: 3px;
            transition: 0.1s;
        }

        &[open] summary {
            padding-bottom: 8px;
            margin-bottom: 10px;
            border-bottom: solid 1px var(--summary_details_border_inside_open);
            border-radius: inherit;
        }

        &[open] summary::after {
            border-top: none;
            border-bottom: 8px solid #596894;
        }

        p {
            padding: 10px;
            margin: 10px;
            font-size: 13px;
        }
    }
}

.ring-container {
    position: relative;
    left: -10px;
    top: 15px;
}

.circle {
    width: 15px;
    height: 15px;
    background-color: var(--purple_gradient_1);
    border-radius: 50%;
    position: absolute;
    top: 23px;
    left: 23px;
    box-shadow: 0px 0px 20px 0px var(--purple_shadow_2);
}

.ringring {
    border: 3px solid var(--purple_gradient_1);
    border-radius: 30px;
    height: 25px;
    width: 25px;
    position: absolute;
    left: 15px;
    top: 15px;
    animation: pulse 3s ease-out;
    animation-iteration-count: infinite;
    box-shadow: 0px 0px 25px 0px var(--ringring_shadow);
    opacity: 0.0;
}

@keyframes pulse {
    0% { -webkit-transform: scale(0.1, 0.1); opacity: 0.0; }
    25% { opacity: 1.0; }
    50% { -webkit-transform: scale(1.2, 1.2); opacity: 0.0; }
}

@media all and (max-width: 700px) {
    .ring-container {
        display: none;
    }
}

#error-message {
    display: none;
    height: 0;
    margin-bottom: 15px;
    overflow: hidden;
    transition: height 0.5s;
    font-size: 14px;
    text-align: center;
    font-family: 'open-sans', 'arial';
}

.loader {
    width: 48px;
    height: 48px;
    filter: drop-shadow(rgb(111 43 172) 0px 0px 8px);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotation 0.75s linear infinite;

    &::after {
        content: '';
        box-sizing: border-box;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 3px solid transparent;
        border-bottom-color: var(--purple_gradient_1);
    }
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.storage_details {
    font-family: 'consolas', monospace;
    margin-top: 10px;
    margin-left: 8px;
}

.storage_view {
    display: flex;
    width: 100%;
    height: 15px;
    background-color: #52598b;
    margin-bottom: 10px;
    border-radius: 3px;
    overflow: hidden;
    cursor: help;
}

.partition_area {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    height: auto;
    font-family: 'open-sans', 'arial';
    color: var(--body_color_2);
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 1px #00000080;
    overflow: hidden;

    .show_usage {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.25);
        border-top-right-radius: 2px;
        border-bottom-right-radius: 2px;
    }

    .label {
        position: absolute;
    }
}

.partition_area.system, .partition_legend.system { background-color: #c0392b; }
.partition_area.recovery, .partition_legend.recovery { background-color: #2ecc71; }
.partition_area.win_basic_data, .partition_legend.win_basic_data,
.partition_area.win_basic_data_mbr, .partition_legend.win_basic_data_mbr { background-color: #0568aa; }
.partition_area.basic_data, .partition_legend.basic_data,
.partition_area.basic_data_mbr, .partition_legend.basic_data_mbr { background-color: #1e8488; }
.partition_area.unknown, .partition_legend.unknown { background-color: #52598b; }
.partition_area.win_ldm, .partition_legend.win_ldm { background-color: #9b59b6; }
.partition_area.ldm, .partition_legend.ldm { background-color: #8c59b6; }
.partition_area.pool, .partition_legend.pool { background-color: #009688; }
.partition_area.unallocated, .partition_legend.unallocated { background-color: var(--span_orange); }

.boot_bar_segment.border_left,
.partition_area.border_left {
    border-left: 1px solid var(--body_bg);
}

.partition_list {
    font-family: 'consolas', monospace;
    font-size: 14px;
    padding: 0;
    margin: 0;
    background-color: var(--partition_list_bg);
    border-radius: 8px;
    padding: 2px;

    .partition_legend {
        display: inline-block;
        width: 14px;
        height: 14px;
        margin-right: 5px;
        vertical-align: text-top;
        border-radius: 3px;

        &.used_available {
            position: relative;

            &::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: linear-gradient(to right, rgba(255, 255, 255, 0.25) 50%, transparent 50%);
                pointer-events: none;
                border-radius: inherit;
            }
        }
    }

    > div {
        align-items: center;
        padding: 5px;

        &:not(:last-child) {
            border-bottom: 1px solid var(--partition_list_border);
        }

        > div {
            text-align: left;

            &:nth-child(1) {
                font-weight: bold;
            }

            &:nth-child(3) {
                text-align: right;
            }
        }
    }
}

.partition_area.encrypted,
.partition_legend.encrypted {
    box-shadow: inset 0 0 0 2px var(--partition_encrypted_border);
    position: relative;
}

.partition_legend.encrypted::after {
    content: '🔒';
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 12px;
    text-shadow: 0px 0px 2px #000;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.boot_windows_view {
    --boot_c_bios: #c0392b;
    --boot_c_main: #1a7fc1;
    --boot_c_s1: #1a5f90;
    --boot_c_s2: #2272a8;
    --boot_c_s3: #2d87c0;
    --boot_c_s4: #429fd4;
    --boot_c_s5: #6abce8;
    --boot_c_post: #8461d2;
    font-family: 'consolas', monospace;
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    background: var(--details_bg);
    border: 1px solid var(--details_border);
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.1s;

    &:hover,
    &:focus-visible,
    &.open {
        background: var(--details_bg_hover);
    }
}

.boot_bar {
    display: flex;
    width: 100%;
    height: 10px;
    background-color: #52598b;
    margin-bottom: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.boot_bar_segment {
    height: 100%;

    &.bios { background-color: var(--boot_c_bios); }

    &.main_path {
        background-color: var(--boot_c_main);
        display: flex;
        overflow: hidden;
    }

    &.post_boot { background-color: var(--boot_c_post); }
}

.boot_bar_sub {
    height: 100%;

    &.s1 { background-color: var(--boot_c_s1); }
    &.s2 { background-color: var(--boot_c_s2); }
    &.s3 { background-color: var(--boot_c_s3); }
    &.s4 { background-color: var(--boot_c_s4); }
    &.s5 { background-color: var(--boot_c_s5); }
}

.boot_bar_legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13px;
}

.boot_legend_text {
    opacity: 0.7;
}

.boot_legend_dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: center;

    &.bios { background-color: var(--boot_c_bios); }
    &.main_path { background-color: var(--boot_c_main); }
    &.s1 { background-color: var(--boot_c_s1); }
    &.s2 { background-color: var(--boot_c_s2); }
    &.s3 { background-color: var(--boot_c_s3); }
    &.s4 { background-color: var(--boot_c_s4); }
    &.s5 { background-color: var(--boot_c_s5); }
    &.post_boot { background-color: var(--boot_c_post); }
}

.boot_phase_list {
    font-size: 13px;
    margin: 0;
    margin-top: 8px;
    display: none;

    > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0px;

        &:not(:last-child) {
            border-bottom: 1px solid var(--partition_list_border);
        }
    }
}

.boot_windows_view.open .boot_phase_list {
    display: block;
}

.smart_data {
    font-family: 'open-sans', 'arial';
    font-size: 10px;
    border-radius: 8px;
}

.smart_data_row {
    display: flex;
    justify-content: space-between;
    padding: 3px;
    gap: 3px;
    border-bottom: 1px solid var(--box_border);
    position: relative;

    &:first-child {
        font-weight: bold;
    }

    &:last-child {
        border-bottom: none;
    }

    &:hover {
        background: var(--box_bg_hover);
    }

    &.bad {
        color: var(--span_orange);
        font-weight: bold;
    }
}

.smart_data_id,
.smart_data_name { text-align: left; }

.smart_data_value,
.smart_data_worst,
.smart_data_thres,
.smart_data_raw { text-align: right; }

.smart_data_id { flex: 0.2; }
.smart_data_name, .smart_data_raw { flex: 1; }
.smart_data_value, .smart_data_worst, .smart_data_thres { flex: 0.5; }
.smart_data_name { flex: 2; }

#lightbox {
    visibility: hidden;
    position: fixed;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: 3;
    background: var(--preview_shadow);
    transition: opacity 0.1s ease-in-out;
    opacity: 0;
}

#lightbox-image {
    position: fixed;
    top: calc(50% + 25px);
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: calc(90vh - 50px);
    width: auto;
    height: auto;
    border-radius: 10px;
    filter: drop-shadow(rgb(0 0 0 / 30%) 0px 20px 30px);
    transition: 0.1s ease-in-out;
    object-fit: contain;

    &.udiag-img {
        image-rendering: pixelated;
        box-shadow: 0 10px 10px -8px rgb(165 4 193);
    }
}

#system-context-modal {
    visibility: hidden;
    position: fixed;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: 4;
    background: var(--preview_shadow);
    transition: opacity 0.1s;
    opacity: 0;
}

#system-context-modal-content {
    position: fixed;
    top: calc(50% + 25px);
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 1200px;
    width: 90vw;
    height: calc(90vh - 50px);
    background: var(--details_bg);
    border: 1px solid var(--box_border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 20px 60px var(--box_shadow);
    overflow-y: auto;
    box-sizing: border-box;

    h2 {
        margin-top: 0px;
        margin-bottom: 5px;
        color: var(--body_color_1);
        font-family: 'open-sans', 'arial';
        font-size: 20px;
    }
}

#system-context-modal-content p,
#sensors-stats-modal-content p {
    color: var(--body_color_1);
    font-family: 'open-sans', 'arial';
    font-size: 13px;
    margin: 0 0 15px;
}

.modifications-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.1s ease-in-out;

    &:hover {
        color: #444;
    }
}

[data-theme="dark"] .modifications-close,
[data-theme="verydark"] .modifications-close {
    color: #999;

    &:hover {
        color: #ddd;
    }
}

.modifications-grid {
    font-family: 'open-sans', 'arial';
    font-size: 13px;
    border-radius: 8px;

    & + .modifications-grid {
        margin-top: 1.5em;
    }
}

.modifications-grid-header {
    display: flex;
    justify-content: space-between;
    padding: 6px 3px;
    gap: 8px;
    border-bottom: 1px solid var(--box_border);
    position: relative;
    font-weight: bold;
    color: var(--span_field);

    .modifications-grid-cell:nth-child(1) { flex: 4; text-align: left; }
    .modifications-grid-cell:nth-child(2),
    .modifications-grid-cell:nth-child(3) { flex: 3; text-align: right; }
    .modifications-grid-cell:nth-child(4) { flex: 3; text-align: right; }
}

.modifications-grid-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 3px;
    gap: 8px;
    border-bottom: 1px solid var(--box_border);
    position: relative;

    &:last-child {
        border-bottom: none;
    }

    &:hover {
        background: var(--box_bg_p_hover);
    }
}

.modifications-grid-cell {
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex: 3;

    &.param-name { flex: 4; text-align: left; }
    &.default-value, &.current-value, &.date-value { flex: 3; text-align: right; }
    &.current-value { color: var(--span_rouge); font-weight: bold; }
}

.modifications-grid--drivers {
    .modifications-grid-header .modifications-grid-cell:nth-child(2),
    .modifications-grid-row .modifications-grid-cell:nth-child(2) { flex: 2; }

    .modifications-grid-header .modifications-grid-cell:nth-child(3),
    .modifications-grid-row .modifications-grid-cell:nth-child(3) { flex: 4; }
}

.modifications-btn {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 6px 12px;
    background: var(--details_bg);
    color: var(--body_color_1);
    font-size: 13px;
    font-weight: 500;
    font-family: 'open-sans', 'arial';
    text-align: center;
    border: 1px solid var(--details_border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.1s;

    &:hover,
    &:focus-visible {
        background: var(--details_bg_hover);
    }

    &:active {
        transform: scale(0.98);
    }
}

.ctx-btn-title {
    display: block;
}

.ctx-btn-counts {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    margin: auto;
    margin-top: 2px;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 320px;
}

.ctx-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--box_border);
    margin-bottom: 16px;
    padding-bottom: 0;
    overflow-x: visible;
    scrollbar-width: none;

    &::-webkit-scrollbar {
        display: none;
    }
}

.ctx-tab {
    background: none;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'open-sans', 'arial';
    color: var(--body_color_1);
    opacity: 0.7;
    transition: opacity 0.1s, background 0.1s;
    position: relative;
    border-radius: 6px 6px 0 0;
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;

    &::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: transparent;
        border-radius: 2px 2px 0 0;
        transition: background 0.1s;
    }

    &.active {
        opacity: 1;

        &::after {
            background: linear-gradient(90deg, var(--purple_gradient_1), var(--purple_gradient_3));
        }
    }

    &:hover {
        opacity: 0.85;
        background: var(--details_bg_hover);
    }

    &.active:hover {
        opacity: 1;
    }
}

.ctx-pane {
    display: none;

    &.active {
        display: block;
    }
}

#sensors-stats-modal {
    visibility: hidden;
    position: fixed;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    z-index: 4;
    background: var(--preview_shadow);
    transition: opacity 0.1s;
    opacity: 0;
}

#sensors-stats-modal-content {
    position: fixed;
    top: calc(50% + 25px);
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 1200px;
    width: 90vw;
    height: calc(90vh - 50px);
    background: var(--details_bg);
    border: 1px solid var(--box_border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 20px 60px var(--box_shadow);
    overflow-y: auto;
    box-sizing: border-box;

    h2 {
        margin-top: 0;
        margin-bottom: 16px;
        color: var(--body_color_1);
        font-family: 'open-sans', 'arial';
        font-size: 20px;
    }
}

.ss-group {
    margin-bottom: 20px;
    font-family: 'open-sans', 'arial';
    font-size: 13px;
}

.ss-group-header {
    font-weight: bold;
    color: var(--span_field);
    padding: 6px 4px;
    border-bottom: 2px solid var(--box_border);
    margin-bottom: 2px;
}

.ss-table-header {
    display: flex;
    gap: 8px;
    padding: 4px 4px;
    font-weight: bold;
    font-size: 11px;
    opacity: 0.6;
    border-bottom: 1px solid var(--box_border);
}

.ss-row {
    display: flex;
    gap: 8px;
    padding: 2px 4px;
    border-bottom: 1px solid var(--box_border);
    transition: background 0.1s;

    &:last-child {
        border-bottom: none;
    }

    &:hover {
        background: var(--box_bg_p_hover);
    }
}

.ss-cell {
    min-width: 0;
    word-break: break-word;
}

.ss-probe {
    flex: 5;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ss-stat {
    flex: 2;
    text-align: right;
    white-space: nowrap;
}

.ss-icon {
    display: inline-flex;
    align-items: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.75;
    color: var(--body_color_1);

    svg {
        width: 100%;
        height: 100%;
    }
}

svg.apexcharts-svg {
    background: var(--box_bg) !important;
    transition-duration: 0.2s;
    border-radius: 10px;

    &:hover {
        background: var(--box_bg_hover) !important;
        transition: ease-in-out;
        transition-duration: 0.1s;
    }
}

.apexcharts-legend {
    transform: translate(0px, 4px);
}

.apexcharts-tooltip {
    background: var(--chart_tooltip_bg) !important;
    color: var(--body_color_1) !important;
    border: solid 1px var(--box_border) !important;
    box-shadow: 0 1rem 30px 5px var(--box_shadow) !important;
    backdrop-filter: blur(4px);
}

.apexcharts-tooltip-title {
    background: var(--box_bg) !important;
    color: var(--body_color_1) !important;
    border-bottom: 1px solid var(--summary_details_border_inside_open) !important;
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
    background: var(--box_bg) !important;
    color: var(--body_color_1) !important;
    border: solid 1px var(--box_border) !important;
}

.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark::before {
    border-bottom-color: var(--box_bg) !important;
}

.apexcharts-text.apexcharts-xaxis-label {
    fill: var(--body_color_1) !important;
}

.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
    padding-bottom: 0px !important;
}

.apexcharts-toolbar svg {
    fill: var(--body_color_1) !important;
}

.apexcharts-zoom-icon.apexcharts-selected {
    display: none;
}

.apexcharts-legend-marker {
    stroke-width: 0px;
    width: 20px !important;
}

@media all and (max-width: 1000px) {
    .apexcharts-legend-text {
        font-size: 10px !important;
    }

    .apexcharts-legend-marker {
        scale: 0.8 !important;
    }

    .apexcharts-yaxis-title-text {
        font-size: 10px !important;
    }

    .apexcharts-legend-series {
        margin: 2px 2px !important;
    }
}

@media (max-width: 768px) {
    #sensors-stats-modal-content {
        padding: 20px 15px;
    }

    .ss-table-header {
        display: none;
    }

    .ss-row {
        flex-direction: column;
        gap: 2px;
    }

    .ss-stat {
        text-align: left;
    }

    #system-context-modal-content {
        padding: 20px 15px;
    }

    .modifications-grid-header {
        display: none;
    }

    .modifications-grid-row {
        flex-direction: column;
        gap: 5px;
    }

    .modifications-grid-cell {
        text-align: left !important;

        &::before {
            content: attr(data-label);
            font-weight: bold;
            margin-right: 10px;
            color: var(--span_field);
        }
    }
}
