/* Избранное: активный флажок, кнопка «В избранное», всплывающее сообщение,
   страница подборки /list/{token}/ и блок подборок в кабинете. */

/* --- Флажок в строке лота / на карточке мото --- */
.car-lot__bm.is-fav svg,
.moto-card__bm.is-fav svg { fill: var(--s-orange-color, #ff6a00); stroke: var(--s-orange-color, #ff6a00); }

.moto-card__bm {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: rgba(255, 255, 255, .92); color: #14161a;
    cursor: pointer; transition: background .15s ease;
}
.moto-card__bm:hover { background: #fff; }
.moto-card__bm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* --- Кнопка «В избранное» на карточке лота --- */
.fav-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.fav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn.is-fav { color: var(--s-orange-color, #ff6a00); border-color: var(--s-orange-color, #ff6a00); }
.fav-btn.is-fav svg { fill: var(--s-orange-color, #ff6a00); stroke: var(--s-orange-color, #ff6a00); }

/* Кнопка на карточке мото (у авто своя рамка от .lot-tool) */
.ml-fav {
    margin: 12px 0 0;
    padding: 9px 14px;
    background: #fff; border: 1px solid #e3e6ea; border-radius: 10px;
    color: #14161a; font-family: var(--s-heading-font); font-size: 13px; font-weight: 600;
}
.ml-fav:hover { border-color: var(--s-orange-color, #ff6a00); }

/* --- Всплывающее сообщение --- */
/* Плашка «добавлено в подборку» — В ПРАВОМ нижнем углу (просьба Игоря: по центру она
   перекрывала список и липкую пагинацию, которая теперь слева внизу). */
.fav-toast {
    position: fixed; right: 24px; bottom: 26px; z-index: 10060;
    transform: translateY(16px);
    min-width: 260px; max-width: min(420px, 92vw);
    padding: 16px 18px; border-radius: 14px;
    background: #14161a; color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .38);
    opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.fav-toast.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
/* Плашка висит, пока не закроют крестиком — оставляем под него место справа */
.fav-toast__close {
    position: absolute; top: 8px; right: 10px;
    width: 28px; height: 28px; padding: 0;
    background: none; border: none; border-radius: 8px;
    color: #fff; opacity: .55; font-size: 22px; line-height: 1; cursor: pointer;
}
.fav-toast__close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.fav-toast__title { font-weight: 700; font-size: 15px; line-height: 1.3; padding-right: 30px; }
.fav-toast__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.fav-toast__link {
    background: none; border: none; padding: 0;
    color: var(--s-orange-color, #ff6a00); font: inherit; font-size: 14px;
    text-decoration: underline; cursor: pointer;
}

.fav-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 46vh; overflow-y: auto; }
.fav-pick__item, .fav-pick__new {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 10px 12px;
    background: rgba(255, 255, 255, .08); border: none; border-radius: 10px;
    color: #fff; font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.fav-pick__item:hover, .fav-pick__new:hover { background: rgba(255, 255, 255, .16); }
.fav-pick__item i { font-style: normal; opacity: .6; font-size: 13px; }
.fav-pick__new { justify-content: center; color: var(--s-orange-color, #ff6a00); }

/* --- Подборки в кабинете --- */
.fav-rows { margin-top: 10px; }
.fav-rows__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.fav-rows__title { font-size: 20px; margin: 0; }
.fav-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    padding: 16px 18px; margin-bottom: 10px;
    background: var(--s-grey-20-color, #1c1d20);
    border: 1px solid var(--s-grey-30-color, #2a2b2e);
    border-radius: 14px;
}
.fav-row.is-active { border-color: var(--s-orange-color, #ff6a00); }
.fav-row__name { font-weight: 700; color: #fff; font-size: 16px; }
.fav-row__cnt { color: var(--s-grey-50-color, #a7a9ad); font-size: 13px; }
.fav-row__badge { font-size: 12px; color: var(--s-orange-color, #ff6a00); }
.fav-row__acts { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; }
.fav-row__act {
    background: none; border: none; padding: 0;
    color: var(--s-grey-50-color, #a7a9ad); font: inherit; font-size: 13px;
    text-decoration: underline; cursor: pointer;
}
.fav-row__act:hover { color: var(--s-orange-color, #ff6a00); }
.fav-row__act--open { color: var(--s-orange-color, #ff6a00); }

/* --- Страница подборки /list/{token}/ --- */
.fav-page { padding: 40px 0 80px; }
.fav-page__header { margin-bottom: 26px; }
.fav-page__share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.fav-page__url {
    flex: 1 1 320px; min-width: 0; height: 46px; padding: 0 14px;
    border: 1px solid var(--s-grey-55-color, #3a3b3e); border-radius: 10px;
    background: #fff; color: #14161a; font-size: 14px;
}
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.fav-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--s-grey-20-color, #1c1d20);
    border: 1px solid var(--s-grey-30-color, #2a2b2e);
    border-radius: 14px; overflow: hidden; text-decoration: none;
    transition: transform .2s ease, border-color .2s ease;
}
.fav-card:hover { transform: translateY(-3px); border-color: var(--s-orange-color, #ff6a00); }
.fav-card__img { aspect-ratio: 16/10; background: #eceef1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fav-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-card__noimg { color: #b8bcc4; font-size: 13px; font-weight: 600; }
.fav-card__body { padding: 14px 16px 16px; }
.fav-card__name { color: #fff; font-weight: 700; font-size: 16px; line-height: 1.2; }
.fav-card__grade { color: var(--s-grey-50-color, #a7a9ad); font-weight: 600; font-size: 14px; }
.fav-card__meta { color: var(--s-grey-50-color, #a7a9ad); font-size: 13px; margin-top: 5px; }
.fav-card__price { margin-top: 10px; color: var(--s-orange-color, #ff6a00); font-weight: 800; font-size: 17px; }
.fav-card__price span { color: var(--s-grey-50-color, #a7a9ad); font-size: 12px; font-weight: 600; }
.fav-card__kind {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    padding: 4px 9px; border-radius: 7px;
    background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 700;
}
.fav-card__del {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: 30px; height: 30px; border: none; border-radius: 8px;
    background: rgba(0, 0, 0, .6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.fav-card__del:hover { background: #c0392b; }
.fav-empty { color: var(--s-grey-50-color, #a7a9ad); }
.fav-crumbs { margin-bottom: 18px; }

/* Карточки лотов не должны упираться в блок менеджеров «Всегда с нами на связи» */
.fav-page .fav-grid, .fav-page .fav-empty, .fav-page .fav-results { margin-bottom: 56px; }

/* Крестик «убрать из подборки» — в колонке «Действие» строки лота */
.fav-row-del {
    margin-top: 8px; width: 30px; height: 30px;
    border: 1px solid #e3e6ea; border-radius: 8px;
    background: #fff; color: #8b9098;
    font-size: 18px; line-height: 1; cursor: pointer;
}
.fav-row-del:hover { background: #c0392b; border-color: #c0392b; color: #fff; }

/* Другие подборки владельца */
.fav-other { margin-bottom: 56px; }
.fav-other__title { font-size: 20px; margin: 0 0 16px; }
.fav-other__grid { display: flex; flex-wrap: wrap; gap: 10px; }
.fav-other__item {
    display: inline-flex; align-items: baseline; gap: 8px;
    padding: 12px 16px; border-radius: 12px;
    background: var(--s-grey-20-color, #1c1d20);
    border: 1px solid var(--s-grey-30-color, #2a2b2e);
    text-decoration: none; transition: border-color .15s ease;
}
.fav-other__item:hover { border-color: var(--s-orange-color, #ff6a00); }
.fav-other__name { color: #fff; font-weight: 700; font-size: 15px; }
.fav-other__cnt { color: var(--s-grey-50-color, #a7a9ad); font-size: 13px; }
.fav-other__all { display: inline-block; margin-top: 14px; color: var(--s-orange-color, #ff6a00); font-size: 14px; }

/* Комментарии живут под строкой и не меняют семь колонок каталога. */
.fav-list-item { background: #fff; border-bottom: 1px solid #eceef1; }
.fav-list-item:last-child { border-bottom: 0; }
.fav-list-item > .car-lot { border-bottom: 0; }
.fav-comment { padding: 0 20px 18px; color: #14161a; font-size: 14px; line-height: 1.5; }
.fav-comment [hidden] { display: none !important; }
.fav-comment__view { padding: 12px 14px; border-radius: 10px; background: #f4f5f7; }
.fav-comment__title { display: block; margin-bottom: 4px; font-size: 12px; color: #555b65; }
.fav-comment__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.fav-comment__edit { display: inline-block; padding: 7px 0 0; background: none; border: 0; color: #9a3e00; font: inherit; text-decoration: underline; cursor: pointer; }
.fav-comment__form { margin-top: 10px; max-width: 820px; }
.fav-comment__form label { display: block; margin-bottom: 6px; color: #14161a; font-weight: 600; }
.fav-comment__form textarea { display: block; width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid #a4a9b1; border-radius: 10px; background: #fff; color: #14161a; font: inherit; line-height: 1.5; resize: vertical; box-sizing: border-box; }
.fav-comment__form small { display: block; margin-top: 6px; color: #555b65; font-size: 12px; }
.fav-comment__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.fav-comment__save, .fav-comment__cancel { padding: 9px 16px; border-radius: 9px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.fav-comment__save { background: var(--s-orange-color, #ff6a00); color: #14161a; }
.fav-comment__cancel { background: #eceef1; color: #333842; }
.fav-comment__status { margin: 8px 0 0; color: #a32319; font-size: 13px; }
.fav-comment button:focus { outline: none; }
.fav-comment button:focus-visible { background: #14161a; color: #fff; text-decoration: underline; }
.fav-comment textarea:focus { outline: none; border-color: #14161a; background: #fffbea; }
.fav-comment button:disabled { opacity: .6; cursor: wait; }

@media (max-width: 1024px) {
    .fav-list-item { margin-bottom: 12px; border: 0; border-radius: 14px; }
    .fav-list-item > .car-lot, .fav-list-item > .car-lot:last-child { margin-bottom: 0; }
    .fav-comment { padding: 0 16px 16px; }
}

@media (max-width: 680px) {
    .fav-row__acts { margin-left: 0; width: 100%; }
    .fav-toast { left: 12px; right: 12px; bottom: 12px; transform: translateY(16px); max-width: none; }
    .fav-toast.is-on { transform: translateY(0); }
}

/* The same public comment on a lot and in every selection. */
.fav-comment--lot { padding: 0; margin-top: 24px; min-width: 0; }
.fav-comment--lot .fav-comment__view { padding: 18px 20px; background: #f4f5f7; border-radius: 12px; }
.fav-comment--lot .fav-comment__title { font-size: 15px; font-weight: 700; color: #14161a; margin-bottom: 8px; }
.fav-comment--lot .fav-comment__text { font-size: 14px; line-height: 1.6; }
.fav-comment--lot .fav-comment__edit { margin-top: 4px; }
.fav-comment__delete { background: transparent; border: 0; padding: 9px 0; color: #a32319; font: inherit; cursor: pointer; text-decoration: underline; }
.lot-single .fav-comment__status, .moto-lot .fav-comment__status { margin: 8px 0 0; padding: 0; }
.lot-single .fav-comment--lot, .moto-lot .fav-comment--lot { width: 100%; }
@media (max-width: 680px) {
    .fav-comment--lot { padding: 0; margin-top: 20px; }
    .fav-comment--lot .fav-comment__view { padding: 15px 16px; }
}
