/**
 * File: demov2/assets/css/pages/search.css
 * Purpose: Axtarış nəticələri — yapışqan filtr paneli, siyahı + xəritə bölgüsü
 *          (desktop), mobil xəritə rejimi, aktiv filtrlər, sıralama, səhifələmə.
 *          Rəngli minimal: kateqoriya rəngli ikonlar (çip, başlıq, filtr),
 *          bənövşəyi AI qeydi, brend "axtarışı saxla" və xəritə əməlləri,
 *          açıq zolaqda rəngli populyar axtarışlar. Seçim kontrolları neytraldır.
 */
body[data-page='search'] .hdr .wrap { width: calc(100% - var(--gutter) * 2); max-width: none; }
.srp { padding-bottom: 0; }

/* filtr paneli — səhifə fonu + altda yumşaq kölgə; çiplər ana səhifə sahələri kimi dolğulu, adi yumru künclü */
.fbar { position: sticky; top: var(--hdr-h); z-index: 30; background: var(--bg); box-shadow: 0 8px 16px -14px rgba(16, 24, 40, .22); }
html[data-theme='dark'] .fbar { box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .7); }
body[data-page='search'] .hdr.is-scrolled { box-shadow: none; } /* kölgəni filtr paneli verir */
.fbar__in { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px var(--gutter); }
.fbar .seg { height: 44px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.fbar .seg__btn { height: 36px; font-size: 14px; border-radius: 9px; }
.fbar .seg__thumb { top: 4px; bottom: 4px; border-radius: 9px; box-shadow: none; }
.fbar__chips { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: -4px; }
.fbar__chips::-webkit-scrollbar { display: none; }
/* zolaq sürüşürsə sağ kənar solğunlaşır — gizli çiplərin olduğu görünsün */
.fbar__chips.is-over { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.fpill { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 10px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.fpill:hover { background: var(--surface-3); }
/* açıq çip — ağ fon + primary halqa (ana səhifədəki açıq sahə kimi) */
.fpill.is-open { background: var(--surface); box-shadow: 0 0 0 2px var(--brand); }
/* ikon dairəsi kənarlardan bərabər: sol padding = (hündürlük − dairə) / 2 */
.fpill__ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--h-s); color: var(--h); transition: background .15s, color .15s; }
.fpill__ic .i { width: 14px; height: 14px; }
.fpill__t { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.fpill__chev { width: 15px; height: 15px; color: var(--text-3); transition: transform .2s var(--ease); }
.fpill.is-open .fpill__chev { transform: rotateX(180deg); }
.fpill__x { display: grid; place-items: center; width: 22px; height: 22px; margin-right: -6px; border-radius: 50%; color: var(--text-2); }
.fpill__x:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.fpill__x .i { width: 14px; height: 14px; stroke-width: 2; }
/* seçilmiş filtr: ikon dolur (mətn qalınlaşmır) */
.fpill.is-set .fpill__ic { background: var(--h); color: #fff; }
html[data-theme='dark'] .fpill.is-set .fpill__ic { color: var(--bg); }
/* "Filtrlər" — primary rəngin 15%-i fon, primary mətn */
.fpill--more { gap: 8px; padding: 0 16px 0 14px; background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand-text); font-weight: 600; }
.fpill--more:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.fpill--more > .i { width: 18px; height: 18px; }
.fchip__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-size: 11.5px; font-weight: 600; }
/* sağ düymələr — çiplərlə eyni dolğulu plitə; "Axtarışı saxla" yalnız mətn + ikon rəngli */
.fbar__end { display: flex; gap: 8px; flex: none; }
.fbar__end .btn { --h: 44px; border-radius: 12px; }
.fbar__end .btn--line { background: var(--surface-2); border-color: transparent; }
.fbar__end .btn--line:hover { background: var(--surface-3); border-color: transparent; }
.fbar__save.btn--line { color: var(--brand-text); }
.fbar__end .btn .i { width: 16px; height: 16px; }
@media (max-width: 1023px) { .fbar__save span { display: none; } .fbar__save { width: 44px; padding: 0; } .fbar__mapbtn { display: none; } }
@media (max-width: 639px) { .fbar__in { gap: 8px; padding-block: 8px; min-height: 60px; } .fbar .seg__btn { padding: 0 12px; } .fpill { height: 42px; padding-left: 9px; font-size: 14px; } .fpill__ic { width: 24px; height: 24px; } }

/* bölgü */
.srp__body { position: relative; }
@media (min-width: 1024px) {
  .srp__body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 41%, 760px); }
  .srp__body.is-nomap { grid-template-columns: minmax(0, 1fr); }
  .srp__body.is-nomap .srp__map { display: none; }
}
.srp__list { min-width: 0; padding: 24px var(--gutter) calc(var(--tab-h) + var(--safe-b) + 90px); }
@media (min-width: 1024px) { .srp__list { padding-bottom: 56px; } }
.srp__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.srp__ttl { display: flex; align-items: center; gap: 14px; min-width: 0; }
.srp__ico { width: 48px; height: 48px; border-radius: 14px; }
.srp__ico:empty { display: none; }
.srp__ico .i { width: 23px; height: 23px; }
@media (max-width: 639px) { .srp__ico { width: 42px; height: 42px; border-radius: 12px; } .srp__ico .i { width: 21px; height: 21px; } }
.srp__head h1 { font-size: clamp(20px, 2vw, 24px); letter-spacing: -.02em; }
.srp__head p { font-size: 14.5px; margin-top: 2px; }
.srp__tools { display: flex; align-items: center; gap: 10px; flex: none; }
.srp__layout .seg__btn { padding: 0 9px; }
.srp__layout .seg__btn .i { width: 16px; height: 16px; }
.sortbtn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.sortbtn:hover { background: var(--surface-2); }
.sortbtn b { font-weight: 600; }
.sortbtn .i { width: 15px; height: 15px; }
@media (max-width: 559px) { .sortbtn span.l { display: none; } }

