/* ==========================================
   FLEEPIT CORE
   PeepSo + HivePress
========================================== */

:root {
    --fleepit-border-color: #e5e5e5;
    --fleepit-border: 1px solid var(--fleepit-border-color);
}


/* ==========================================
   1. МОИ ОБЪЯВЛЕНИЯ
========================================== */

.fleepit-profile-listings {
    width: 100%;
}

.fleepit-add-listing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;
    margin: 0 0 20px;
    padding: 7px 18px;

    background: #1f1f1f;
    border: 0;
    border-radius: 0 !important;

    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;

    cursor: pointer;
    transition: background 0.2s ease;
}

.fleepit-add-listing-button:hover {
    background: #333;
    color: #fff !important;
}

.fleepit-listings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.fleepit-listing-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    overflow: hidden;

    background: #fff;
    border: var(--fleepit-border);
    border-radius: 0 !important;
    box-shadow: none !important;
}

.fleepit-listing-card__image {
    display: block;
    overflow: hidden;

    background: #f3f3f3;
    border-radius: 0 !important;
    text-decoration: none;
}

.fleepit-listing-card__image img,
.fleepit-listing-card__placeholder {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    border-radius: 0 !important;
    object-fit: cover;
}

/* Hover изображения в разделе «Мои объявления» */
.fleepit-listing-card__image img {
    transition:
        filter 0.25s ease,
        opacity 0.25s ease !important;

    transform: none !important;
    filter: none;
}

.fleepit-listing-card__image:hover img,
.fleepit-listing-card:hover .fleepit-listing-card__image img {
    transform: none !important;
    filter:
        saturate(1.2)
        contrast(1.05);
}

.fleepit-listing-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;

    padding: 14px;
}

.fleepit-listing-card__top {
    display: flex;
    margin-bottom: 10px;
}

.fleepit-listing-card__status {
    display: inline-flex;
    align-items: center;

    min-height: 24px;
    padding: 5px 8px;

    background: #eee;
    border-radius: 0 !important;

    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.fleepit-listing-card__status--publish {
    background: #e5f5e9;
    color: #24733a;
}

.fleepit-listing-card__status--pending {
    background: #fff1cc;
    color: #8a6500;
}

.fleepit-listing-card__status--draft {
    background: #eee;
    color: #555;
}

.fleepit-listing-card__status--private {
    background: #f1e8ff;
    color: #654294;
}

.fleepit-listing-card__title {
    margin: 0 0 8px;

    font-size: 17px;
    line-height: 1.25;
}

.fleepit-listing-card__title a {
    color: inherit;
    text-decoration: none;
}

.fleepit-listing-card__price {
    margin-bottom: 14px;

    font-size: 16px;
    font-weight: 600;
}

.fleepit-listing-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    width: 100%;
    margin-top: auto;
}

.fleepit-listing-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;
    padding: 8px 13px;

    background: #1f1f1f;
    border: 1px solid #1f1f1f;
    border-radius: 0 !important;

    color: #fff !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
}

.fleepit-listing-card__button:hover {
    background: #3a3a3a;
    border-color: #3a3a3a;
    color: #fff !important;
}

.fleepit-listing-card__button--secondary {
    background: transparent;
    color: #1f1f1f !important;
}

.fleepit-listing-card__button--secondary:hover {
    background: #f3f3f3;
    color: #1f1f1f !important;
}


/* ==========================================
   2. PEEPSO — СБРОС СКРУГЛЕНИЙ
========================================== */

/*
 * Убираем скругления только внутри PeepSo.
 * Ниже аватарам и индикаторам круг возвращается.
 */

body #peepso-wrap,
body #peepso-wrap *,
body .widget_peepso,
body .widget_peepso * {
    border-radius: 0 !important;
}


/* Основные блоки без теней */

body #peepso-wrap .pso-widget,
body #peepso-wrap .pso-profile,
body #peepso-wrap .pso-member,
body #peepso-wrap .pso-navbar,
body #peepso-wrap .pso-dropdown,
body #peepso-wrap .pso-dropdown__menu,
body #peepso-wrap .pso-search,
body #peepso-wrap .pso-alert,
body #peepso-wrap .pso-post,
body #peepso-wrap .pso-comment,
body #peepso-wrap .pso-modal,
body #peepso-wrap .pso-popup,
body #peepso-wrap .pso-card,
body #peepso-wrap .pso-postbox,
body .widget_peepso .pso-widget,
body .widget_peepso .pso-profile,
body .widget_peepso .pso-profile__cover,
body .widget_peepso .pso-profile__user {
    box-shadow: none !important;
}


