/* Lofti Listings — Public CSS */
.ll-wrap { --ll-accent: #1d4ed8; --ll-btn-text: #fff; font-family: inherit; }

/* Filters */
.ll-filters { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.ll-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.ll-tab { padding: 7px 18px; border-radius: 20px; border: 1px solid #d1d5db; background: #fff; font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .15s; color: #374151; }
.ll-tab.ll-tab--active, .ll-tab:hover { background: var(--ll-accent); color: #fff; border-color: var(--ll-accent); }
.ll-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ll-sel, .ll-inp, .ll-btn-clear { height: 38px !important; box-sizing: border-box !important; padding: 0 12px !important; border: 1px solid #d1d5db; border-radius: 7px; font-size: .83rem; background: #fff; vertical-align: middle; line-height: 38px !important; }
.ll-sel { min-width: 130px; }
.ll-inp { min-width: 0; width: 120px; }
.ll-btn-clear { padding: 0 14px !important; cursor: pointer; color: #6b7280; }
.ll-btn-clear:hover { background: #f1f5f9; }

/* Toolbar */
.ll-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ll-count { font-size: .83rem; color: #6b7280; }
.ll-views { display: flex; gap: 4px; }
.ll-vbtn { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; cursor: pointer; color: #6b7280; }
.ll-vbtn.ll-vbtn--active { background: var(--ll-accent); color: #fff; border-color: var(--ll-accent); }

/* Grid */
.ll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* Card — rendered as <a> for crawlability; reset link defaults */
.ll-card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.ll-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.ll-card__img { aspect-ratio: 16/9; overflow: hidden; background: #f1f5f9; position: relative; }
.ll-card__img img { width: 100%; height: 100%; object-fit: cover; }
.ll-card__img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #d1d5db; font-size: .8rem; }
.ll-card__badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.ll-card__badge--lettings { background: #dbeafe; color: #1e40af; }
.ll-card__badge--sales    { background: #fce7f3; color: #9d174d; }
.ll-card__status { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; background: rgba(0,0,0,.55); color: #fff; }
.ll-card__body { padding: 14px 16px; }
.ll-card__price { font-size: 1.2rem; font-weight: 700; color: #111827; margin-bottom: 4px; }
.ll-card__addr  { font-size: .83rem; color: #374151; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-card__meta  { display: flex; gap: 12px; flex-wrap: wrap; }
.ll-card__meta-item { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: #6b7280; }
.ll-card__meta-item svg { opacity: .6; }
.ll-card__desc { font-size: .8rem; color: #6b7280; line-height: 1.55; margin-top: 10px; }

/* List view outer wrapper (2/3 list + 1/3 mini-map on desktop) */
#ll-list-wrap { display: flex; gap: 20px; align-items: flex-start; }
#ll-list { flex: 2; min-width: 0; }

/* Sidebar column (mini-map + lead gen) */
#ll-list-sidebar { flex: 1; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 16px; }

/* Mini-map */
#ll-list-map-mini-wrap { height: 520px; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; cursor: pointer; position: relative; }
#ll-list-map-mini { width: 100%; height: 100%; }
.ll-list-map-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: transparent; transition: background .2s; pointer-events: none; }
#ll-list-map-mini-wrap:hover .ll-list-map-overlay { background: rgba(0,0,0,.28); pointer-events: auto; }
.ll-list-map-overlay-btn { display: inline-flex; align-items: center; gap: 7px; opacity: 0; background: var(--ll-accent); color: var(--ll-btn-text); border: none; border-radius: 8px; padding: 10px 22px; font-size: .9rem; font-weight: 700; cursor: pointer; transition: opacity .2s; }
#ll-list-map-mini-wrap:hover .ll-list-map-overlay-btn { opacity: 1; }

/* Lead generation box */
.ll-leadgen { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 22px 20px; text-align: center; }
.ll-leadgen__title { font-size: 1rem; font-weight: 700; color: #111827; margin: 0 0 8px; }
.ll-leadgen__sub   { font-size: .83rem; color: #6b7280; line-height: 1.55; margin: 0 0 16px; }
.ll-leadgen__btns  { display: flex; flex-direction: column; gap: 8px; }
.ll-leadgen__btn   { display: block; padding: 10px 16px; border-radius: 8px; font-size: .83rem; font-weight: 600; text-decoration: none; text-align: center; background: var(--ll-accent); color: var(--ll-btn-text); transition: opacity .15s; }
.ll-leadgen__btn:hover { opacity: .88; color: var(--ll-btn-text); }
.ll-leadgen__btn--outline { background: transparent !important; color: var(--ll-accent) !important; border: 2px solid var(--ll-accent); }
.ll-leadgen__btn--outline:hover { background: var(--ll-accent) !important; color: var(--ll-btn-text) !important; opacity: 1; }

/* List view */
.ll-list { display: flex; flex-direction: column; gap: 12px; }
/* List item — rendered as <a> for crawlability; reset link defaults */
.ll-list-item { display: flex; min-height: 170px; text-decoration: none; color: inherit; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; cursor: pointer; transition: box-shadow .2s; }
.ll-list-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

/* 3-image column on the left */
.ll-list-item__imgs { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; background: #e5e7eb; }
.ll-list-item__img-main { flex: 2; overflow: hidden; background: #f1f5f9; }
.ll-list-item__img-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ll-list-item__img-main--ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #d1d5db; font-size: .8rem; }
.ll-list-item__img-row { flex: 1; display: flex; gap: 2px; }
.ll-list-item__img-row img { flex: 1; min-width: 0; object-fit: cover; display: block; }
.ll-list-item__img-row .ll-list-item__img-empty { flex: 1; background: #f1f5f9; }

.ll-list-item__body { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
.ll-list-item__price { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.ll-list-item__addr  { font-size: .85rem; color: #374151; margin-bottom: 8px; }
.ll-list-item__meta  { display: flex; gap: 16px; flex-wrap: wrap; }
.ll-list-item__meta-item { font-size: .78rem; color: #6b7280; display: flex; align-items: center; gap: 4px; }
.ll-list-item__desc { font-size: .8rem; color: #6b7280; line-height: 1.55; margin-top: 10px; }

/* Map */
#ll-map-wrap { display: flex; gap: 16px; height: min(740px, 78vh); }
#ll-map      { flex: 1; border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
#ll-map-cards { width: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ll-map-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; cursor: pointer; font-size: .82rem; transition: box-shadow .15s; }
.ll-map-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.ll-map-card__price { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.ll-map-card__addr  { color: #374151; }

/* Pagination */
.ll-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.ll-page-btn { padding: 7px 14px; border: 1px solid #d1d5db; border-radius: 7px; background: #fff; font-size: .83rem; cursor: pointer; color: #374151; transition: all .15s; }
.ll-page-btn.active { background: var(--ll-accent); color: #fff; border-color: var(--ll-accent); }
.ll-page-btn:hover:not(.active) { background: #f1f5f9; }

/* Modal */
.ll-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.ll-modal-bg  { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.ll-modal-box { position: relative; background: #fff; border-radius: 14px; width: 860px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.ll-modal-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff; font-size: 1.2rem; cursor: pointer; z-index: 1; display: flex; align-items: center; justify-content: center; }
.ll-modal-close:hover { background: #f1f5f9; }

/* Modal body */
.ll-detail { padding: 24px; }
.ll-detail-slider { position: relative; margin-bottom: 20px; }
.ll-detail-slider__main { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: 10px; }
.ll-detail-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.ll-detail-thumbs img { width: 72px; height: 50px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.ll-detail-thumbs img.active { border-color: var(--ll-accent); }
.ll-detail-header { margin-bottom: 16px; }
.ll-detail-price { font-size: 1.6rem; font-weight: 800; color: #111827; }
.ll-detail-addr  { font-size: 1rem; color: #374151; margin-top: 2px; }
.ll-detail-meta  { display: flex; gap: 20px; flex-wrap: wrap; margin: 16px 0; }
.ll-detail-meta-item { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: #374151; font-weight: 500; }
.ll-detail-meta-item svg { color: var(--ll-accent); }
.ll-detail-desc { font-size: .88rem; color: #374151; line-height: 1.7; margin-bottom: 20px; }
.ll-detail-desc p { margin: 0 0 .8em; }
.ll-epc { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px; font-size: .8rem; font-weight: 700; }
.ll-detail-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid #f1f5f9; display: flex; gap: 10px; align-items: center; }
.ll-detail-cta { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: 8px; font-size: .9rem; font-weight: 700; text-decoration: none; border: 2px solid var(--ll-accent); cursor: pointer; background: var(--ll-accent); color: var(--ll-btn-text); transition: opacity .15s; }
.ll-detail-cta:hover { opacity: .88; color: var(--ll-btn-text); }
.ll-detail-cta--outline { background: transparent; color: var(--ll-accent) !important; }
.ll-detail-cta--outline:hover { background: var(--ll-accent); color: var(--ll-btn-text) !important; opacity: 1; }

/* EPC colours */
.ll-epc--A { background: #16a34a; color: #fff; }
.ll-epc--B { background: #65a30d; color: #fff; }
.ll-epc--C { background: #ca8a04; color: #fff; }
.ll-epc--D { background: #ea580c; color: #fff; }
.ll-epc--E { background: #dc2626; color: #fff; }
.ll-epc--F { background: #9f1239; color: #fff; }
.ll-epc--G { background: #581c87; color: #fff; }

/* Share action buttons (copy link / email)
   Scoped under #ll-wrap (specificity 1,1,0) to reliably beat WordPress
   theme button resets that use element + class selectors (0,1,1). */
.ll-card__actions      { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.ll-list-item__actions { display: flex; gap: 6px; margin-top: 10px; }
#ll-wrap .ll-action-btn {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 5px;
  width: 30px !important; height: 30px !important; padding: 0 !important;
  border-radius: 7px !important; border: 1px solid #e5e7eb !important; background: #f8fafc !important;
  color: #6b7280 !important; cursor: pointer; flex-shrink: 0; transition: all .15s;
  line-height: 1; box-shadow: none !important;
}
#ll-wrap .ll-action-btn:hover { background: var(--ll-accent) !important; color: #fff !important; border-color: var(--ll-accent) !important; }
#ll-wrap .ll-action-btn svg   { display: inline-block !important; pointer-events: none; flex-shrink: 0; overflow: visible; }
/* Larger variant used in the detail modal footer */
#ll-wrap .ll-action-btn.ll-action-btn--lg { width: auto !important; height: 38px !important; padding: 0 14px !important; font-size: .83rem !important; font-weight: 600; border-radius: 8px !important; }

/* Status badge */
.ll-status-badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:.75rem; font-weight:700; }
.ll-status-badge--available   { background:#dcfce7; color:#166534; }
.ll-status-badge--for_sale    { background:#fce7f3; color:#9d174d; }
.ll-status-badge--under_offer { background:#fef3c7; color:#92400e; }
.ll-status-badge--let         { background:#dbeafe; color:#1e40af; }
.ll-status-badge--let_agreed  { background:#fef3c7; color:#92400e; }
.ll-status-badge--sstc        { background:#ede9fe; color:#5b21b6; }
.ll-status-badge--completed   { background:#f0fdf4; color:#166534; }

@media (max-width: 640px) {
  .ll-card__desc,
  .ll-list-item__desc { display: none; }
  .ll-filter-row { flex-direction: column; }
  .ll-sel, .ll-inp { min-width: 0; width: 100%; }
  #ll-map-wrap { flex-direction: column; height: auto; }
  #ll-map { height: 300px; }
  #ll-map-cards { width: 100%; max-height: 250px; }
  .ll-list-item__imgs { width: 120px; }
  .ll-list-item__img-row { display: none; } /* only main image on mobile */
  #ll-list-sidebar { display: none; } /* sidebar (mini-map + lead gen) hidden on mobile */
  #ll-list-wrap { display: block; } /* single column on mobile */
  /* List and map views not available on mobile — hide their toggle buttons */
  .ll-vbtn[data-view="list"],
  .ll-vbtn[data-view="map"] { display: none; }
}
