/* Author: Nesynov David Viktorovich (Несынов Давид Викторович). (c) 2026 GranaDzyak. All rights reserved. */
/* Грана Объявления, Афиша, Работа */
.bd-page { min-width: 0; }
.bd-head { align-items: flex-start; }
.bd-lead { max-width: 640px; margin: 10px 0 0; color: var(--mg-copy); }
.bd-head__acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex: 0 0 auto; margin-top: 18px; }
.bd-head__acts .btn.is-active { border-color: var(--mg-amber); }

.bd-svcs { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.bd-svcs::-webkit-scrollbar { display: none; }
.bd-svc { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--mg-border); border-radius: 999px; color: var(--mg-copy); font: 600 14px/1.2 var(--sans); text-decoration: none; }
.bd-svc i { display: inline-grid; width: 18px; height: 18px; }
.bd-svc svg { width: 18px; height: 18px; }
.bd-svc.is-active { background: var(--mg-amber); border-color: var(--mg-amber); color: #1a1206; }

.bd-filters { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--mg-border); border-radius: 16px; background: var(--mg-card); }
.bd-filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bd-filters input, .bd-filters select, .bd-modal input:not([type=checkbox]):not([type=radio]):not([type=file]), .bd-modal select, .bd-modal textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--mg-border); border-radius: 10px; background: var(--mg-alt);
  color: var(--mg-hi); font: 400 15px/1.3 var(--sans); box-sizing: border-box;
}
.bd-modal textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
.bd-filters input:focus, .bd-filters select:focus, .bd-modal input:focus, .bd-modal select:focus, .bd-modal textarea:focus { outline: 2px solid var(--mg-amber); outline-offset: 0; border-color: transparent; }
.bd-search { flex: 1 1 260px; min-width: 0; }
.bd-field { flex: 0 1 200px; min-width: 0; position: relative; display: flex; align-items: center; gap: 8px; }
.bd-field > span:not(.sr-only) { flex: 0 0 auto; font-size: 13px; color: var(--mg-muted); }
.bd-field--city i { position: absolute; left: 10px; width: 18px; height: 18px; color: var(--mg-muted); pointer-events: none; }
.bd-field--city svg { width: 18px; height: 18px; }
.bd-field--city input { padding-left: 34px; }
.bd-field--num { flex: 0 1 190px; }
.bd-filters__go { flex: 0 0 auto; }
.bd-check { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: var(--mg-copy); font-size: 14px; cursor: pointer; }
.bd-check input { width: 18px; height: 18px; accent-color: var(--mg-amber); margin: 0; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-chip { position: relative; padding: 8px 14px; border: 1px solid var(--mg-border); border-radius: 999px; color: var(--mg-copy); font: 600 13.5px/1.2 var(--sans); cursor: pointer; white-space: nowrap; }
.bd-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bd-chip.is-active { background: var(--mg-amber); border-color: var(--mg-amber); color: #1a1206; }
.bd-chip:focus-within { outline: 2px solid var(--mg-amber); outline-offset: 2px; }

.bd-total { margin: 0 0 10px; font-size: 13px; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.bd-grid--events { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bd-card { position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--mg-border); border-radius: 16px; overflow: hidden; background: var(--mg-card); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.bd-card:hover, .bd-row:hover { border-color: var(--mg-amber); }
.bd-card:hover { transform: translateY(-2px); }
.bd-card__img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: rgba(242, 138, 45, .1); overflow: hidden; }
.bd-card--event .bd-card__img { aspect-ratio: 16 / 9; }
.bd-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-noimg { display: grid; place-items: center; width: 44px; height: 44px; color: var(--mg-gold); opacity: .8; }
.bd-noimg svg { width: 44px; height: 44px; }
.bd-card__count { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; }
.bd-card__count svg { width: 14px; height: 14px; }
.bd-card__body { display: grid; align-content: start; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.bd-card__price { font: 700 17px/1.2 var(--sans); color: var(--mg-hi); }
.bd-card__title { font: 600 15px/1.3 var(--sans); color: var(--mg-hi); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.bd-card__sub { font-size: 13px; color: var(--mg-copy); overflow-wrap: anywhere; }
.bd-card__meta { font-size: 12.5px; color: var(--mg-muted); }
.bd-card__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--mg-amber-lite); font-weight: 600; }
.bd-date { position: absolute; top: 10px; left: 10px; display: grid; justify-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px; background: var(--mg-amber); color: #1a1206; font-size: 11.5px; font-weight: 700; line-height: 1.1; }
.bd-date b { font: 800 22px/1 var(--sans); }

.bd-rows { display: grid; gap: 10px; }
.bd-row { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; padding: 14px 16px; border: 1px solid var(--mg-border); border-radius: 16px; background: var(--mg-card); color: inherit; text-decoration: none; transition: border-color .15s; }
.bd-row__main { display: grid; gap: 4px; min-width: 0; }
.bd-row__pay { font: 700 16px/1.25 var(--sans); color: var(--mg-amber-lite); }
.bd-row__tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(242, 138, 45, .14); color: var(--mg-amber-lite); white-space: nowrap; }
.bd-row__tag--resume { background: rgba(106, 215, 255, .12); color: #4fb3d9; }
.bd-row__date { font-size: 12.5px; color: var(--mg-muted); white-space: nowrap; }

.bd-state { justify-self: start; margin-top: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(148, 136, 115, .18); color: var(--mg-copy); }
.bd-state--hidden, .bd-state--removed { background: rgba(168, 67, 36, .18); color: #e08a68; }

.bd-empty { margin-top: 6px; }
.bd-empty b { text-transform: none; letter-spacing: 0; }
.bd-empty__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.bd-more { display: flex; justify-content: center; margin: 18px 0 6px; }

.bd-back { display: inline-block; margin: 0 0 12px; color: var(--mg-copy); text-decoration: none; font-size: 14px; }
.bd-back:hover { color: var(--mg-amber); }
.bd-item { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); grid-template-areas: "gal side" "text side"; gap: 18px 24px; align-items: start; }
.bd-item--jobs { grid-template-areas: "text side"; }
.bd-gallery { grid-area: gal; display: grid; gap: 8px; min-width: 0; }
.bd-gallery__main { border-radius: 16px; overflow: hidden; background: rgba(242, 138, 45, .08); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.bd-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bd-gallery--none { aspect-ratio: 16 / 7; border-radius: 16px; place-items: center; background: rgba(242, 138, 45, .08); }
.bd-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.bd-thumb { flex: 0 0 72px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.bd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-thumb.is-active { border-color: var(--mg-amber); }
.bd-item__side { grid-area: side; display: grid; gap: 12px; padding: 18px; border: 1px solid var(--mg-border); border-radius: 16px; background: var(--mg-card); position: sticky; top: 84px; }
.bd-item__when { color: var(--mg-amber-lite); font-weight: 700; font-size: 15px; }
.bd-item__title { margin: 0; font: 700 clamp(1.35rem, 2.6vw, 1.75rem)/1.15 var(--sans); color: var(--mg-hi); overflow-wrap: anywhere; }
.bd-item__price { font: 800 22px/1.2 var(--sans); color: var(--mg-hi); }
.bd-item--jobs .bd-item__price { color: var(--mg-amber-lite); }
.bd-facts { display: grid; gap: 6px; margin: 0; }
.bd-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 14px; }
.bd-facts dt { color: var(--mg-muted); }
.bd-facts dd { margin: 0; color: var(--mg-copy); overflow-wrap: anywhere; }
.bd-owner { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--mg-border); }
.bd-owner__ava { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(242, 138, 45, .18); color: var(--mg-hi); font-weight: 700; }
.bd-owner__ava img { width: 100%; height: 100%; object-fit: cover; }
.bd-owner b { display: block; color: var(--mg-hi); }
.bd-owner small { color: var(--mg-muted); font-size: 12.5px; }
.bd-item__acts { display: grid; gap: 8px; }
.bd-item__acts .btn { width: 100%; }
.bd-report { color: var(--mg-muted); border-color: transparent; }
.bd-go { justify-self: start; gap: 10px; }
.bd-go span { padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .18); }
.bd-item__text { grid-area: text; min-width: 0; }
.bd-item__text h2 { margin: 0 0 8px; font: 700 18px/1.2 var(--sans); color: var(--mg-hi); }
.bd-item__text p { margin: 0 0 12px; color: var(--mg-copy); line-height: 1.6; overflow-wrap: anywhere; }
.bd-safe { font-size: 13px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--mg-border); }
.bd-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(148, 136, 115, .14); color: var(--mg-copy); font-size: 13.5px; }
.bd-note.bd-state--hidden, .bd-note.bd-state--removed { background: rgba(168, 67, 36, .16); color: #e08a68; }

.bd-modal__box { max-width: 620px; }
.bd-modal form, .bd-modal__box { display: grid; gap: 12px; }
.bd-modal .plat-modal__title { margin-bottom: 2px; padding-right: 36px; }
.bd-f { display: grid; gap: 6px; min-width: 0; }
.bd-f[hidden] { display: none; }
.bd-f__l { font-size: 13px; font-weight: 600; color: var(--mg-copy); }
.bd-f__h { font-size: 12px; color: var(--mg-muted); }
.bd-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.bd-check--form { align-self: end; }
.bd-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bd-photos:empty { display: none; }
.bd-photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(242, 138, 45, .1); }
.bd-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-photo button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.bd-photos__add { justify-self: start; cursor: pointer; }
.bd-photos__add[hidden] { display: none; }
.bd-reasons { display: grid; gap: 2px; }
.bd-modal .plat-modal__msg.is-err { color: #e08a68; }

@media (max-width: 900px) {
  .bd-item { grid-template-columns: 1fr; grid-template-areas: "gal" "side" "text"; }
  .bd-item--jobs { grid-template-areas: "side" "text"; }
  .bd-item__side { position: static; }
}
@media (max-width: 640px) {
  .bd-head { flex-direction: column; gap: 4px; margin-bottom: 12px; }
  .bd-head__acts { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; width: 100%; box-sizing: border-box; }
  .bd-head__acts .btn { min-width: 0; width: auto; margin: 0; }
  .bd-head__acts .btn--cta { white-space: normal; text-align: center; line-height: 1.2; }
  .bd-head__acts .btn:only-child { grid-column: 1 / -1; }
  .bd-lead { font-size: 14px; margin-top: 8px; }
  .bd-filters { padding: 10px; gap: 8px; }
  .bd-search { flex: 1 1 100%; }
  .bd-field { flex: 1 1 calc(50% - 5px); }
  .bd-field--num { flex: 1 1 calc(50% - 5px); }
  .bd-field--num > span { font-size: 12px; }
  .bd-filters__go { flex: 1 1 100%; }
  .bd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bd-grid--events { grid-template-columns: 1fr; }
  .bd-card__price { font-size: 15.5px; }
  .bd-card__title { font-size: 14px; }
  .bd-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; }
  .bd-row__tag { justify-self: start; }
  .bd-row__date { order: 3; }
  .bd-facts div { grid-template-columns: 104px 1fr; }
  .bd-f2 { grid-template-columns: 1fr; }
  .bd-modal { padding: 0; place-items: end stretch; }
  .bd-modal .plat-modal__box { max-width: none; max-height: 100dvh; border-radius: 18px 18px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* предупреждение под чужим сообщением: предоплата, коды, ссылки, увод в другой мессенджер */
.soc-risk { display: grid; gap: 2px; max-width: min(440px, 86%); margin: 6px 0 2px; padding: 9px 12px 10px 38px; position: relative;
  border: 1px solid rgba(240, 160, 60, .45); border-radius: 12px; background: rgba(240, 160, 60, .1); color: var(--mg-copy);
  font: 400 13px/1.4 var(--sans); }
.soc-risk::before { content: "!"; position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mg-amber); color: #1a1206; font: 800 12px/1 var(--sans); }
.soc-risk b { color: var(--mg-hi); font-weight: 700; }
.soc-msg:has(.soc-risk) { flex-wrap: wrap; }
.soc-msg .soc-risk { order: 5; flex: 0 0 100%; max-width: 100%; box-sizing: border-box; }
.soc-msg:has(.soc-risk) .soc-msg__bubble { max-width: calc(100% - 40px); }

/* папка «Объявления» в списке чатов */
.soc-adfold { gap: 12px; padding: 10px 14px; }
.soc-adfold__ic { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #34c4b0, #3f8cff); color: #fff; }
.soc-adfold__ic svg { color: #fff !important; }
.soc-adfold__body { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.soc-adfold__body b { font-weight: 700; }
.soc-adfold__body span { color: var(--mg-muted); font: 400 13.5px/1.3 var(--body, inherit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-adfold.is-unread .soc-adfold__body span { color: inherit; font-weight: 600; }
.soc-adfold i.soc-adfold__n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #f28a2d; color: #1a0f05; font: 800 12px/22px var(--body, inherit); text-align: center; }
.soc-adchat__ph { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: rgba(127, 127, 127, .15); color: #34c4b0; }
.soc-adchat__ph img { width: 100%; height: 100%; object-fit: cover; }
.soc-adchat .soc-dlist__body .soc-adchat__item { color: #34c4b0; font-size: 12.5px; font-weight: 600; }
.soc-adchat__me { font-style: normal; opacity: .75; }
.soc-adfold__all { display: block; margin: 8px 16px 12px; padding: 10px; border-radius: 12px; text-align: center; font-weight: 600; font-size: 14px; color: var(--mg-amber-lite, #f6b25e); background: rgba(212, 161, 75, .08); }

/* звонок по объявлению */
.bd-callpage { max-width: 460px; margin: 24px auto; padding: 24px; border: 1px solid var(--mg-border); border-radius: 22px; background: var(--mg-panel, rgba(255, 255, 255, .03)); text-align: center; display: grid; gap: 14px; }
.bd-callpage__item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(127, 127, 127, .1); text-align: left; }
.bd-callpage__item img, .bd-callpage__noph { width: 64px; height: 52px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; display: grid; place-items: center; background: rgba(127, 127, 127, .15); }
.bd-callpage__noph svg { width: 26px; height: 26px; }
.bd-callpage__item div { min-width: 0; display: grid; gap: 2px; }
.bd-callpage__item small { color: var(--mg-copy); font-size: 12px; }
.bd-callpage__item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-callpage__name { margin: 6px 0 0; font: 700 26px/1.2 var(--sans); }
.bd-callpage .muted { margin: 0; font-size: 14px; line-height: 1.5; }
.bd-callpage__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bd-callpage__back { color: var(--mg-copy); font-size: 14px; }
