/* ================================================
   Office Space Layout – View Modes
   Default: 2-col cards left | map right
   List:    4-col cards full width, no map
   Map:     full-screen map, no card list
   ================================================ */

.office-space-layout {
  display: block;
  margin-bottom: 40px;
}

/* MAP PANEL – hidden by default */
.office-space-map-panel {
  display: none;
}

/* --- DEFAULT VIEW --- */
.office-space-layout.view-mode-default {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  gap: 24px;
  align-items: start;
}

.office-space-layout.view-mode-default .office-space-map-panel {
  display: block;
  position: sticky;
  top: 110px;
}

.office-space-layout.view-mode-default .office-listing {
  grid-template-columns: repeat(2, 1fr);
  /* max-height: calc(var(--office-map-height-desktop, 700px) + 80px);
  overflow-y: auto; 
  padding: 8px;*/
}

/* --- LIST VIEW --- */
.office-space-layout.view-mode-list {
  display: block;
}

/* In list view, hide the map */
.office-space-layout.view-mode-list .office-space-map-panel {
  display: none;
}

.office-space-layout.view-mode-list .office-listing {
  grid-template-columns: repeat(4, 1fr);
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

/* --- MAP VIEW --- */
.office-space-layout.view-mode-map .office-space-list-panel {
  display: none;
}

.office-space-layout.view-mode-map .office-space-map-panel {
  display: block;
}

.office-space-layout.view-mode-map .office-space-map {
  min-height: 80vh;
  height: 80vh;
  border: 0;
}

/* Hide sorting in map view */
.office-space-layout.view-mode-map .filter-bar-sort {
  display: none !important;
}



.office-space-map {
  /* min-height: var(--office-map-height-desktop, 700px);
  height: var(--office-map-height-desktop, 700px); */
  min-height: 0;
  height: calc(100vh - 120px);
  border: 1px solid #d7e1ef;
  border-radius: 16px;
  overflow: hidden;
  background: #aad3df;
}

.office-space-map-empty {
  margin: 0;
  padding: 20px;
  color: #5f6d7b;
}

.js-office-view-tab.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.js-office-card.is-map-active {
  box-shadow: 0 0 0 2px #0a9adf, 0 8px 24px rgba(16, 59, 131, 0.18);
}

/* Stacked pin: only the lead list row reacts to map hover/click; use the pin for the slider. */
.js-office-list-panel .js-office-card.is-colocation-list-representative {
  position: relative;
}

.js-office-list-panel .js-office-card.is-colocation-list-representative::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(10, 154, 223, 0.5);
  border-radius: 2px 0 0 2px;
  pointer-events: none;
}

.js-office-list-panel .js-office-card.is-colocation-list-secondary {
  cursor: default;
  opacity: 0.78;
}

.js-office-list-panel .js-office-card.is-colocation-list-secondary:hover {
  opacity: 0.85;
}

.js-office-card.is-hidden-by-map {
  display: none !important;
}

.property-card .property-content .office-distance,
.office-space-popup .office-distance,
.office-space-cluster-popup .office-distance {
  margin: -8px 0 12px;
  padding: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: #0a9adf;
}

.office-distance[hidden] {
  display: none;
}

.office-space-pin {
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}

.price-pin-bubble {
  display: inline-block;
  background: #fff;
  color: #111827;
  border: 1.5px solid #111827;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  position: absolute;
  bottom: 0;
  left: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  transform-origin: bottom center;
}

/* Down-pointing arrow */
.price-pin-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #111827;
  pointer-events: none;
  transition: border-top-color 0.15s ease;
}

/* State: card visible in scroll panel */
.office-price-pin.is-visible .price-pin-bubble {
  background: #0b63d6;
  border-color: #0b63d6;
  color: #fff;
  box-shadow: 0 3px 10px rgba(11, 99, 214, 0.4);
}
.office-price-pin.is-visible .price-pin-bubble::after {
  border-top-color: #0b63d6;
}

/* State: active (card hovered or pin clicked) */
.office-price-pin.is-active .price-pin-bubble {
  background: #0a9adf;
  border-color: #0a9adf;
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(10, 154, 223, 0.55);
  z-index: 500 !important;
}
.office-price-pin.is-active .price-pin-bubble::after {
  border-top-color: #0a9adf;
}

.office-space-cluster {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #111827;
  border: 2.5px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.office-space-cluster:hover {
  background: #0a9adf;
  transform: scale(1.1);
}

/* ============================
   Leaflet Popup Shell
   ============================ */
.office-space-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  animation: popupFadeIn 0.18s ease-out;
}

@keyframes popupFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.office-space-popup .leaflet-popup-content {
  margin: 0 !important;
  width: 300px !important;
}

