.loader-span {
    display: block;
    border: 2px solid #D4403A40;
    border-top: 2px solid var(--border-primary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 2s ease-in-out reverse infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.result-container {
    max-width: 1130px;
    margin: 0 auto 54px;
    counter-reset: section;

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 12px 0 0;
    }

    .title {
        font-size: 24px;
        font-weight: bold;
    }

    .actions {
        display: flex;
        gap: 10px;
    }

    .filter-btn,
    .export-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        background-color: white;
        border: 1px solid #ccc;
        border-radius: 20px;
        padding: 8px 20px;
        cursor: pointer;
        font-weight: 500;
        font-size: 16px;
        line-height: 22px;

        &:hover,
        &.active {
            color: var(--border-primary);
            border-color: var(--border-primary);
        }

        &:not(:hover, .active)>img {
            filter: invert(0.5);
        }
    }

    .metrics {
        display: flex;
        gap: 16px;
        margin-top: 16px;
        flex-wrap: wrap;
        justify-content: flex-end
    }

    .metric {
        display: flex;
        align-items: center;
        gap: 8px;
        background-color: white;
        font-weight: 500;
        position: relative;

        &>span {
            font-size: 14px;
            line-height: 20px;
            color: #000;
            font-weight: 500;
        }

        .metric-range {
            border-radius: 8px;
            border: 1px solid #DADADA;
            padding: 6px 12px;
            display: inline-flex;
            gap: 4px;
            align-items: center;
            min-width: 118px;
        }

        &:hover .metric-range {
            cursor: pointer;
            border-color: var(--border-primary);
        }
    }

    .metric-min,
    .metric-max {
        font-weight: bold;
        color: #0A0909;
        display: inline-flex;
        align-items: center;
        gap: 4px
    }

    .metric-min::after {
        content: url("/web_assets/frontend/images/icons/arrow-right-icon.svg");
        width: 16px;
        height: 16px;
    }

    .metric-max::after {
        display: inline-block;
        content: url("/web_assets/frontend/images/icons/chevron-down.svg");
        width: 12px;
        margin-left: 4px;
        margin-right: -4px;
    }

    .metric-dropdown {
        position: absolute;
        z-index: 99;
        background-color: #fff;
        top: calc(100% + 4px);
        padding: 12px;
        border: 1px solid #DADADA;
        box-shadow: 0px 2px 2px 0px #00000014;
        border-radius: 8px;
        right: 0;

        .dropdown-label {
            font-size: 12px;
            line-height: 16px;
            display: inline-block;
            margin-bottom: 12px;
        }

        .dropdown-range {
            display: flex;
            flex-direction: column;
            gap: 8px;

            label {
                font-weight: 500;
                font-size: 12px;
                line-height: 24px;
                text-align: right;
                min-height: 24px;
                color: #ACACAC;
                display: inline-block;
                padding-left: 8px;
            }

            input {
                border: 0.5px solid #DADADA;
                font-size: 12px;
                line-height: 14px;
                padding: 5px 2px;
                border-radius: 4px;
                text-align: center;
                max-width: 44px;
            }
        }
    }

    .reset-btn {
        font-size: 14px;
        line-height: 20px;
        background-color: white;
        border: 1px solid transparent;
        border-radius: 8px;
        padding: 6px 8px;
        cursor: pointer;
        font-weight: 500;

        &:hover {
            border-color: #DADADA;
        }
    }

    .table {
        width: 100%;
        border-collapse: collapse;
        background-color: white;
    }

    .table-container {
        padding: 8px;
        border: 1px solid #DADADA;
        border-radius: 16px;
        margin-top: 24px;
        overflow-x: unset;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    .table thead {
        border-radius: 12px;
        background-color: #F5F5F5;
    }

    .table th,
    .table td {
        padding: 15px;
        text-align: left;
        padding: 16px;
        text-align: left;
        font-size: 16px;
        line-height: 24px;
    }

    .table th {
        background-color: #f9f9f9;
        font-weight: 500;
    }

    .table tr {
        border-bottom: none !important;
    }

    [data-tooltip] {
        z-index: 1;
    }

    [data-tooltop]:hover {
        position: relative;
        cursor: pointer;

        &::after {
            content: attr(data-tooltop);
            position: absolute;
            font-size: 12px;
            line-height: 16px;
            font-weight: 400;
            color: #fff;
            background: #0A0909;
            width: max-content;
            bottom: calc(100% + 6px);
            left: 50%;
            transform: translateX(-50%);
            box-shadow: 0px 4px 8px 0px #00000014;
            border-radius: 8px;
            display: inline-block;
            padding: 8px;
            z-index: 9999;
        }

        &::before {
            content: '';
            position: absolute;
            width: 0;
            height: 0;
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-top: 6px solid #0A0909;
            bottom: calc(100%);
            left: 50%;
            transform: translateX(-50%);
        }
    }

    th[data-tooltop]:hover {
        &::after {
            bottom: 50%;
            left: 58px;
            transform: translate(0, 50%);
        }

        &::before {
            bottom: calc(50% - 6px);
            left: 52px;
            transform: translate(-50%, 0);
            border-right-color: #0A0909;
            border-top-color: transparent;
            border-left-color: transparent;
            border-bottom: 6px solid transparent;
        }
    }

    .table .result-table-counter::after {
        counter-increment: section;
        content: counter(section);
    }

    .view-btn {
        color: var(--border-primary);
        ;
        text-decoration: none;
        font-weight: 500;
    }

}

.historic-modal {
    position: fixed;
    z-index: 9999999;
    background-color: #00000040;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    .modal-body {
        position: absolute;
        background: #fff;
        min-height: 310px;
        max-width: 546px;
        width: calc(100% - 16px);
        z-index: 1;
        margin: 0 auto;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        border-radius: 16px;
        box-shadow: 0px 4px 8px 0px #00000014;
        padding: 12px 16px;
    }

    .modalHeader {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
    }

    .site-info {
        color: #7F7F7F;
    }

    .close-button {
        display: inline-flex;
        cursor: pointer;

        &:hover {
            filter: brightness(0.5);
        }
    }
}


