label.error {
    color: var(--bs-danger) !important;
}

.brand-icon img {
    max-height: 145px;
    filter: drop-shadow(4px 4px 2px #00000066) brightness(1.1) contrast(1.5);
}

.brand-icon {
    justify-content: center;
}

.loading-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #00000027;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-preview img {
    max-height: 500px;
}

.loading-sect-img {
    max-width: 60%;
    height: auto;
}

.card-chat-body {
    height: unset;
    max-height: 50vh;
}

.card-chat-body .chat-history {
    height: unset;
    max-height: 50vh;
}

.progress-range {
    position: relative;
}


/* Positioning the value display */
.value-display {
    position: absolute;
    top: -25px;
    left: 0;
    transform: translateX(-50%);
    background: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #4CAF50;
    font-weight: bold;
}


/* progress range */
@property --val {
    syntax: '<integer>';
    inherits: true;
    initial-value: 0;
}

label.prog_label {
    --c: #4CAF50;
    /* slider color */
    --g: round(.3em, 1px);
    /* the gap */
    --l: round(.2em, 1px);
    /* line thickness*/
    --s: round(1.3em, 1px);
    /* thumb size*/
    --t: round(.8em, 1px);
    /* tooltip tail size */
    --r: round(.8em, 1px);
    /* tooltip radius */

    timeline-scope: --thumb-view;
    position: relative;
    /* No, It's not useless so don't remove it (or remove it and see what happens) */
    font-size: 24px;
}

#prog_range {
    width: 100%;
    height: var(--s);
    /* needed for Firefox*/
    --_c: color-mix(in srgb, var(--c), #000 var(--p, 0%));
    appearance: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
    font-size: inherit;
}

#prog_range:focus-visible,
#prog_range:hover {
    --p: 25%;
}

#prog_range:active,
#prog_range:focus-visible {
    --_b: var(--s)
}

/* chromium */
input[type="range" i]#prog_range::-webkit-slider-thumb {
    height: var(--s);
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: 0 0 0 var(--_b, var(--l)) inset var(--_c);
    border-image: linear-gradient(90deg, var(--_c) 50%, #ababab 0) 0 1/calc(50% - var(--l)/2) 100vw/0 calc(100vw + var(--g));
    -webkit-appearance: none;
    appearance: none;
    transition: .3s;
    anchor-name: --thumb;
    view-timeline: --thumb-view inline;
}

/* Firefox */
input[type="range"]#prog_range::-moz-range-thumb {
    height: var(--s);
    width: var(--s);
    background: none;
    border-radius: 50%;
    box-shadow: 0 0 0 var(--_b, var(--l)) inset var(--_c);
    border-image: linear-gradient(90deg, var(--_c) 50%, #ababab 0) 0 1/calc(50% - var(--l)/2) 100vw/0 calc(100vw + var(--g));
    -moz-appearance: none;
    appearance: none;
    transition: .3s;
    anchor-name: --thumb;
    view-timeline: --thumb-view inline;
}

.prog_label output {
    position-anchor: --thumb;
    position: absolute;
    position-area: top;
    inset: 0 -4em;
    color: #fff;
    font-weight: bold;
    font-family: sans-serif;
    text-align: center;
    padding-block: .5em;
    width: 4em;
    border-bottom: var(--t) solid #0000;
    border-radius: var(--r)/var(--r) var(--r) calc(var(--r) + var(--t)) calc(var(--r) + var(--t));
    --_m: 100%/var(--t) var(--t) no-repeat;
    --_g: 100%, #0000 99%, #000 102%;
    mask:
        linear-gradient(#000 0 0) padding-box,
        radial-gradient(100% 100% at 100% var(--_g)) calc(50% + var(--t)/2) var(--_m),
        radial-gradient(100% 100% at 0 var(--_g)) calc(50% - var(--t)/2) var(--_m);
    animation: range linear both;
    animation-timeline: --thumb-view;
    animation-range: entry 100% exit 0%;
    transform: scale(.75) translateY(20px);
}

.prog_label output.bottom {
    position-area: bottom;
    border-top: var(--t) solid #0000;
    border-bottom: none;
    border-radius: var(--r)/calc(var(--r) + var(--t)) calc(var(--r) + var(--t)) var(--r) var(--r);
    --_m: 0%/var(--t) var(--t) no-repeat;
    --_g: 0%, #0000 99%, #000 102%;
}

.prog_label output:before {
    content: counter(num);
    counter-reset: num var(--val);
}

/* CODE FOR TOOLTIP */
.cs-tooltip {
    position: relative;
}

.cs-tooltip::before {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translatex(-50%) rotate(-45deg);
    content: "";
    display: none;
    width: 0;
    height: 0;
    border: 7px solid #000;
    border-top-color: transparent;
    border-right-color: transparent;
}

.cs-tooltip::after {
    display: none;
    position: absolute;
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 80px;
    max-width: 100%;
    font-size: 12px;
    font-weight: 500;
    padding: .25rem .5rem;
    background-color: #000;
    border-radius: .25rem;
    color: #fff;
}

.cs-tooltip:hover:not(:focus)::before,
.cs-tooltip:hover:not(:focus)::after {
    display: block;
}


@keyframes range {
    0% {
        background: #8A9B0F;
        --val: var(--max)
    }

    100% {
        background: #CC333F;
        --val: var(--min)
    }
}

@supports not (anchor-name: ---) {
    .prog_label output {
        display: none;
    }
}

.paginate_button.page-item.active a {
    color: #fff;
}