/* ==========================================
   3. PEEPSO — ЕДИНЫЕ ОБВОДКИ
========================================== */

/*
 * Верхняя панель:
 * рамка только у внешнего контейнера.
 */

body #peepso-wrap .pso-navbar {
    border: var(--fleepit-border) !important;
    box-shadow: none !important;
}

body #peepso-wrap .pso-navbar__inner,
body #peepso-wrap .pso-navbar__tabs,
body #peepso-wrap .pso-navbar__user,
body #peepso-wrap .pso-navbar__submenu {
    border: 0 !important;
    box-shadow: none !important;
}


/*
 * Панель поиска:
 * рамка только у внешней строки.
 */

body #peepso-wrap .pso-members__filters {
    border: var(--fleepit-border) !important;
    box-shadow: none !important;
}

body #peepso-wrap .pso-members__filters > *,
body #peepso-wrap .pso-search,
body #peepso-wrap .pso-search__input,
body #peepso-wrap .pso-search input {
    box-shadow: none !important;
}


/*
 * Само поле поиска сохраняет свою обычную
 * внутреннюю рамку, но без второй рамки
 * вокруг родительского контейнера.
 */

body #peepso-wrap .pso-search {
    border: 0 !important;
}

body #peepso-wrap .pso-search input,
body #peepso-wrap input[type="search"] {
    border: var(--fleepit-border) !important;
}


/* Переключатели вида рядом с поиском */

body #peepso-wrap .pso-members__view,
body #peepso-wrap .pso-members__view > *,
body #peepso-wrap .pso-members__filters button {
    box-shadow: none !important;
}


/* Карточки участников */

body #peepso-wrap .pso-member {
    border: var(--fleepit-border) !important;
    box-shadow: none !important;
}


/* Убираем внутреннюю рамку частей карточки */

body #peepso-wrap .pso-member__header,
body #peepso-wrap .pso-member__body,
body #peepso-wrap .pso-member__bottom {
    border: 0 !important;
}


/* Кнопки в карточках */

body #peepso-wrap .pso-member .pso-btn,
body #peepso-wrap .pso-member .ps-btn,
body #peepso-wrap .pso-member button,
body #peepso-wrap .pso-member a[class*="btn"] {
    border: var(--fleepit-border) !important;
    box-shadow: none !important;
}


/*
 * Обычные кнопки PeepSo.
 * Не назначаем рамку всем ссылкам подряд.
 */

body #peepso-wrap .pso-btn,
body #peepso-wrap .ps-btn,
body #peepso-wrap .pso-button,
body #peepso-wrap .ps-button {
    box-shadow: none !important;
}


/* Поля ввода */

body #peepso-wrap input,
body #peepso-wrap textarea,
body #peepso-wrap select,
body .widget_peepso input,
body .widget_peepso textarea,
body .widget_peepso select {
    border: var(--fleepit-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* Не добавляем рамку чекбоксам и радиокнопкам */

body #peepso-wrap input[type="checkbox"],
body #peepso-wrap input[type="radio"],
body .widget_peepso input[type="checkbox"],
body .widget_peepso input[type="radio"] {
    border: initial !important;
}


/* Лента и комментарии */

body #peepso-wrap .pso-post,
body #peepso-wrap .pso-comment,
body #peepso-wrap .pso-postbox,
body #peepso-wrap .pso-card,
body #peepso-wrap .pso-widget {
    border-color: var(--fleepit-border-color) !important;
    box-shadow: none !important;
}


/* Голубое уведомление сохраняет свой цвет */

body #peepso-wrap .pso-alert {
    border-width: 1px !important;
    border-style: solid !important;
    box-shadow: none !important;
}


/* ==========================================
   4. PEEPSO — АВАТАРЫ
========================================== */

/* Контейнеры аватаров */

body #peepso-wrap .pso-avatar,
body #peepso-wrap a.pso-avatar,
body #peepso-wrap .pso-member__avatar,
body #peepso-wrap .pso-navbar__user-avatar,
body .widget_peepso .pso-avatar,
body .widget_peepso a.pso-avatar,
body .widget_peepso .pso-profile-user__avatar {
    border-radius: 50% !important;
}


/*
 * В карточках участников оставляем
 * overflow: visible, чтобы не обрезать
 * зелёный индикатор.
 */

body #peepso-wrap .pso-member__avatar,
body #peepso-wrap .pso-member a.pso-avatar {
    overflow: visible !important;
}


/* Сами изображения */

