.rent-rating {
    font-family: inherit;
}

.rent-rating-section {
    margin-bottom: 30px;
}

.rent-rating-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #111;
    line-height: 1.2;
}

.rent-rating-heading {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

.rent-rating-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid #d8d8d8;
    border-radius: 50%;
    background: #f3f3f3;
    color: #222;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    cursor: help;
}

.rent-rating-hint-wrap {
    position: relative;
    display: inline-flex;
}

.rent-rating-hint:focus {
    outline: 2px solid var(--main);
    outline-offset: 2px;
}

.rent-rating-tooltip {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 10px);
    right: 0;
    width: 560px;
    max-width: calc(100vw - 24px);
    max-height: min(75vh, 620px);
    overflow-y: auto;
    padding: 22px 24px;
    border-radius: 8px;
    background: #202f3e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    visibility: hidden;
}

.rent-rating-hint-wrap:hover .rent-rating-tooltip,
.rent-rating-hint-wrap:focus-within .rent-rating-tooltip,
.rent-rating-hint-wrap.is-open .rent-rating-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.rent-rating-tooltip-text {
    white-space: pre-line;
}

@media (max-width: 480px) {
    .rent-rating-tooltip {
        position: fixed;
        top: 16px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 32px);
        padding: 18px 20px;
    }
}

.rent-rating-table {
    overflow: hidden;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    background: #fff;
}

.rent-rating-winner-head {
    padding: 0;
    min-height: 44px;
    text-align: center;
}

.rent-rating-winners-block {
    overflow: hidden;
    border: 1px solid var(--main);
    border-radius: 6px;
}

.rent-rating-winner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 86px;
    align-items: center;
    min-height: 38px;
    border-top: 1px solid #ececec;
    color: #222;
    font-size: 15px;
}

.rent-rating-winner-head + .rent-rating-winner {
    border-top: 0;
}

.rent-rating-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 auto;
    border-radius: 50%;
    line-height: 1;
}

.rent-rating-medal-image {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.rent-rating-winner--1 .rent-rating-medal {
    background: #fff5c2;
}

.rent-rating-winner--2 .rent-rating-medal {
    background: #edf0f2;
}

.rent-rating-winner--3 .rent-rating-medal {
    background: #f5e0d0;
}

.rent-rating-winner .rent-rating-name {
    padding-left: 0;
}

.rent-rating-winner .rent-rating-points {
    padding-right: 8px;
}

@media (max-width: 480px) {
    .rent-rating-winner {
        grid-template-columns: 42px minmax(0, 1fr) 72px;
    }
}

.rent-rating-head,
.rent-rating-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 86px;
    align-items: center;
}

.rent-rating-head {
    min-height: 44px;
    background: var(--main);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.rent-rating-head.rent-rating-winner-head {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rent-rating-head .rent-rating-client {
    justify-self: start;
    padding-left: 15px;
    text-align: left;
    white-space: nowrap;
}

.rent-rating-head span:nth-child(3) {
    text-align: center;
}

.rent-rating-body {
    max-height: 545px;
    overflow-y: auto;
}

.rent-rating-row {
    min-height: 38px;
    border-top: 1px solid #ececec;
    color: #222;
    font-size: 15px;
}

.rent-rating-row.is-current {
    background: #f5fbf5;
}

.rent-rating-place {
    color: #9a9a9a;
    text-align: center;
}

.rent-rating-name {
    overflow: hidden;
    padding-left: 0;
    padding-right: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rent-rating-points {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.rent-rating-current {
    margin-bottom: 30px;
    padding: 10px 12px;
    border: 1px solid #d8e8d8;
    border-radius: 6px;
    background-color: var(--main);
}

.rent-rating-current-title {
    margin-bottom: 4px;
    color: var(--white);
    font-size: 13px;
    font-weight: 500;
}

.rent-rating-current-value {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--white);
    font-size: 15px;
}

.rent-rating-current-points {
    font-weight: 700;
}

.rent-rating-mobile-before-areas {
    display: none;
}

.rent-rating-sidebar {
    display: block;
}

/* на мобильном рейтинг показываем после информационного блока и перед площадками */
@media (min-width: 1101px) {
    .rent-rating-mobile-before-areas {
        display: none !important;
    }
}

@media (max-width: 1100px) {
    .rent-rating-mobile-before-areas {
        display: block !important;
        margin-bottom: 30px;
    }

    .rent-rating-sidebar {
        display: none !important;
    }
}
