/* ── Community Slider Widget ─────────────────────────────────────────────── */

.cs-outer { width: 100%; }

.cs-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  width: 100%;
  background: #1a1a2e;
}

/* Track & Slides */
.cs-track { width: 100%; height: 100%; position: relative; }

.cs-slide {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cs-slide.cs-slide--active { display: block; }

/* Background image */
.cs-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 0.6s ease;
  width: 100%;
  height: 100%;
}
.cs-slide--active .cs-slide__bg { transform: scale(1); }
.cs-slide__bg--placeholder { background-color: #374151; }

/* Overlay */
.cs-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

/* ── Info Card ───────────────────────────────────────────────────────────── */
.cs-card {
  position: absolute;
  top: 50%;
  right: 48px;
  transform: translateY(-50%);
  width: 420px;
  max-width: calc(100% - 60px);
  background: rgba(255,255,255,0.96);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 10;
  box-sizing: border-box;
}

.cs-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cs-card__label {
  font-size: 18px;
  font-weight: 700;
  color: #6c5ce7;
  line-height: 1;
}
.cs-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #6c5ce7;
  white-space: nowrap;
}
.cs-card__badge svg { flex-shrink: 0; }

.cs-card__title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
  line-height: 1.2;
}
.cs-card__title a { color: inherit; text-decoration: none; }
.cs-card__title a:hover { color: #6c5ce7; }

.cs-card__addr {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 14px;
  line-height: 1.4;
}

.cs-card__desc-label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}
.cs-card__desc {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-card__btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: #6c5ce7;
  color: #fff !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.1s;
  line-height: 1;
}
.cs-card__btn:hover { background: #5a4bd1; transform: translateY(-1px); }

/* ── No-results ──────────────────────────────────────────────────────────── */
.cs-no-results {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 15;
  pointer-events: none;
}
.cs-no-results--visible { display: flex; }
.cs-no-results__inner {
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  padding: 24px 36px;
  font-size: 15px;
  color: #374151;
  font-weight: 500;
  text-align: center;
}

/* ── Navigation — always compact (under the info card) ───────────────────── */
.cs-nav {
  position: absolute;
  bottom: 28px;       /* JS overrides this */
  right: 48px;        /* JS overrides this */
  left: auto;
  width: 420px;       /* JS overrides this */
  max-width: calc(100% - 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  z-index: 20;
  pointer-events: none;
}
.cs-nav > * { pointer-events: all; }

/* Arrows */
.cs-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
  padding: 0;
  box-sizing: border-box;
}
.cs-arrow svg {
  stroke: #374151;
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.cs-arrow:hover { background: #6c5ce7; transform: scale(1.08); }
.cs-arrow:hover svg { stroke: #fff; }
.cs-arrow[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }

/* Dots — always 4, windowed */
.cs-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.cs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.2s, height 0.2s, border-radius 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.cs-dot--active {
  background: #6c5ce7;
  width: 26px;
  border-radius: 5px;
}
/* Shrunk outer dots (indicate more slides beyond view) */
.cs-dot--small {
  width: 6px;
  height: 6px;
  opacity: 0.6;
  transform: scale(0.75);
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.cs-search-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

/* Rent toggle hover */
.cs-search-bar .chub-hgrid-toggle:hover {
  color: #6c5ce7;
}

/* Advanced filter button hover (scoped so it only applies here) */
.cs-search-bar .chub-hgrid-adv-btn:hover,
.cs-search-bar .chub-hgrid-adv-btn--active {
  background: #6c5ce7;
  color: #fff;
  border-color: #6c5ce7;
}

/* Amenity checked state */
.cs-search-bar .chub-hgrid-amenity-check:has(input:checked) {
  background: #ede9fe;
  border-color: #6c5ce7;
}
.cs-search-bar .chub-hgrid-amenity-check:has(input:checked) span {
  color: #4c3d9e;
}

/* Input / select field BG & border */
.cs-search-bar .chub-hgrid-field {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.cs-search-bar .chub-hgrid-field:focus-within {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 2px rgba(108,92,231,0.12);
}
.cs-search-bar .chub-hgrid-input,
.cs-search-bar .chub-hgrid-select {
  background: transparent;
}

/* Clear advanced btn hover */
.cs-search-bar .chub-hgrid-adv-clear-btn:hover {
  color: #ef4444;
  border-color: #ef4444;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cs-card {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    max-height: 60%;
    overflow-y: auto;
  }
  .cs-slide__overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 50%);
  }
  .cs-nav { bottom: auto !important; top: 16px; left: 0 !important; right: 0 !important; width: 100% !important; max-width: 100% !important; padding: 0 16px; justify-content: space-between; }
}

/* Scope tighter flex-basis so 3 data cols + btn fit without overflowing */
.ctg-wrapper .chub-hgrid-col {
  flex: 1 1 120px;
  min-width: 0;
}
.ctg-wrapper .chub-hgrid-col--search {
  flex: 2 1 160px;
}
.ctg-wrapper .chub-hgrid-col--btn {
  flex: 0 0 auto;
}
/* Prevent the filter row itself from overflowing the card */
.ctg-wrapper .chub-hgrid-filter-row {
  flex-wrap: nowrap;
  overflow: hidden;
}
/* On narrow screens, allow wrapping */
@media (max-width: 900px) {
  .ctg-wrapper .chub-hgrid-filter-row {
    flex-wrap: wrap;
  }
  .ctg-wrapper .chub-hgrid-col {
    flex: 1 1 140px;
  }
}

/* ── Remove ::after icon from Search field only in Community Slider ──────── */
.chub-cs-search-col .chub-hgrid-field::after {
  display: none !important;
  content: none !important;
}
