/**
 * TSK Pixxi Listings - Styles v2.0.0 (+ v2.2.0 status badge)
 * Ultra-Luxury UAE Real Estate Aesthetic matching reference screenshot
 */

:root {
  --tsk-gold: #D4AF37;
  --tsk-gold-hover: #b8972c;
  --tsk-dark: #0B1118;
  --tsk-text: #1E293B;
  --tsk-muted: #64748B;
  --tsk-border: #E2E8F0;
  --tsk-card-bg: #FFFFFF;
}

.tsk-pixxi-wrapper {
  width: 100%;
  max-width: 1240px;
  margin: 30px auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tsk-text);
  box-sizing: border-box;
}

.tsk-pixxi-wrapper * {
  box-sizing: border-box;
}

/* =========================================
   FILTER BAR (Matching Reference Screenshot)
   ========================================= */
.tsk-pixxi-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid var(--tsk-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.tsk-filter-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.tsk-filter-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.tsk-filter-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  background: #FFFFFF;
  border: 1px solid var(--tsk-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--tsk-text);
  outline: none;
  transition: all 0.2s ease;
}

.tsk-filter-input:focus {
  border-color: var(--tsk-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.tsk-filter-item {
  position: relative;
  flex: 0 1 auto;
}

.tsk-filter-select {
  height: 44px;
  padding: 0 32px 0 14px;
  background: #FFFFFF url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%2364748B" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 12px center;
  border: 1px solid var(--tsk-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tsk-text);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
}

.tsk-filter-select:focus {
  border-color: var(--tsk-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.tsk-filter-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid var(--tsk-border);
  border-radius: 8px;
  color: var(--tsk-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tsk-filter-reset-btn:hover {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fef2f2;
}

/* =========================================
   SUB-BAR: Count, View Switcher & Sorting
   ========================================= */
.tsk-pixxi-sub-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 4px;
}

.tsk-sub-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tsk-view-toggle .view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--tsk-border);
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  color: var(--tsk-muted);
  cursor: pointer;
}

.tsk-view-toggle .view-btn.active {
  color: var(--tsk-gold);
  border-color: var(--tsk-gold);
  background: #FFFDF9;
}

.tsk-projects-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--tsk-text);
}

.tsk-sub-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  font-size: 13px;
  color: var(--tsk-muted);
}

.tsk-filter-sort {
  height: 38px;
  padding: 0 28px 0 12px;
  font-size: 13px;
}

/* =========================================
   PROPERTY CARDS GRID (Matching Screenshot)
   ========================================= */
.tsk-pixxi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tsk-pixxi-card {
  background: var(--tsk-card-bg);
  border: 1px solid var(--tsk-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tsk-pixxi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(212, 175, 55, 0.4);
}

/* Image Wrap */
.tsk-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0B1118;
  overflow: hidden;
}

.tsk-card-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.tsk-main-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tsk-pixxi-card:hover .tsk-main-photo {
  transform: scale(1.04);
}

.tsk-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 17, 24, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Carousel Dots */
.tsk-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 100px;
}

.tsk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tsk-dot.active,
.tsk-dot:hover {
  background: var(--tsk-gold);
  transform: scale(1.2);
}

/* Card Body */
.tsk-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tsk-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.35;
}

.tsk-card-title a {
  color: var(--tsk-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.tsk-card-title a:hover {
  color: var(--tsk-gold);
}

.tsk-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--tsk-muted);
  margin: 0 0 14px;
}

.tsk-card-location svg {
  color: var(--tsk-gold);
  flex-shrink: 0;
}

/* Tags (Apartments, Townhouses) */
.tsk-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tsk-tag {
  background: #F1F5F9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Price */
.tsk-card-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--tsk-gold);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

/* Footer / Meta (Developer & Handover) */
.tsk-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
}

.tsk-meta-item {
  display: inline-block;
}

/* =========================================
   LOADING & NO RESULTS
   ========================================= */
.tsk-pixxi-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--tsk-muted);
}

.tsk-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--tsk-gold);
  border-radius: 50%;
  animation: tskSpin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes tskSpin {
  to { transform: rotate(360deg); }
}

.tsk-pixxi-no-results {
  text-align: center;
  padding: 60px 20px;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px dashed var(--tsk-border);
  grid-column: 1 / -1;
}

.tsk-pixxi-no-results svg {
  color: #94A3B8;
  margin-bottom: 12px;
}

.tsk-pixxi-no-results h4 {
  font-size: 18px;
  color: var(--tsk-dark);
  margin: 0 0 6px;
}

.tsk-pixxi-no-results p {
  color: var(--tsk-muted);
  font-size: 14px;
  margin: 0;
}

/* =========================================
   PAGINATION
   ========================================= */
