.boxes {
    display: flex;
    flex-wrap: wrap;

    &.general {
        position: relative;
        padding: 15px;
        justify-content: center;
    }

    &.charts {
        position: relative;
        justify-content: center;
        width: 100%;
    }

    &.summary {
        padding: 15px;
        padding-top: 100px;
        justify-content: center;
    }

    &.sponsor {
        justify-content: center;
        padding: 0px 15px;

        .sponsor_text {
            font-family: 'open-sans', 'arial';
            font-size: 14px;
            margin: 0px 10px;
            width: 100%;
            max-width: 900px;
            text-align: right;

            .survey {
                float: left;
            }
        }
    }
}

.box {
    position: relative;
    margin: 20px 10px 20px 10px;
    min-width: 250px;
    background: var(--box_bg);
    border-radius: 10px;
    border: 1px solid var(--box_border);
    border-bottom: none;
    transition-duration: 0.05ms;

    h2 {
        font-size: 20px;
        margin-top: 0px;
        margin-bottom: 20px;
    }

    &::before {
        content: '';
        position: absolute;
        top: 0px;
        right: 1px;
        bottom: -2px;
        left: 1px;
        z-index: -1;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--purple_gradient_1) 0px, var(--purple_gradient_2));
        box-shadow: 0 7px 8px -8px var(--purple_shadow_1);
        filter: drop-shadow(var(--box_shadow) 0px 2px 10px);
    }

    &.warning::before {
        background: linear-gradient(90deg, var(--box_bg_warning) 0px, var(--purple_gradient_2));
        box-shadow: 0 7px 8px -8px var(--box_shadow_warning);
    }

    &:hover {
        background: var(--box_bg_hover);
        transition: ease-in-out;
        transition-duration: 0.1s;
    }

    &.text {
        min-width: 350px;
        max-width: 500px;
        padding: 20px;

        p {
            padding: 2.5px 0;
            margin: 0;
            border-bottom: 1px solid var(--box_border);
            display: flex;
            justify-content: space-between;

            &:last-child {
                border-bottom: none;
            }

            &:hover {
                background: var(--box_bg_p_hover);
            }

            &:has(.tips_dot):hover {
                cursor: help;
            }
        }

        span.field {
            font-weight: bold;
        }
    }

    &.chart {
        height: 280px;
        width: 100%;
        max-width: 45%;
        min-height: 280px !important;
        padding-bottom: 10px;
    }

    &.summary {
        height: auto;
        width: 100%;
        max-width: 900px;
        padding: 20px;
        margin-bottom: 0px;

        h2 {
            margin-top: 0px;
            margin-bottom: 5px;
        }

        .autodiag_tips {
            display: none;
            font-family: 'open-sans', 'arial';
            font-size: 13px;
            margin-bottom: 0px;
        }
    }

    &.graph-box {
        width: 100%;
        max-width: 95%;
    }
}

.rm_style_charts {
    border: 0 !important;
    margin: 0 !important;
    max-width: 50% !important;
    background: transparent !important;

    &::before {
        content: none !important;
    }

    svg.apexcharts-svg {
        background: transparent !important;
    }

    &:hover svg.apexcharts-svg {
        background: transparent !important;
    }
}

.boxes.charts .apexcharts-title-text,
.boxes.charts .apexcharts-text.apexcharts-xaxis-title-text,
.boxes.charts .apexcharts-text.apexcharts-yaxis-title-text {
    letter-spacing: 0.5px;
}

.box-preview {
    display: flex;
    justify-content: center;

    a:hover {
        text-decoration: none;
    }
}

.preview {
    max-width: 178px;
    max-height: 146px;
    border: 1px solid rgba(147, 51, 234, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    margin-top: 15px;
    padding: 8px;
    background: var(--preview_bg);
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    object-fit: cover;

    &:hover {
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.1);
        border-color: rgba(147, 51, 234, 0.3);
    }
}

.sponsor_text_home {
    font-family: 'open-sans', 'arial';
    font-size: 16px;
    line-height: 1.8em;
}

.sponsor_svg_topachat {
    fill: var(--body_color_1);
    transition: 0.1s;

    &:hover {
        fill: #2097f1;
        transition: 0.1s;
    }
}

@media all and (max-width: 1000px) {
    .box.text {
        min-width: auto;
        width: 100%;
        max-width: 100%;
        margin-left: 0px;
        margin-right: 0px;
    }

    .boxes.sponsor .sponsor_text {
        text-align: center;

        .survey {
            float: none;
            margin-right: 10px;
        }
    }
}

@media all and (max-width: 1000px) {
    .rm_style_charts {
        max-width: 100% !important;
    }
}