body #peepso-wrap .pso-avatar > img,
body #peepso-wrap a.pso-avatar > img,
body #peepso-wrap .pso-member__avatar > img,
body #peepso-wrap .pso-member__avatar a > img,
body #peepso-wrap .pso-navbar__user img,
body #peepso-wrap .pso-dropdown__toggle img,
body .widget_peepso .pso-avatar > img,
body .widget_peepso a.pso-avatar > img,
body .widget_peepso .pso-profile-user__avatar > img,
body img.ps-js-widget-me-avatar {
    display: block !important;

    border-radius: 50% !important;
    object-fit: cover !important;
}


/* Большой аватар в левом виджете */

body .widget_peepso a.pso-avatar.pso-avatar--lg.pso-profile-user__avatar,
body .widget_peepso .pso-profile-user__avatar {
    box-sizing: border-box !important;

    padding: 4px !important;

    background: #fff !important;
    border: 0 !important;
    border-radius: 50% !important;

    overflow: hidden !important;
}

body .widget_peepso a.pso-avatar.pso-avatar--lg.pso-profile-user__avatar > img,
body .widget_peepso .pso-profile-user__avatar > img,
body .widget_peepso .pso-profile-user__avatar > img.ps-js-widget-me-avatar {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    border-radius: 50% !important;
    object-fit: cover !important;
}


/* Аватары в ленте и комментариях */

body #peepso-wrap .pso-post__avatar,
body #peepso-wrap .pso-comment__avatar,
body #peepso-wrap .pso-postbox__avatar,
body #peepso-wrap .ps-post__avatar,
body #peepso-wrap .ps-comment__avatar {
    border-radius: 50% !important;
    overflow: hidden !important;
}

body #peepso-wrap .pso-post__avatar img,
body #peepso-wrap .pso-comment__avatar img,
body #peepso-wrap .pso-postbox__avatar img,
body #peepso-wrap .ps-post__avatar img,
body #peepso-wrap .ps-comment__avatar img,
body #peepso-wrap img.avatar,
body #peepso-wrap img[class*="avatar"],
body .widget_peepso img.avatar,
body .widget_peepso img[class*="avatar"] {
    border-radius: 50% !important;
    object-fit: cover !important;
}


/* ==========================================
   5. PEEPSO — ИНДИКАТОРЫ ОНЛАЙНА
========================================== */

body #peepso-wrap .ps-online,
body #peepso-wrap .pso-online,
body #peepso-wrap [class~="ps-online"],
body #peepso-wrap [class~="pso-online"],
body #peepso-wrap [class*="ps-online--"],
body #peepso-wrap [class*="pso-online--"],
body .widget_peepso .ps-online,
body .widget_peepso .pso-online,
body .widget_peepso [class*="ps-online--"],
body .widget_peepso [class*="pso-online--"] {
    border-radius: 50% !important;
}

body #peepso-wrap .ps-online--md,
body #peepso-wrap .pso-online--md {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;

    border-radius: 50% !important;
}


/* ==========================================
   6. HIVEPRESS
========================================== */

body .hp-page,
body .hp-template,
body .hp-form,
body .hp-form__field,
body .hp-field,
body .hp-listing,
body .hp-widget,
body .hp-menu,
body .hp-button,
body .hp-page input,
body .hp-page textarea,
body .hp-page select,
body .hp-page button {
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* Аватар продавца */

body .hp-vendor__image,
body .hp-vendor__image img,
body .fleepit-listing-author__avatar,
body .fleepit-listing-author__image {
    border-radius: 50% !important;
}

body .hp-vendor__image,
body .fleepit-listing-author__avatar {
    overflow: hidden !important;
}


/* ==========================================
   7. АДАПТИВ
========================================== */

@media (max-width: 1024px) {
    .fleepit-listings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .fleepit-listings-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   PEEPSO — панель вида и поиска
========================================== */

/* Блок с иконками переключения вида */
body #peepso-wrap .pso-members__view {
    display: inline-flex !important;

    border: var(--fleepit-border) !important;
    box-shadow: none !important;
}

/* Сами кнопки внутри блока */
body #peepso-wrap .pso-members__view > a,
body #peepso-wrap .pso-members__view > button {
    border: 0 !important;
    box-shadow: none !important;
}

/* Разделитель между двумя иконками */
body #peepso-wrap .pso-members__view > a + a,
body #peepso-wrap .pso-members__view > button + button,
body #peepso-wrap .pso-members__view > a + button,
body #peepso-wrap .pso-members__view > button + a {
    border-left: var(--fleepit-border) !important;
}


/* Общая рамка вокруг строки поиска */
body #peepso-wrap .pso-members__search {
    display: flex !important;
    align-items: center !important;

    border: var(--fleepit-border) !important;
    box-shadow: none !important;
}


/* Убираем лишнюю внутреннюю рамку у поля */
body #peepso-wrap .pso-members__search input,
body #peepso-wrap input.ps-js-members-query {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}


