.average-prices {
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.5rem;
    border-radius: var(--borderRadius);
    box-shadow: var(--boxShadow1), var(--boxShadow2);
    background-color: #fff;
    background-image: url("/frontend/assets/Rentaroof/Component/AveragePricesPerArea/Presentation/Images/Pound-d3d25286f3.svg");
    background-repeat: no-repeat;
    background-position: 3rem -.5rem;
    display: block;
    max-width: 48rem;
}

.average-prices h2 {
    margin-bottom: 1.75rem;
}

.average-prices__tabs-container {
    display: flex;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
}

.average-prices__tabs {
    display: flex;
}

.average-prices__tab {
    color: var(--greyColor40);
    border-bottom: .125rem solid var(--greyColor40);
    flex: 1;
    padding: .625rem 1rem;
    background: transparent;
    border-top: none;
    border-right: none;
    border-left: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 12rem;
    text-align: center;
    text-decoration: none;
}

.average-prices__tab:hover {
    border-bottom: .125rem solid var(--pinkColor300);
}

.average-prices__tab.average-prices__tab--active {
    color: var(--greyColor20);
    border-bottom: .125rem solid var(--pinkColor300);
}

.average-prices__toggle-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    background-color: var(--greyColor50);
    border-radius: var(--borderRadius);
    width: 20rem;
    margin: 0 auto 1.5rem;
    padding: .25rem;
    gap: .25rem;
    overflow: hidden;
}

.average-prices__toggle-inner-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    background-color: var(--greyColor60);
    border-radius: var(--borderRadius);
    width: 20rem;
    margin: 0;
    padding: .25rem;
    gap: .25rem;
    overflow: hidden;
}

.average-prices__toggle-indicator {
    position: absolute;
    top: .25rem;
    bottom: .25rem;
    width: 9.7rem;
    border-radius: var(--borderRadius);
    background-color: var(--secondaryColor);
    transition: transform 0.3s ease;
    z-index: 0;
    padding: 1rem;
}

.average-prices__toggle-indicator.average-prices__toggle-indicator--right {
    transform: translateX(calc(100% - .425rem));
}

.average-prices__toggle-indicator.average-prices__toggle-indicator--left {
    transform: translateX(0%);
}

.average-prices__toggle {
    flex: 1;
    z-index: 1;
    padding: .625rem;
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: .875rem;
    color: var(--textColor);
    cursor: pointer;
    border-radius: var(--borderRadius);
    transition: color 0.3s ease;
}

.average-prices__toggle.average-prices__toggle--active {
    color: white;
}

.average-prices table {
    table-layout: fixed;
    border-collapse: collapse;
    width: 100%;
}

.average-prices th {
    border-bottom: .0625rem solid var(--greyColor50);
    padding-bottom: .5rem;
    font-family: var(--fontFamilyHeaders);
}

.average-prices td {
    padding-top: .625rem;
    padding-bottom: .625rem;
}

.average-prices__properties-table-header::before {
    content: '';
    display: inline-block;
    height: 1.25rem;
    width: 1.375rem;
    background-image: url("/frontend/assets/Rentaroof/Component/AveragePricesPerArea/Presentation/Images/House-b7d05f69ed.svg");
    background-repeat: no-repeat;
}

.average-prices__properties-table-header span {
    display: none;
}

.average-prices__price-table-header button {
    background: none;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.average-prices__price-table-header button span {
    font-family: var(--fontFamilyHeaders);
    font-weight: 700;
    font-size: 1rem;
    color: var(--greyColor20);
}

.average-prices__price-table-header button::after {
    background-image: url("/frontend/assets/Rentaroof/Component/AveragePricesPerArea/Presentation/Images/ChevronBlack-372c53dc23.svg");
    background-repeat: no-repeat;
    background-position: bottom;
    height: .5rem;
    width: 1.5rem;
    content: '';
    display: inline-block;
}

.average-prices__sort-desc::after {
    transform: rotate(180deg);
}

.average-prices__area {
    text-align: left;
    width: 60%;
}

.average-prices__properties {
    text-align: left;
    width: 25%;
}

.average-prices__price {
    text-align: right;
    width: 30%;
}

.average-prices__hidden {
    display: none;
}

.average-prices__show-more {
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    gap: .5rem;
    min-width: 9rem;
}

.average-prices__show-more::after {
    background-image: url("/frontend/assets/Rentaroof/Component/AveragePricesPerArea/Presentation/Images/ChevronBlue-89d4458504.svg");
    background-repeat: no-repeat;
    background-position: center;
    height: 1.5rem;
    width: 1.5rem;
    content: '';
}

.average-prices__show-less::after {
    transform: rotate(180deg);
}

.average-prices__no-data {
    text-align: center;
    padding: 2rem 0;
    color: var(--greyColor30);
    font-size: 1rem;
    font-style: italic;
    margin: 0;
}

@media (max-width: 813px) {
    .average-prices {
        background-position: 16rem -2.25rem;
        padding: 1rem;
    }

    .average-prices__tabs-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .average-prices__tabs {
        width: 100%;
    }

    .average-prices__tab {
        padding: .5rem 1rem;
    }

    .average-prices__toggle-container {
        width: auto;
    }

    .average-prices__toggle-inner-container {
       width: 100%;
    }

    .average-prices__toggle-indicator {
        width: 50%;
    }

    .average-prices__area,
    .average-prices__properties,
    .average-prices__price {
        width: auto;
    }
}
