/* Epil: каталог студий — раскладка, «Премиум», звёзды, кнопка связи, галочка «Рекомендуем», значок медлицензии. */
:root {
    --epil-featured: #8b7ae6;
    --epil-featured-soft: #f5f2ff;
    --epil-featured-border: #c9bff5;
    --epil-recommended: #22c55e;
    --epil-license: #e11d48;
    --epil-star: #ffb800;
    --epil-star-empty: #dfe5ec;
}

/* 1. Раскладка: список 2/3, карта 1/3 (ниже 1200 px — как в теме) */
@media (min-width: 1200px) {
    .listivo-map-search__left {
        flex: 0 0 66.6667%;
        width: 66.6667%;
        max-width: none;
    }

    .listivo-map-search__right {
        flex: 1 1 0%;
        min-width: 0;
    }

    /* Плитка в левой части: 2 колонки, от 1600 px — 3 */
    .listivo-map-search__left .listivo-listing-grid--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1600px) {
    .listivo-map-search__left .listivo-listing-grid--cards {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* 2. Выделенное объявление — мягкий лавандовый вместо розового, плашка «Премиум» */
.listivo-highlight-featured-listings .listivo-listing-card-row--featured,
.listivo-highlight-featured-listings .listivo-listing-card-v3--featured,
.listivo-listing-card-row--featured,
.listivo-listing-card-v3--featured {
    border-color: var(--epil-featured-border) !important;
    box-shadow: 0 0 0 1px var(--epil-featured-border), 0 6px 18px rgba(139, 122, 230, .14);
}

.listivo-highlight-featured-listings .listivo-listing-card-row--featured .listivo-listing-card-row__main,
.listivo-highlight-featured-listings .listivo-listing-card-row--featured .listivo-listing-card-row__body,
.listivo-highlight-featured-listings .listivo-listing-card-row--featured .listivo-listing-card-row__inner,
.listivo-highlight-featured-listings .listivo-listing-card-v3--featured .listivo-listing-card-v3__body,
.listivo-highlight-featured-listings .listivo-listing-card-v3--featured .listivo-listing-card-v3__inner {
    background-color: var(--epil-featured-soft) !important;
}

/* Плашки категорий внутри выделенной карточки (в теме — коралловые) */
.listivo-highlight-featured-listings .listivo-listing-card-row--featured .listivo-listing-card-row__attribute,
.listivo-highlight-featured-listings .listivo-listing-card-v3--featured .listivo-listing-card-v3__attribute {
    background-color: #e9e3ff !important;
    border-color: #d6ccfb !important;
    color: #5a4bb5 !important;
}

.listivo-listing-card-row__featured,
.listivo-listing-card-v3__featured,
.listivo-listing-card-row__label--featured,
.listivo-listing-card-v3__label--featured {
    background: var(--epil-featured) !important;
    border-color: var(--epil-featured) !important;
    color: #fff !important;
}

/* 3. Звёзды общего рейтинга под названием */
.epil-card-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 6px;
    color: var(--e-global-color-lcolor1, #374b5c);
    font-size: 13px;
    line-height: 1;
}

.epil-card-stars__stars {
    display: inline-flex;
    gap: 1px;
}

.epil-card-stars__star {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
}

.epil-card-stars__star svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: var(--epil-star-empty);
}

.epil-card-stars__fill {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
}

.epil-card-stars__fill svg {
    fill: var(--epil-star);
}

.epil-card-stars__value {
    font-weight: 700;
}

.epil-card-stars__count {
    color: var(--e-global-color-lcolor2, #73818c);
}

/* 4. Кнопка быстрой связи — в строке с иконками карточки */
.epil-card-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    margin-right: 6px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: filter .15s ease, transform .15s ease;
}

.epil-card-contact svg {
    width: 16px;
    height: 16px;
}

.epil-card-contact:hover,
.epil-card-contact:focus-visible {
    filter: brightness(.94);
    transform: translateY(-1px);
}

.epil-card-contact--telegram {
    background: #229ed9;
}

.epil-card-contact--whatsapp {
    background: #25d366;
}

.listivo-listing-card-row__icons,
.listivo-listing-card-v3__icons {
    align-items: center;
}

/* 5. Значки в правом верхнем углу фото (плашка «Премиум» — слева):
      справа зелёная галочка «Рекомендуем», левее — красный плюс «Есть медицинская лицензия» */
.listivo-listing-card-row__gallery,
.listivo-listing-card-v3__gallery,
.listivo-listing-card-v4__gallery {
    position: relative;
}

.epil-card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    flex-direction: row-reverse;
    gap: 6px;
    pointer-events: none;
}

/* Стикеры на фото карточек; подсказка при наведении — assets/js/badge-tips.js */
.epil-card-badge,
.epil-card-license,
.epil-card-vip,
.epil-card-hygiene,
.epil-card-equipment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
    pointer-events: auto;
}

.epil-card-badge {
    background: var(--epil-recommended);
    color: #fff;
}

.epil-card-license {
    background: #fff;
    color: var(--epil-license);
}

.epil-card-vip {
    background: #facc15;
    color: #713f12;
}

.epil-card-hygiene {
    background: #0ea5e9;
    color: #fff;
}

.epil-card-equipment {
    background: #7c3aed;
    color: #fff;
}

.epil-card-badge svg,
.epil-card-license svg,
.epil-card-vip svg,
.epil-card-hygiene svg,
.epil-card-equipment svg {
    width: 15px;
    height: 15px;
}

/* Маленькие фото (плитка, главная, «похожие студии») — стикеры меньше */
.listivo-listing-card-v3 .epil-card-badges,
.listivo-listing-card-v4 .epil-card-badges {
    top: 8px;
    right: 8px;
    gap: 4px;
}

.listivo-listing-card-v3 :is(.epil-card-badge, .epil-card-license, .epil-card-vip, .epil-card-hygiene, .epil-card-equipment),
.listivo-listing-card-v4 :is(.epil-card-badge, .epil-card-license, .epil-card-vip, .epil-card-hygiene, .epil-card-equipment) {
    width: 22px;
    height: 22px;
    border-width: 1.5px;
}

.listivo-listing-card-v3 :is(.epil-card-badge, .epil-card-license, .epil-card-vip, .epil-card-hygiene, .epil-card-equipment) svg,
.listivo-listing-card-v4 :is(.epil-card-badge, .epil-card-license, .epil-card-vip, .epil-card-hygiene, .epil-card-equipment) svg {
    width: 12px;
    height: 12px;
}

/* В узкой плитке — круглая кнопка-иконка, чтобы не сжимать имя владельца */
.listivo-listing-card-v3 .epil-card-contact {
    width: 32px;
    padding: 0;
    justify-content: center;
}

.listivo-listing-card-v3 .epil-card-contact span {
    display: none;
}

@media (max-width: 600px) {
    .epil-card-contact span {
        display: none;
    }

    .epil-card-contact {
        width: 32px;
        padding: 0;
        justify-content: center;
    }
}

/* 6. Имя владельца внизу карточки — мелкой подписью (13 px), а не заголовком */
html body .listivo-listing-card-user-selector,
html body .listivo-listing-card-user-selector span {
    font-family: var(--epil-font-text, inherit);
    font-size: var(--epil-fs-xs, 13px) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}