.tsk-pixxi-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.tsk-pixxi-pagination .page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: #FFFFFF;
  border: 1px solid var(--tsk-border);
  border-radius: 8px;
  color: var(--tsk-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tsk-pixxi-pagination .page-btn:hover {
  border-color: var(--tsk-gold);
  color: var(--tsk-gold);
}

.tsk-pixxi-pagination .page-btn.active {
  background: var(--tsk-gold);
  border-color: var(--tsk-gold);
  color: #0B1118;
}

/* =========================================
   SINGLE PROPERTY VIEW
   ========================================= */
.tsk-pixxi-single-view {
  max-width: 1100px;
  margin: 40px auto;
  font-family: 'Inter', sans-serif;
}

.tsk-single-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--tsk-dark);
  margin: 0 0 8px;
}

.tsk-single-loc {
  font-size: 15px;
  color: var(--tsk-muted);
  margin-bottom: 12px;
}

.tsk-single-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--tsk-gold);
  margin-bottom: 10px;
}

.tsk-single-facts {
  font-size: 15px;
  color: #475569;
  font-weight: 600;
  margin-bottom: 24px;
}

.tsk-single-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.tsk-single-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
}

.tsk-single-amenities {
  margin: 30px 0;
}

.tsk-amenities-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.amenity-chip {
  background: #F8FAFC;
  border: 1px solid var(--tsk-border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.tsk-single-enquiry {
  margin-top: 30px;
}

.tsk-enquiry-btn {
  display: inline-block;
  background: var(--tsk-gold);
  color: #0B1118 !important;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s;
}

.tsk-enquiry-btn:hover {
  background: var(--tsk-gold-hover);
  transform: translateY(-2px);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
  .tsk-pixxi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 650px) {
  .tsk-pixxi-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .tsk-filter-item,
  .tsk-filter-select,
  .tsk-filter-reset-btn {
    width: 100%;
  }
  .tsk-pixxi-sub-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .tsk-pixxi-grid {
    grid-template-columns: 1fr;
  }
  .tsk-single-gallery {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   MAP VIEW & PILL MARKERS (REFERENCE DESIGN)
   ========================================= */
.tsk-pixxi-map-container {
  width: 100%;
  height: 560px;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--tsk-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  position: relative;
  background: #f8fafc;
}

.tsk-pixxi-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.tsk-leaflet-div-icon {
  background: transparent !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
}

/* Custom Pill Badge Marker Matching Reference Screenshot */
.tsk-map-pill {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 30px;
  padding: 4px 14px 4px 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.08);
  user-select: none;
}

.tsk-map-pill:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  z-index: 1000 !important;
}

.tsk-map-pill-badge {
  background: #0284c7; /* Vibrant luxury sky blue */
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.tsk-map-pill-text {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Leaflet Popup Styling */
.tsk-pixxi-map .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  border: 1px solid #e2e8f0;
}

.tsk-pixxi-map .leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4;
  width: 260px !important;
}

.tsk-pixxi-map .leaflet-popup-tip {
  background: #ffffff;
}

.tsk-popup-card-item {
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.tsk-popup-card-item + .tsk-popup-card-item {
  border-top: 1px solid #f1f5f9;
}

.tsk-popup-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.tsk-popup-body {
  padding: 12px 14px;
}

.tsk-popup-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tsk-popup-badge.sell {
  background: #ecfdf5;
  color: #059669;
}

.tsk-popup-badge.rent {
  background: #eff6ff;
  color: #2563eb;
}

.tsk-popup-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tsk-popup-location {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tsk-popup-price {
  font-size: 14px;
  font-weight: 800;
  color: #b45309;
  margin: 0;
}

.tsk-popup-footer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
}

@media (max-width: 768px) {
  .tsk-pixxi-map-container {
    height: 420px;
  }
}

/* =========================================
   PIXXI CRM STATUS BADGE + FILTER (v2.2.0)
   Same pill as the For Sale / For Rent badge, side by side at top-left.
   ========================================= */
.tsk-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.tsk-card-badges .tsk-card-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.tsk-card-status .tsk-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  flex: 0 0 6px;
  background: #22C55E;
}

.tsk-card-status.tsk-status-inactive .tsk-status-dot {
  background: #F87171;
}

.tsk-popup-badge.status-active {
  background: #f0fdf4;
  color: #16a34a;
}

.tsk-popup-badge.status-inactive {
  background: #fef2f2;
  color: #dc2626;
}

/* =========================================
   v2.2.1 - Inactive status badge: muted grey pill + red dot (overrides the Elementor badge colour)
   Active keeps the For Sale / For Rent badge look (green dot).
   ========================================= */
.tsk-pixxi-wrapper .tsk-card-badges .tsk-card-badge.tsk-card-status.tsk-status-inactive {
  background-color: rgba(71, 85, 105, 0.92) !important;
  color: #F1F5F9 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.tsk-pixxi-wrapper .tsk-card-badges .tsk-card-status.tsk-status-inactive .tsk-status-dot {
  background: #EF4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

.tsk-popup-badge.status-active,
.tsk-popup-badge.status-inactive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tsk-popup-badge.status-active::before,
.tsk-popup-badge.status-inactive::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}

.tsk-popup-badge.status-inactive {
  background: #f1f5f9;
  color: #475569;
}

.tsk-popup-badge.status-inactive::before {
  background: #ef4444;
}