.srp__cards { gap: 32px 16px; }
@media (max-width: 559px) { .srp__cards { gap: 24px 12px; } }
@media (min-width: 560px) { .srp__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .srp__cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 36px 20px; } }
@media (min-width: 1024px) { .srp__body.is-nomap .srp__cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); } }
.srp__cards.is-rows { display: flex; flex-direction: column; gap: 24px; }
.srp__cards.is-loading { opacity: .4; transition: opacity .15s; pointer-events: none; }
/* xəritədə pin üzərinə gələndə kart brend halqası ilə vurğulanır (pin də brend olur) */
.lcard.is-hot .lcard__media { box-shadow: 0 0 0 2px var(--brand); }

/* aktiv filtrlər + AI qeydi */
.actives { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.actives:empty { display: none; }
.achip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-radius: var(--r-full); background: var(--surface-2); font-size: 13.5px; font-weight: 500; }
.achip button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.achip button:hover { background: var(--surface-3); }
.achip .i { width: 13px; height: 13px; }
.actives__clear { height: 32px; padding: 0 8px; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* AI qeydi — AI rəngi bənövşəyi (.hue-violet) */
.ai-note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 20px; border-radius: 16px; background: var(--h-s, var(--surface-2)); }
.ai-note > .i { width: 20px; height: 20px; color: var(--h, var(--text)); margin-top: 2px; }
.ai-note b { display: block; font-size: 14.5px; color: var(--h-t, var(--text)); }
.ai-note p { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.ai-note .link { font-size: 14px; margin-top: 6px; color: var(--h-t, var(--text)); text-decoration-color: currentColor; }

/* xəritə */
.srp__map { display: none; }
@media (min-width: 1024px) { .srp__map { display: block; position: sticky; top: calc(var(--hdr-h) + 65px); height: calc(100vh - var(--hdr-h) - 65px); } }
.srp__mapel { position: absolute; inset: 0; }
.mapui { position: absolute; top: 12px; left: 108px; right: 72px; z-index: 500; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; } /* solda xəritə / peyk seçimi, sağda tam ekran + zoom */
.mapui__btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; /* xəritə düymələri kimi rounded, pill deyil */ background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; box-shadow: var(--sh-2); transition: transform .15s; }
.mapui__btn:hover { transform: translateY(-1px); }
.mapui__btn .i { width: 16px; height: 16px; }
.mapui__btn--ink { background: var(--brand); color: var(--on-brand); }
.mapui__btn.is-on { background: var(--ink); color: var(--on-ink); }
.mapcard { position: absolute; z-index: 500; left: 16px; right: 16px; bottom: 20px; max-width: 360px; padding: 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-4); animation: fadeUp .3s var(--ease-out); }
.mapcard .lcard__body { padding: 10px 6px 4px; }
.mapcard .lcard__media { border-radius: 10px; }
/* × kartın sağ üst küncündə (şəkildəki ürəklə toqquşmur) */
.mapcard__x { position: absolute; z-index: 5; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--sh-2); }
.mapcard__x .i { width: 15px; height: 15px; }
@media (max-width: 1023px) {
  .srp.is-mapview .srp__map { display: block; position: fixed; z-index: 25; left: 0; right: 0; top: calc(var(--hdr-h) + var(--fbar-h, 69px)); bottom: calc(var(--tab-h) + var(--safe-b)); }
  .srp.is-mapview .srp__list { display: none; }
  .mapcard { max-width: none; bottom: 76px; }
}
.mapfab { position: fixed; z-index: 66; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r-full); background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 14.5px; box-shadow: var(--sh-4); transition: transform .15s; }
.mapfab:active { transform: translateX(-50%) scale(.96); }
.mapfab .i { width: 18px; height: 18px; }
@media (min-width: 1024px) { .mapfab { display: none; } }
body[data-page='search'] .fab-ai { display: none; }