/* =======================
historic data popup start
========================= */

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 8px;
}

.gap-\[2\.5\] {
    gap: 10px;
}

.cursor-pointer {
    cursor: pointer;
}

.flex-col{
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.leading-0 {
    line-height: 0;
}

.js-popup-overlay {
    position: fixed;
    z-index: 9999;
    background-color: #25253380;
    min-height: 100vh;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 6px;
    flex-direction: column;

    button {
        border: 0px;
        background-color: unset;
    }

    .js-popup-body {
        width: 100%;
        max-width: 408px;
        min-height: 566px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        box-shadow: 0px 4px 20px 6px #25253329;
        background-color: white;
        overflow: hidden;
        position: relative;

        &::after {
            position: absolute;
            content: "";
            background: radial-gradient(50% 100% at 50% 0%, rgba(247, 201, 199, 0.16) 0%, #FDF5F5 100%);
            backdrop-filter: blur(100px);
            min-height: 296px;
            width: 100%;
            inset-inline: 0;
            top: 0;
        }

        .js-close-popup {
            margin: 0 0 0 auto;
            transition: all ease-in 200ms;
            position: absolute;
            top: 0;
            right: 4px;
            z-index: 30;

            &:hover {
                filter: brightness(0);
            }
        }

        .js-popup-header {
            display: flex;
            flex-direction: column;
            position: relative;
            z-index: 20;
            padding: 24px;

            p {
                color: #222222;
                font-weight: 600;
                font-size: 24px !important;
                line-height: 48px;
                text-align: center;
            }

            span {
                color: #222222;
                font-size: 16px;
                line-height: 24px;
                font-weight: 400;
                text-align: center;
            }
        }

        .js-popup-table {
            padding: 0px 24px 24px 24px;
            position: relative;
            z-index: 20;

            ul {
                border: 1px solid #DADADA;
                padding: 6px 0px;
                min-height: 280px;
                width: 100%;
                border-radius: 20px;
                background: #ffffff;
                display: flex;
                flex-direction: column;
                list-style: none;

                li {
                    padding: 10px 24px;

                    p {
                        color: #0A0909;
                        font-size: 16px !important;
                        line-height: 24px;
                        font-weight: 400;
                    }

                    [data-tooltip] {
                        z-index: 1;
                    }

                    [data-tooltip]:hover {
                        position: relative;
                        cursor: pointer;

                        &::after {
                            content: attr(data-tooltip);
                            position: absolute;
                            font-size: 12px;
                            line-height: 16px;
                            font-weight: 400;
                            color: #fff;
                            background: #0A0909;
                            width: max-content;
                            bottom: calc(100% + 6px);
                            left: 50%;
                            transform: translateX(-50%);
                            box-shadow: 0px 4px 8px 0px #00000014;
                            border-radius: 8px;
                            display: inline-block;
                            padding: 8px;
                            z-index: 9999;
                        }

                        &::before {
                            content: '';
                            position: absolute;
                            width: 0;
                            height: 0;
                            border-left: 6px solid transparent;
                            border-right: 6px solid transparent;
                            border-top: 6px solid #0A0909;
                            bottom: calc(100%);
                            left: 50%;
                            transform: translateX(-50%);
                        }
                    }

                    .data-info-icon[data-tooltip]:hover {
                        &::after {
                            bottom: 50%;
                            left: 25px;
                            transform: translate(0, 50%);
                        }

                        &::before {
                            bottom: calc(50% - 6px);
                            left: 21px;
                            transform: translate(-50%, 0);
                            border-right-color: #0A0909;
                            border-top-color: transparent;
                            border-left-color: transparent;
                            border-bottom: 6px solid transparent;
                        }
                    }
                }


            }
        }

        .js-popup-footer{
            padding: 0px 24px 24px 24px;

            a.emd-pricing-plans{
                background: linear-gradient(269.27deg, #D4403A 0.63%, #CE177B 99.37%);
                padding: 10px 16px;
                border-radius: 999px;
                width: 100%;
                text-align: center;
                justify-content: center;
                transition: all ease-in 200ms;

                span{
                    font-size: 16px !important;
                    line-height: 22px;
                    font-weight: 400;
                    color: #ffffff;
                }

                &:hover{
                    background: linear-gradient(89.27deg, #D4403A 0.63%, #CE177B 99.37%);
                }
            }

            a.continue_as_free{
                padding: 10px 0px;
                text-align: center;
                color: #757575;
                font-size: 16px !important;
                line-height: 22px;
                font-weight: 400;
                transition: all ease-in 200ms;

                &:hover{
                    color: #0A0909;
                }
            }
        }
    }
}

/* =======================
historic data popup end
========================= */