/* Compact popups with a clear X close control */

/* Liquid glass close — light blur on the circle only; X stays sharp on top */
.popup-close,
.modal-close,
.pd-close,
.filter-close {
  position: sticky !important;
  top: 10px;
  float: right;
  margin: 0 0 8px 10px;
  z-index: 60;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  isolation: isolate;
  clear: right;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.12) 100%
  );
  backdrop-filter: blur(6px) saturate(165%);
  -webkit-backdrop-filter: blur(6px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -1px 0 rgba(255, 255, 255, 0.06) inset,
    0 4px 16px rgba(3, 7, 18, 0.14);
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.popup-close svg,
.modal-close svg,
.pd-close svg,
.filter-close svg {
  position: relative;
  z-index: 1;
  display: block;
  flex-shrink: 0;
  filter: none;
  opacity: 1;
}
.popup-close svg path,
.modal-close svg path,
.pd-close svg path,
.filter-close svg path {
  stroke-width: 2.25px;
}
.popup-close:hover,
.modal-close:hover,
.pd-close:hover,
.filter-close:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.18) 100%
  );
  border-color: rgba(255, 255, 255, 0.48);
}
.popup-close:active,
.modal-close:active,
.pd-close:active,
.filter-close:active {
  transform: scale(0.96);
}
html[dir="rtl"] .popup-close,
html[dir="rtl"] .modal-close,
html[dir="rtl"] .pd-close,
html[dir="rtl"] .filter-close {
  float: left;
  clear: left;
  margin: 0 10px 8px 0;
}

/* Dark form modals (list property, etc.) */
.modal-overlay {
  align-items: flex-end;
  padding: 12px;
}
@media (min-width: 560px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}
.modal {
  max-width: min(400px, calc(100vw - 24px)) !important;
  max-height: min(78vh, 480px) !important;
  padding: 14px 20px 22px !important;
  border-radius: 16px !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal h3 {
  font-size: 20px !important;
  padding-inline-end: 36px;
}
.modal-sub {
  font-size: 13px !important;
  margin-bottom: 18px !important;
}
.modal-close,
.modal .popup-close {
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(255, 255, 255, 0.04) inset,
    0 4px 14px rgba(0, 0, 0, 0.25);
}
.modal-close:hover,
.modal .popup-close:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.14) 100%
  );
}

/* Property detail popup — smaller, easy to dismiss */
.pd-overlay {
  align-items: flex-end;
  padding: 12px;
}
@media (min-width: 640px) {
  .pd-overlay {
    align-items: center;
    padding: 20px;
  }
}
.pd-modal {
  max-width: min(480px, calc(100vw - 24px)) !important;
  max-height: min(82vh, 580px) !important;
  border-radius: 16px !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pd-close {
  margin-top: 10px !important;
  margin-right: 10px !important;
  right: auto !important;
  left: auto !important;
}
html[dir="rtl"] .pd-close {
  margin-right: 0 !important;
  margin-left: 10px !important;
}
.pd-main {
  height: auto !important;
  max-height: 200px !important;
  min-height: 140px !important;
}
@media (max-width: 560px) {
  .pd-main {
    max-height: 170px !important;
    min-height: 120px !important;
  }
}
.pd-thumbs {
  padding: 10px !important;
}
.pd-content {
  padding: 18px 20px 0 !important;
}
.pd-title {
  font-size: 18px !important;
}
.pd-price {
  font-size: 24px !important;
}
.pd-close {
  color: var(--ink, #030712) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(255, 255, 255, 0.52) 100%
  ) !important;
  backdrop-filter: blur(5px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(5px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 12px rgba(3, 7, 18, 0.18) !important;
}

/* Mobile filter sheet */
.filter-panel {
  padding-top: 12px !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.filter-panel .filter-close {
  top: 12px;
  margin-top: 0;
  margin-right: 8px;
  color: var(--ink, #030712);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.55) 100%
  );
  backdrop-filter: blur(5px) saturate(150%);
  -webkit-backdrop-filter: blur(5px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 10px rgba(3, 7, 18, 0.1);
}