/* geniş filtr pəncərəsi */
.fsheet .modal__body { padding-top: 8px; }
.fsec { padding: 20px 0; }
.fsec h4 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 4px; }
.fsec > p { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.fsec > h4 + .opt-grid, .fsec > h4 + .chips, .fsec > h4 + .fcats, .fsec > h4 + .frow { margin-top: 14px; }
.fcats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 479px) { .fcats { grid-template-columns: repeat(2, 1fr); } }
.fcat { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px 14px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 500; font-size: 14.5px; text-align: left; transition: background .15s; }
.fcat:hover { background: var(--surface-3); }
.fcat.is-on { background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand-text); }
/* rəngli ikon plitəsi — ana səhifənin .cat__ico ilə eyni dil (yumşaq fon → seçiləndə dolu rəng) */
.fcat__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--h-s, var(--surface-2)); color: var(--h, var(--text)); transition: background .15s, color .15s; }
.fcat__ico .i { width: 21px; height: 21px; }
.fcat.is-on .fcat__ico { background: var(--h, var(--ink)); color: #fff; }
html[data-theme='dark'] .fcat.is-on .fcat__ico { color: var(--bg); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow .field > span { font-size: 13px; color: var(--text-2); }
.fchecks { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
@media (min-width: 560px) { .fchecks { grid-template-columns: 1fr 1fr; } }
.ffeat { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.ffeat .chip { justify-content: flex-start; }
.fhist { margin-top: 18px; }
.fsheet .modal__foot { align-items: center; }
.fsheet .modal__foot .btn--ghost { text-decoration: underline; text-underline-offset: 3px; flex: none; padding: 0 6px; }

/* popover içi (tək filtr) */
.fpop { padding: 6px; }
.fpop h4 { font-size: 15px; font-weight: 600; margin: 4px 2px 12px; }
.fpop__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding-top: 4px; }
.fpop__foot .btn--ghost { text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }
.fpop__list { max-height: 300px; overflow-y: auto; margin-inline: -4px; }
.fpop__row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 8px; border-radius: 10px; font-size: 15px; text-align: left; }
.fpop__row:hover { background: var(--surface-2); }
.fpop__row small { margin-left: auto; color: var(--text-3); font-size: 13px; }
.fpop__row .mline { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* SEO keçidləri — açıq zolaq, rəngli ikonlu sətirlər */
.srp__seo { margin-top: 56px; padding: 24px; border-radius: 20px; background: var(--tint); }
@media (min-width: 768px) { .srp__seo { padding: 28px 28px 22px; } }
.srp__seo h3 { font-size: 18px; margin-bottom: 14px; }
.srp__seo ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; }
.srp__seo a { display: flex; align-items: center; gap: 12px; padding: 8px; margin-inline: -8px; border-radius: 12px; transition: background .15s; }
.srp__seo a:hover { background: var(--surface); }
/* açıq zolaqda yumşaq rəngli fon itir — ikon qutusu ağ səth + rəngli ikon (hover-də sətir də ağ olur) */
.srp__seo .ico-box { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); box-shadow: var(--sh-1); }
.srp__seo a:hover .ico-box { background: var(--h-s); box-shadow: none; }
.srp__seo .ico-box .i { width: 18px; height: 18px; }
.srp__seo b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.srp__seo a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.srp__seo small { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.srp__seo .delta { font-size: 12.5px; }

/* mobil: çiplər sürüşən bir sətirdə, "axtarışı saxla" sağda */
@media (max-width: 767px) {
  .fbar__in { padding-right: var(--gutter); padding-left: 0; }
  .fbar__chips { padding-left: var(--gutter); margin-left: 0; }
  .srp__head { flex-direction: column; align-items: stretch; gap: 10px; }
  .srp__tools { justify-content: space-between; }
  .sortbtn { padding: 0; }
}
/* telefonda "Filtrlər" yalnız ikon + say nişanı */
@media (max-width: 767px) {
  .fbar__end .fpill--more { position: relative; width: 44px; padding: 0; justify-content: center; }
  .fbar__end .fpill--more .fpill__t { display: none; }
  .fbar__end .fpill--more .fchip__n { position: absolute; top: -4px; right: -4px; box-shadow: 0 0 0 2px var(--bg); }
}

/* "Tarixlər" çipi: solda hazır aralıqlar, sağda 2 aylıq təqvim (EA.calendar) */
.dchip { display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 18px; }
.dchip .drp__pre { border-radius: 12px; align-self: start; }
.dchip__hint { margin-top: 10px; text-align: center; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 559px) { .dchip { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