/* Иконка поиска и кнопка фильтров без отдельных рамок */
body #peepso-wrap .pso-members__search > *,
body #peepso-wrap .pso-members__search a,
body #peepso-wrap .pso-members__search button {
    box-shadow: none !important;
}


/* Кнопка фильтра справа отделяется вертикальной линией */
body #peepso-wrap .pso-members__search > a:last-child,
body #peepso-wrap .pso-members__search > button:last-child {
    border: 0 !important;
    border-left: var(--fleepit-border) !important;
}

/* ==========================================
   PEEPSO — ЛЕНТА: блок публикации
========================================== */

/* Одна общая рамка вокруг формы создания записи */
body #peepso-wrap .pso-postbox {
    border: var(--fleepit-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* У вложенных частей не должно быть второй внешней рамки */
body #peepso-wrap .pso-postbox__view,
body #peepso-wrap .pso-postbox__menu,
body #peepso-wrap .pso-postbox__content {
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* ==========================================
   PEEPSO — ЛЕНТА: круглые аватары
========================================== */

/* Контейнеры аватаров в публикациях,
   комментариях и форме создания записи */
body #peepso-wrap .pso-avatar,
body #peepso-wrap .ps-avatar,
body #peepso-wrap .pso-post__avatar,
body #peepso-wrap .ps-post__avatar,
body #peepso-wrap .pso-comment__avatar,
body #peepso-wrap .ps-comment__avatar,
body #peepso-wrap .pso-postbox__avatar,
body #peepso-wrap .ps-postbox__avatar,
body #peepso-wrap [class*="post__avatar"],
body #peepso-wrap [class*="comment__avatar"],
body #peepso-wrap [class*="postbox__avatar"] {
    border-radius: 50% !important;
    overflow: hidden !important;
}

/* Сами изображения */
body #peepso-wrap .pso-avatar img,
body #peepso-wrap .ps-avatar img,
body #peepso-wrap .pso-post__avatar img,
body #peepso-wrap .ps-post__avatar img,
body #peepso-wrap .pso-comment__avatar img,
body #peepso-wrap .ps-comment__avatar img,
body #peepso-wrap .pso-postbox__avatar img,
body #peepso-wrap .ps-postbox__avatar img,
body #peepso-wrap [class*="post__avatar"] img,
body #peepso-wrap [class*="comment__avatar"] img,
body #peepso-wrap [class*="postbox__avatar"] img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    object-fit: cover !important;
}

/* ==========================================
   PEEPSO — индикатор онлайн в шапке профиля
========================================== */

/*
 * Не меняем position, left, right, top и bottom:
 * расположением аватара и индикатора управляет PeepSo.
 */
body #peepso-wrap .ps-focus__avatar {
    overflow: visible !important;
}

/* Само изображение аватара остаётся круглым */
body #peepso-wrap .ps-focus__avatar img {
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Внешняя часть онлайн-индикатора */
body #peepso-wrap .ps-focus__avatar .ps-online,
body #peepso-wrap .ps-focus__avatar .pso-online {
    border-radius: 50% !important;
    overflow: visible !important;
}

/* Внутренняя зелёная точка */
body #peepso-wrap .ps-focus__avatar .ps-online__inner,
body #peepso-wrap .ps-focus__avatar .pso-online__inner {
    border-radius: 50% !important;
}

/* ==========================================
   FLEEPIT — единый hover фотографий
========================================== */

/* Изображения HivePress, PeepSo и «Мои объявления» */
body .hp-listing img,
body #peepso-wrap .ps-post img,
body #peepso-wrap .ps-media img,
body #peepso-wrap .pso-post img,
body #peepso-wrap .pso-media img,
body .fleepit-listing-card__image img {
    transition:
        filter 0.25s ease,
        opacity 0.25s ease !important;
}

/* Эффект при наведении */
body .hp-listing:hover img,
body #peepso-wrap .ps-post img:hover,
body #peepso-wrap .ps-media img:hover,
body #peepso-wrap .pso-post img:hover,
body #peepso-wrap .pso-media img:hover,
body .fleepit-listing-card__image:hover img,
body .fleepit-listing-card:hover .fleepit-listing-card__image img {
    filter:
        saturate(1.2)
        contrast(1.05);
}

/* Аватары никогда не меняем фильтром */
body #peepso-wrap .pso-avatar img,
body #peepso-wrap .ps-avatar img,
body #peepso-wrap img.avatar,
body .widget_peepso img[class*="avatar"],
body .hp-vendor__image img,
body .fleepit-listing-author__avatar img {
    filter: none !important;
}