.office-space-popup .leaflet-popup-tip-container,
.office-space-popup .leaflet-popup-tip {
  display: none;
}

.office-space-popup .leaflet-popup-close-button {
  z-index: 20;
  top: 6px !important;
  right: 6px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  line-height: 24px !important;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45) !important;
  color: #fff !important;
  font-size: 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ============================
   Popup Card Layout
   ============================ */
.office-popup-card {
  width: 300px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

/* Media / Image slider */
.office-popup-media {
  position: relative;
  height: 175px;
  overflow: hidden;
  background: #e5e7eb;
}

.office-popup-media .popup-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.office-popup-media .popup-slide.is-active { opacity: 1; }

.office-popup-media .popup-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Slider navigation */
.popup-slider-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
  z-index: 5;
}

.popup-slider-btn {
  pointer-events: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
  padding: 0;
  transition: background 0.15s;
  flex-shrink: 0;
}

.popup-slider-btn:hover { background: #fff; }

.popup-slider-counter {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

/* Labels & wishlist overlays */
.popup-labels {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.popup-wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

/* Body */
.office-popup-body {
  padding: 14px 16px 16px;
  background: #fff;
}

.office-popup-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 7px;
}

.office-popup-title a {
  color: #111827;
  text-decoration: none;
}

.office-popup-title a:hover { color: #0a9adf; }

.office-popup-address {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.4;
}

.office-popup-address svg { flex-shrink: 0; margin-top: 1px; }

/* Feature tags */
.office-popup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.popup-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.office-space-popup-compare:hover {
  background: #e5e7eb;
}

.office-space-popup-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.office-space-popup-title a {
  color: #111827;
  text-decoration: none;
}

.office-space-popup-title a:hover {
  color: #0c9adf;
}

.office-reference-id {
  font-size: 11px;
  color: #6b7280;
  margin: -8px 0 10px !important;
}

.office-space-popup-address {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.office-space-popup-address svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #9ca3af;
}

.office-space-popup-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.office-space-popup-features li {
  font-size: 12px;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.office-space-popup-features li svg {
  color: #0c9adf;
}

.office-space-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f3f4f6;
  padding-top: 12px;
  margin-top: auto;
}

.office-space-popup-price {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.office-space-popup-price strong {
  display: block;
  font-size: 16px;
  color: #111827;
  font-weight: 700;
}

.office-space-popup .property-media,
.office-space-multi-popup .property-media {
  position: relative;
}

.office-space-popup .office-options-badge,
.office-space-multi-popup .office-options-badge {
  position: absolute;
  left: 10px;
  bottom: 28px;
  z-index: 3;
}

.office-space-popup-enquire {
  /* Using standard btn-primary classes from theme */
  white-space: nowrap;
}

.popup-tag--status.is-available  { background: #dcfce7; color: #166534; }
.popup-tag--status.is-unavailable { background: #fef2f2; color: #991b1b; }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Footer row */
.office-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #f3f4f6;
  padding-top: 12px;
}

.office-popup-price {
  line-height: 1.3;
  flex-shrink: 0;
}

.office-popup-price strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.popup-price-from {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.popup-price-unit { font-size: 11px; color: #9ca3af; margin-left: 1px; }

/* Action buttons */
.office-popup-actions { display: flex; gap: 6px; flex-shrink: 0; }

.popup-btn-view {
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: background 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.popup-btn-view:hover { background: #e5e7eb; color: #111827; }

.popup-btn-enquire {
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: #0a9adf;
  border: 1px solid #0a9adf;
  transition: background 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.popup-btn-enquire:hover { background: #0882bf; border-color: #0882bf; color: #fff; }

/* More-options link */
.popup-sub-offices {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #0a9adf;
  text-decoration: none;
  padding: 9px 0 2px;
  border-top: 1px solid #f3f4f6;
  margin-top: 10px;
  font-weight: 600;
}

.popup-sub-offices:hover { text-decoration: underline; }

/* --- CLUSTER CARD SLIDER --- */
.office-space-cluster-popup .leaflet-popup-content {
  width: 290px !important;
}

.cluster-card-slider {
  position: relative;
}

.cluster-card-slide {
  display: none;
}

.cluster-card-slide.is-active {
  display: block;
}

.cluster-popup-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  background: #fff;
  border-top: 1px solid #f3f4f6;
}

.cluster-nav-prev,
.cluster-nav-next {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}

.cluster-nav-prev:hover,
.cluster-nav-next:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.cluster-nav-counter {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}


.listing-form--views .views-exposed-form {
  margin: 0;
}

.listing-form--views .views-exposed-form .form--inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

/* Suppress browser focus rings on view-mode tabs (especially during AJAX remounts). */
.filter-tabs .filter-tab:focus,
.filter-tabs .filter-tab:focus-visible,
.filter-tabs .filter-tab:active,
.filter-tabs .js-office-view-tab:focus,
.filter-tabs .js-office-view-tab:focus-visible,
.filter-tabs .js-office-view-tab.active:focus,
.filter-tabs .js-office-view-tab.active:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.js-office-space-results.is-map-ajax-loading .filter-tabs .filter-tab,
.js-office-space-results.is-map-ajax-loading .filter-tabs .js-office-view-tab {
  outline: none !important;
  box-shadow: none !important;
  transition: none;
}

.js-office-space-results.is-map-ajax-loading .js-office-tabs-highlight {
  transition: none;
}

.filter-bar-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #637083;
  font-weight: 500;
}

.sort-select {
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2a37;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23637083' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-select:focus {
  outline: none;
  border-color: #0a9adf;
}

@media (max-width: 1200px) {

  .office-space-layout.view-mode-default {
    grid-template-columns: 1fr;
  }

  .office-space-layout.view-mode-default .office-space-map-panel {
    position: static;
  }

  .office-space-layout.view-mode-default .office-listing {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

/* --- Filter Bar & Sort --- */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.filter-bar-sort {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sort-label {
  white-space: nowrap;
  color: #637083;
  font-size: 14px;
  font-weight: 500;
}

/* The BEF form-item wrapper that gets hoisted into the filter bar */
.js-filter-bar-sort .form-item {
  margin: 0;
  padding: 0;
}

.js-filter-bar-sort .form-item label {
  display: none !important;
}

.js-filter-bar-sort select {
  border: none;
  padding: 0 24px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2a37;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23637083' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right center;
  appearance: none;
  cursor: pointer;
  min-width: 120px;
}

.js-filter-bar-sort select:focus {
  outline: none;
}

/* Hide sort elements in the main search form to avoid duplication */
.listing-form--views .form-item[class*="sort-bef-combine"],
.listing-form--views .form-item[class*="sort-by"],
.listing-form--views .form-item[class*="sort-order"] {
  display: none !important;
}

.filter-bar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ============================
   Search as I move (map overlay)
   ============================ */
.office-space-map-panel {
  position: relative;
}

.map-overlay-actions {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
}


.search-move-map {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(4px);
}

/* --- PREMIUM MAP LOADER --- */
.office-map-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  border-radius: 16px;
}

.office-map-loading-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.office-map-spinner {
  width: 56px;
  height: 56px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.office-map-spinner::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid #0a9adf;
  border-top-color: transparent;
  animation: mapSpin 0.8s cubic-bezier(0.5, 0.2, 0.5, 0.8) infinite;
  box-shadow: 0 0 15px rgba(10, 154, 223, 0.25);
}

.office-map-spinner::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #0a9adf;
  border-radius: 50%;
  animation: mapPulse 1.2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(10, 154, 223, 0.4);
}

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

@keyframes mapPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* Aggressively hide all possible default throbbers/loaders */
.ajax-progress,
.ajax-progress-throbber,
.ajax-progress-fullscreen,
.throbber,
.leaflet-loading-icon,
.leaflet-control-loading,
.views-exposed-form .ajax-progress {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  z-index: -1 !important;
}

/*
 * Restore the same enquiry-form submit loader used by header "Enquire Now".
 * Map/filter throbbers stay hidden above; only modal webform submits show it.
 */
.ui-dialog .webform-submission-form .ajax-progress,
.ui-dialog .webform-submission-form .ajax-progress-throbber,
.ui-dialog .webform-submission-form .ajax-progress--throbber,
#drupal-modal .webform-submission-form .ajax-progress,
#drupal-modal .webform-submission-form .ajax-progress-throbber,
#drupal-modal .webform-submission-form .ajax-progress--throbber {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: auto !important;
  height: 100% !important;
  z-index: 10000 !important;
}

.search-move-map .custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  color: #1f2a37;
  font-weight: 600;
  margin: 0;
}

.search-move-map input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ============================
   Pagination (Full Pager)
   ============================ */
.office-pagination {
  margin-top: 30px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  background-color: #FFFFFF;
}

.office-pagination .pager {
  margin: 0; 
  padding: 0;
  width: auto;
}

.pager__items {
  display: flex;
  align-items: center;
  gap: 4px 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pager__item {
  display: flex;
  align-items: center;
  margin: 0;
}

.pager__item a,
.pager__item span.pager__link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

/* Page numbers – Circular design from screenshot */
.pager__item--page .pager__link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #374151;
}

.pager__item--page .pager__link:hover:not(span) {
  background: #f3f4f6;
  color: #111827;
}

/* Current page – Light blue highlight from screenshot */
.pager__item--page.is-active .pager__link {
  background: #eff6ff;
  color: #374151;
  font-weight: 600;
  pointer-events: none;
}

/* Previous/Next buttons */
.pager__item--previous a,
.pager__item--next a {
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #374151;
  font-size: 16px;
  font-weight: 500;
}

.pager__item--previous a:hover,
.pager__item--next a:hover {
  background: #f9fafb;
  color: #111827;
}

.pager__item-icon {
  display: flex;
  align-items: center;
}

/* Specific styling from screenshot: Previous/Next text visibility */
.pager__item-text {
  display: inline-block;
  font-size: 16px;
}

.pager-status {
  font-size: 14px;
  color: #637083;
  font-weight: 500;
  letter-spacing: 0.01em;
  /*margin-left: auto; /* Push to the right if needed, or keep in sequence */
}

/* ============================
   Responsive Breakpoints
   ============================ */
@media (max-width: 1024px) {
 .office-space-layout.view-mode-list .office-listing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
 
}
@media (max-width: 900px) {
  .listing-form--views .views-exposed-form .form--inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-space-layout.view-mode-list .office-listing {
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 640px) {
  .office-space-map {
    min-height: var(--office-map-height-mobile, 420px);
    height: var(--office-map-height-mobile, 420px);
  }

  .office-space-layout.view-mode-map .office-space-map {
    height: 60vh;
    min-height: 60vh;
  }

  .listing-form--views .views-exposed-form .form--inline {
    grid-template-columns: 1fr;
  }

  .office-space-layout.view-mode-list .office-listing {
    grid-template-columns: 1fr;
  }


  .map-overlay-actions {
    top: auto;
    bottom: 24px;
  }


    .view-offices .filter-bar{
    gap: 10px;
  }


}

@media (max-width:576px) {
  .office-pagination{flex-wrap: wrap; justify-content: space-around;}
}

@media (max-width:460px) {
  .view-offices .filter-bar{
    gap: 0;
  }
.filter-bar-sort .form-item select {
    padding: 0 10px;
    width: 116px !important;
}

}


/* Hide the "Default" split (cards + map) view toggle on mobile. */
@media (max-width: 768px) {
  .js-office-view-tab[data-view-mode="default"] {
    display: none;
  }
}

/* Custom Client-side Pagination */
.js-office-card.is-hidden-by-pagination {
  display: none !important;
}

.cos-custom-pager {
  margin: 0;
}

.cos-custom-pager .pager__items {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cos-custom-pager .pager__item a {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 32px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #4A4A49;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
}

.cos-custom-pager .pager__item.is-active a,
.cos-custom-pager .pager__item.active a {
  background: #EAF1FF;
  border-color: #EAF1FF;
  cursor: default;
}

.cos-custom-pager .pager__item:not(.is-active):not(.active) a{
  background-color: transparent;
  border-color: transparent;
}

.cos-custom-pager .pager__item:not(.is-active):not(.active) a:hover {
  background: #EAF1FF;
  border-color: #EAF1FF;
}
.cos-custom-pager .pager__item--previous{
  margin-right: 10px;
}
.cos-custom-pager .pager__item--next{
  margin-left: 10px;
}

.cos-custom-pager .pager__item--previous a,
.cos-custom-pager .pager__item--next a {
  padding: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: transparent !important;
  border: 0;
}

.cos-custom-pager .pager__item.is-disabled a {
  opacity: 0.4;
  pointer-events: none;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.view-offices .js-pager-status {
  color: #4A4A49;
  font-weight: 500;
  margin-bottom: 16px;
}

.view-offices .js-pager-status span {
  color: #0f172a;
}

/* ============================
   Multi-property overlay on map (cluster-card-slider markup)
   Same HTML pattern as cluster Leaflet popup: full property-card slides + nav.
   ============================ */
@keyframes officeMultiPopupIn {
  from { transform: translate(-50%, -46%) scale(0.98); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.office-space-multi-popup.office-space-cluster-popup {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100% - 24px), 360px);
  max-height: min(88vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2200;
  pointer-events: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e8f0;
  animation: officeMultiPopupIn 0.2s ease;
}

.office-space-multi-popup .cluster-card-slider {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.office-space-multi-popup .cluster-card-slide.is-active {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.office-space-multi-popup .cluster-popup-nav {
  flex-shrink: 0;
  margin-top: auto;
}

.office-space-multi-popup .cluster-card-slide .property-card {
  box-shadow: none;
  margin: 0;
  border-radius: 0;
}

.office-space-multi-popup__close {
position: absolute;
    top: 6px;
    right: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #64748b;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: background 0.15s, color 0.15s;
    padding-bottom: 4px;
}

.office-space-multi-popup__close:hover {
  background: #fee2e2;
  color: #dc2626;
}
