/* ==========================================================================
   PropertysDeal — Premium site header
   ========================================================================== */

:root {
  --pd-header-h: 72px;
  --pd-mobile-header-h: 52px;
  --pd-topbar-h: 36px;
  --pd-brand-teal: #1e5f7a;
  --pd-brand-teal-dark: #164a61;
  --pd-brand-orange: #eb8944;
  --pd-brand-orange-hover: #d97732;
  --pd-text: #1a2b3c;
  --pd-text-muted: #5c6b7a;
  --pd-border: rgba(30, 95, 122, 0.12);
  --pd-shadow-sm: 0 2px 8px rgba(26, 43, 60, 0.06);
  --pd-shadow-md: 0 12px 40px rgba(26, 43, 60, 0.12);
  --pd-shadow-lg: 0 20px 50px rgba(26, 43, 60, 0.14);
  --pd-radius: 12px;
  --pd-radius-lg: 16px;
  --pd-transition: 0.2s ease;
}

/* -------------------------------------------------------------------------- */
/* Shell                                                                      */
/* -------------------------------------------------------------------------- */

.pd-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: var(--pd-shadow-sm);
}

.pd-header__topbar {
  background: linear-gradient(90deg, var(--pd-brand-orange) 0%, #e07a38 100%);
  color: rgba(255, 255, 255, 0.98);
  font-size: 0.8125rem;
  min-height: var(--pd-topbar-h);
}

.pd-header__topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  min-height: var(--pd-topbar-h);
}

.pd-header__topbar-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.92;
  transition: opacity var(--pd-transition);
}

.pd-header__topbar-link:hover {
  color: #fff;
  opacity: 1;
}

.pd-navbar {
  min-height: var(--pd-header-h);
  padding: 0.5rem 0;
}

.pd-navbar__container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.pd-navbar .container {
  gap: 0.75rem;
}

.pd-header__toolbar {
  display: contents;
}

.pd-header__city-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.pd-header__city-wrap .dropdown {
  min-width: 0;
  max-width: 100%;
}

/* .pd-mobile-right — Profile icon + Post Property button shown on mobile only */
.pd-mobile-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

.pd-btn--compact {
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pd-btn--compact .btn-text {
  display: inline;
}

@media (max-width: 380px) {
  .pd-brand__logo {
    height: 28px;
  }

  .pd-btn--compact .btn-text {
    max-width: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Mobile bottom navigation                                                   */
/* -------------------------------------------------------------------------- */

.pd-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0.15rem;
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--pd-border);
  box-shadow: 0 -4px 20px rgba(26, 43, 60, 0.08);
}

.pd-bottom-nav__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.25rem 0.15rem;
  text-decoration: none;
  color: var(--pd-text-muted);
  border: none;
  background: transparent;
  border-radius: 10px;
  transition: color var(--pd-transition), background var(--pd-transition);
}

.pd-bottom-nav__item:hover,
.pd-bottom-nav__item:focus {
  color: var(--pd-brand-teal);
  background: rgba(30, 95, 122, 0.06);
}

.pd-bottom-nav__item.is-active {
  color: var(--pd-brand-teal);
}

.pd-bottom-nav__item--accent {
  color: var(--pd-brand-orange);
}

.pd-bottom-nav__item--accent.is-active,
.pd-bottom-nav__item--accent:hover {
  color: var(--pd-brand-orange-hover);
}

.pd-bottom-nav__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f4f7f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--pd-transition);
}

.pd-bottom-nav__item.is-active .pd-bottom-nav__icon,
.pd-bottom-nav__item:hover .pd-bottom-nav__icon {
  background: rgba(30, 95, 122, 0.1);
}

.pd-bottom-nav__item--accent .pd-bottom-nav__icon {
  background: rgba(235, 137, 68, 0.12);
}

.pd-bottom-nav__label {
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  body.pd-city-panel-open {
    overflow: hidden;
  }

  .pd-header__topbar {
    display: none;
  }

  .pd-header {
    z-index: 1050;
  }

  .pd-navbar {
    min-height: var(--pd-mobile-header-h);
    padding: 0.4rem 0;
  }

  .pd-navbar__container {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
  }

  .pd-brand {
    order: 1;
    flex: 0 0 100%;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: flex-start;
  }

  .pd-brand__logo {
    height: 32px;
    width: auto;
  }

  .pd-header__toolbar {
    order: 2;
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .pd-header__city-wrap {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .pd-header__post-mobile {
    flex: 0 1 auto;
    justify-content: flex-end;
  }

  .pd-header__city-wrap .dropdown {
    width: auto;
    max-width: 100%;
  }

  .pd-city-trigger {
    width: auto;
    max-width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 8px;
  }

  .pd-city-trigger #city-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
  }

  .pd-city-trigger__prefix {
    display: none !important;
  }

  .pd-city-trigger::after {
    flex-shrink: 0;
    margin-left: 2px;
  }

  .pd-btn--compact {
    padding: 0.35rem 0.6rem;
    font-size: 0.6875rem;
    line-height: 1.1;
    border-radius: 8px;
  }

  .pd-btn--compact .btn-text {
    display: inline-block;
    max-width: none;
    vertical-align: bottom;
  }

  /* City panel: sheet between header and bottom nav */
  .pd-header__city-wrap .dropdown-menu.pd-city-mega {
    position: fixed !important;
    top: var(--pd-mobile-header-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0;
    border: none;
    border-top: 1px solid var(--pd-border);
    box-shadow: 0 -8px 32px rgba(26, 43, 60, 0.15);
    transform: none !important;
    z-index: 1045;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }

  .pd-header__city-wrap .dropdown-menu.pd-city-mega.show {
    display: flex !important;
  }

  .pd-header__city-wrap .pd-city-mega__body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    flex-direction: column;
    overflow: hidden;
  }

  .pd-header__city-wrap .pd-city-mega__sidebar {
    flex: 0 0 auto;
    max-height: 38vh;
    border-right: none;
    border-bottom: 1px solid var(--pd-border);
  }

  .pd-header__city-wrap .pd-city-mega__grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pd-header__city-wrap .pd-city-mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-city-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
  }

  body.pd-city-panel-open .pd-city-backdrop {
    display: block;
  }
}

/* -------------------------------------------------------------------------- */
/* Brand                                                                      */
/* -------------------------------------------------------------------------- */

.pd-brand {
  flex-shrink: 0;
  padding: 0;
  margin-right: 0.5rem;
}

.pd-brand__logo {
  height: 48px;
  width: auto;
  display: block;
  transition: transform var(--pd-transition);
}

.pd-brand:hover .pd-brand__logo {
  transform: scale(1.02);
}

/* -------------------------------------------------------------------------- */
/* City selector                                                              */
/* -------------------------------------------------------------------------- */

.pd-city-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pd-text);
  background: #f4f7f9;
  border: 1px solid var(--pd-border);
  border-radius: 999px;
  transition:
    background var(--pd-transition),
    border-color var(--pd-transition),
    box-shadow var(--pd-transition);
}

.pd-city-trigger:hover,
.pd-city-trigger.show {
  background: #fff;
  border-color: var(--pd-brand-teal);
  box-shadow: 0 0 0 3px rgba(30, 95, 122, 0.1);
  color: var(--pd-brand-teal);
}

.pd-city-trigger__icon {
  color: var(--pd-brand-orange);
  font-size: 0.9rem;
}

.pd-city-trigger::after {
  margin-left: 0.15rem;
}

/* Mega menu */
.pd-city-mega {
  width: min(920px, calc(100vw - 2rem));
  max-height: min(70vh, 520px);
  padding: 0;
  margin-top: 0.65rem !important;
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius-lg);
  box-shadow: var(--pd-shadow-lg);
  overflow: hidden;
}

.pd-city-mega__search-wrap {
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
  border-bottom: 1px solid var(--pd-border);
}

.pd-city-mega__search {
  position: relative;
}

.pd-city-mega__search .form-control {
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--pd-border);
  font-size: 0.9rem;
}

.pd-city-mega__search .form-control:focus {
  border-color: var(--pd-brand-teal);
  box-shadow: 0 0 0 3px rgba(30, 95, 122, 0.12);
}

.pd-city-mega__search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pd-text-muted);
  pointer-events: none;
}

.pd-city-mega__body {
  display: flex;
  min-height: 280px;
  max-height: calc(min(70vh, 520px) - 72px);
}

.pd-city-mega__sidebar {
  flex: 0 0 200px;
  padding: 1rem 1.1rem;
  background: #f8fafb;
  border-right: 1px solid var(--pd-border);
  overflow-y: auto;
}

.pd-city-mega__region-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pd-text-muted);
  margin-bottom: 0.5rem;
}

.pd-city-mega__region-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pd-brand-teal);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pd-city-mega__grid-wrap {
  flex: 1;
  padding: 1rem 1.25rem;
  overflow-y: auto;
}

.pd-city-mega__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem 1rem;
}

/* City items — keep .city-item for location-permission.js */
.city-item,
.pd-city-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.65rem;
  margin: 0;
  font-size: 0.875rem;
  color: var(--pd-text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    color var(--pd-transition),
    background var(--pd-transition),
    transform var(--pd-transition);
}

.city-item:hover,
.pd-city-item:hover {
  color: var(--pd-brand-teal);
  background: rgba(30, 95, 122, 0.08);
  transform: translateX(2px);
}

.city-item.active-city,
.city-item.is-active {
  color: var(--pd-brand-teal) !important;
  font-weight: 600;
  background: rgba(235, 137, 68, 0.12) !important;
}

.pd-city-mega__empty {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--pd-text-muted);
  font-size: 0.9rem;
}

.pd-city-mega__empty.is-visible {
  display: block;
}

/* -------------------------------------------------------------------------- */
/* Actions (welcome, profile, CTAs)                                           */
/* -------------------------------------------------------------------------- */

.pd-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.pd-header .pd-navbar .container {
  overflow: visible;
}

.main-header .pd-profile-trigger i {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--pd-text);
}

.pd-welcome {
  font-size: 0.8125rem;
  color: var(--pd-text-muted);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-welcome strong {
  color: var(--pd-text);
  font-weight: 600;
}

/* Profile dropdown — icon only, no filled circle / ring behind avatar */
.pd-profile-trigger {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0.15rem;
  border: none;
  border-radius: 50%;
  background: transparent !important;
  color: var(--pd-text);
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--pd-transition), opacity var(--pd-transition);
}

.pd-profile-trigger:hover,
.pd-profile-trigger.show,
.pd-profile-trigger:focus {
  border: none;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--pd-brand-teal);
}

.pd-profile-trigger:focus-visible {
  outline: 2px solid var(--pd-brand-teal);
  outline-offset: 3px;
}

.pd-profile-trigger.dropdown-toggle::after {
  margin-left: 0.2rem;
  vertical-align: 0.15em;
  border-top-color: var(--pd-text-muted);
}

.pd-profile-trigger i {
  font-size: 1.35rem;
}

.pd-profile-menu {
  min-width: 260px;
  padding: 0;
  margin-top: 0.65rem !important;
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius);
  box-shadow: var(--pd-shadow-md);
  overflow: hidden;
}

.pd-profile-menu__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #f8fafb 0%, #eef4f7 100%);
  border-bottom: 1px solid var(--pd-border);
}

.pd-profile-menu__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pd-brand-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pd-profile-menu__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pd-text);
  margin: 0;
  line-height: 1.3;
}

.pd-profile-menu__meta {
  font-size: 0.75rem;
  color: var(--pd-text-muted);
  margin: 0;
}

.pd-profile-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  color: var(--pd-text);
  transition: background var(--pd-transition), color var(--pd-transition);
}

.pd-profile-menu .dropdown-item i {
  width: 1.1rem;
  text-align: center;
  color: var(--pd-text-muted);
  font-size: 0.85rem;
}

.pd-profile-menu .dropdown-item:hover,
.pd-profile-menu .dropdown-item:focus {
  background: rgba(30, 95, 122, 0.08);
  color: var(--pd-brand-teal);
}

.pd-profile-menu .dropdown-item:hover i {
  color: var(--pd-brand-orange);
}

.pd-profile-menu .dropdown-item.active,
.pd-profile-menu .dropdown-item.fw-bold.text-primary {
  background: rgba(235, 137, 68, 0.1);
  color: var(--pd-brand-teal);
}

.pd-profile-menu .dropdown-divider {
  margin: 0.35rem 0;
  border-color: var(--pd-border);
}

/* Buttons */
.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 10px;
  border: none;
  white-space: nowrap;
  transition:
    transform var(--pd-transition),
    box-shadow var(--pd-transition),
    background var(--pd-transition),
    color var(--pd-transition);
}

.pd-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.pd-btn:active:not(:disabled) {
  transform: translateY(0);
}

.pd-btn--primary {
  background: linear-gradient(135deg, var(--pd-brand-orange) 0%, #e07a38 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(235, 137, 68, 0.35);
}

.pd-btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--pd-brand-orange-hover) 0%, #c96e2e 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(235, 137, 68, 0.4);
}

.pd-btn--outline {
  background: #fff;
  color: var(--pd-brand-teal);
  border: 2px solid var(--pd-brand-teal);
  box-shadow: none;
}

.pd-btn--outline:hover {
  background: var(--pd-brand-teal);
  color: #fff;
}

.pd-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.pd-btn .spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Legacy toggler — removed on mobile layout */
.pd-navbar-toggler {
  display: none;
}

/* Profile / city dropdowns — keep visible when page CSS targets generic .dropdown */
.main-header .navbar .dropdown {
  position: relative;
  display: block !important;
  width: auto;
  top: auto;
  left: auto;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent !important;
}

.main-header .navbar .dropdown-menu {
  position: absolute;
}

@media (max-width: 991.98px) {
  .main-header .navbar .pd-header__city-wrap .dropdown-menu.pd-city-mega {
    position: fixed !important;
  }

  /* Responsive header layout overrides */
  .pd-brand {
    order: 1;
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
  }

  .pd-header__toolbar {
    order: 2;
    flex: 0 0 auto !important;
    display: contents !important;
  }

  .pd-mobile-right {
    order: 3;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
  }

  .main-header .pd-header-actions {
    display: none !important;
  }

  .pd-mobile-hamburger {
    order: 0;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--pd-text);
    padding: 0 12px 0 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }

  /* Responsive search bar elements */
  .pd-result-header-search {
    position: relative !important;
    order: 4;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
  }

  .pd-search-purpose-wrap {
    position: static !important;
  }

  .pd-search-input-group {
    position: static !important;
  }

  .pd-search-purpose-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  }

  .pd-search-purpose-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pd-search-suggestions {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    border-radius: 0 0 8px 8px !important;
  }
}

/* Collapse panel (mobile / tablet) */
.pd-navbar-collapse {
  flex-grow: 1;
}

@media (max-width: 991.98px) {
.mega-menu h6 {
    font-size: 14px;
    font-weight: bold;
    color: #444;
}
.mega-menu a {
    display: block;
    font-size: 13px;
    color: #666;
    padding: 3px 0;
    text-decoration: none;
}
.mega-menu a:hover { color: #f17a37; }

/* Profile Dropdown */
.pd-mobile-right .dropdown {
  position: relative !important;
}

.pd-mobile-right .pd-profile-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: -120px !important;
  left: auto !important;
  width: 260px !important;
  min-width: 260px !important;
  transform: none !important;
  margin-top: 0 !important;
  z-index: 3000 !important;
  box-shadow: var(--pd-shadow-md) !important;
  border: 1px solid var(--pd-border);
}
}

@media (max-width: 575.98px) {
  .pd-header__topbar-link span.pd-hide-xs {
    display: none;
  }
}

@media (min-width: 992px) {
  .pd-header__city-wrap {
    flex: 0 0 auto;
    margin-right: auto;
    justify-content: flex-start;
  }

  .pd-header-actions {
    margin-left: auto;
  }

  .pd-navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
  }

  .pd-header__nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
}

/* Legacy hooks */
.main-header {
  /* alias — pd-header used in template */
}

#post_property:disabled,
#post_project:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.pd-result-header-search {
  flex: 1;
  max-width: 760px;
  height: 52px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 24px;
}

.pd-result-purpose {
  width: 82px;
  height: 100%;
  border: none;
  border-right: 1px solid #dbe3ea;
  padding: 0 12px;
  font-weight: 600;
  outline: none;
  background: #fff;
}

.pd-result-search-input {
  flex: 1;
  height: 100%;
  border: none;
  padding: 0 18px;
  outline: none;
  font-size: 15px;
}

.pd-result-search-btn {
  width: 58px;
  height: 100%;
  border: none;
  background: #fff;
  color: #26364a;
  font-size: 22px;
}

@media (max-width: 991px) {
  .pd-result-header-search {
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
    margin: 8px 0 0;
  }
}
.pd-result-header-search {
  overflow: visible;
}

.pd-search-input-group {
  position: relative;
  flex: 1;
  min-width: 0;
}

.pd-search-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: -105px;
  right: -58px;
  z-index: 9999;
  max-height: 430px;
  overflow-y: auto;
  margin-top: 0;
  background: #fff;
  border: none;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.pd-search-suggestions.is-visible {
  display: block;
}

.pd-search-suggestion-item {
  width: 100%;
  border: none;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
  padding: 16px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  cursor: pointer;
}

.pd-search-suggestion-item:hover {
  background: #f7f9fc;
}

.pd-search-suggestion-item.is-active {
  background: #f7f9fc;
  color: #1f2a44;
}

.pd-search-suggestion-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pd-search-suggestion-title {
  font-size: 15px;
  font-weight: 500;
  color: #1f2a44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-search-suggestion-meta {
  margin-top: 3px;
  font-size: 13px;
  color: #6b7c93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-search-suggestion-type {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1f2a44;
}

.pd-search-suggestion-empty {
  padding: 18px 34px;
  color: #64748b;
  font-size: 15px;
  text-align: left;
}

/* .pd-search-city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 18px 4px;
} */

/* .pd-search-city-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ea;
  background: #f8fafc;
  color: #1f2a44;
  font-size: 13px;
  line-height: 1;
} */

.pd-search-city-chip button {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.pd-search-info {
  display: none;
  margin: 0 18px 8px;
  color: #b91c1c;
  font-size: 13px;
}

.pd-search-info.is-visible {
  display: block;
}

.pd-search-city-item {
  padding: 14px 34px;
}

.pd-search-purpose-wrap {
  position: relative;
  height: 100%;
  min-width: 104px;
  border-right: 1px solid #dbe3ea;
}

.pd-search-purpose-btn {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  padding: 0 14px;
  font-weight: 700;
  color: #071b3a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pd-search-purpose-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 600px;
  min-width: 600px;
  max-width: 600px;
  background: #fff;
  border: 1px solid #e5edf5;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
  padding: 0;
  display: none;
  z-index: 9999;
}

.pd-search-purpose-menu.show {
  display: block;
}

.pd-search-purpose-panel {
  display: flex;
  flex-direction: column;
}

.pd-search-purpose-tabs {
  display: flex;
  gap: 2px;
  padding: 10px;
  background: #f8fbff;
  border-bottom: 1px solid #e5edf5;
}

.pd-search-purpose-tab {
  flex: 1;
  border: 1px solid transparent;
  background: #ffffff !important;
  color: #556577;
  font-weight: 700;
  font-size: 12px;   
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.pd-search-purpose-tab.active {
  background: #e8f1ff !important;
  color: #0f3260 !important;
  border-color: #d6e6ff;
}

.pd-search-purpose-tab:not(.active):hover {
  background: #f7faff !important;
  color: #0f3260;
}

.pd-search-purpose-details {
  padding: 16px;
}

.pd-search-purpose-loading {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.pd-search-purpose-group {
  margin-bottom: 16px;
}

.pd-search-purpose-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #6b7c95;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.pd-search-purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pd-search-purpose-item {
  border: 1px solid #e5edf5;
  border-radius: 10px;
  background: #fafbfc;
  color: #1f3347;
  font-weight: 600;
  font-size: 12px;
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.pd-search-purpose-item:hover {
  background: #eef4fb;
}

.pd-search-purpose-item.is-active {
  background: #e8f1ff;
  border-color: #a2c4ff;
  color: #0f3260;
}

.pd-search-purpose-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed #d8e2ee;
  border-radius: 10px;
  color: #718096;
  font-size: 13px;
  text-align: center;
  background: #fbfdff;
}

.pd-search-purpose-details-note {
  font-size: 13px;
  color: #7f8c9f;
  margin-top: 10px;
}

.pd-search-menu-title {
  font-size: 12px;
  font-weight: 700;
  color: #8793a6;
  margin: 8px 16px;
}

.pd-search-menu-item {
  width: 100%;
  border: none;
  background: #fff;
  text-align: left;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #071b3a;
}

.pd-search-menu-item:hover {
  background: #f3f7fb;
}

.pd-search-menu-item.is-active {
  color: #005ca8;
  font-weight: 700;
}
/* Header city chip search UI fix */
/* Header city chip search UI fix */
.pd-result-header-search {
  min-height: 52px;
  height: auto;
  display: flex;
  align-items: stretch;
  overflow: visible;
}

.pd-search-input-group {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  justify-content: flex-start;
}

.pd-search-city-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.pd-search-city-chip {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cfe3f7;
  background: #f4fbff;
  color: #1f2a44;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.pd-search-city-chip button {
  border: none;
  background: transparent;
  color: #0d7bdc;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

#pd-search-city-input {
  flex: 1;
  min-width: 120px;
  height: 36px;
  border: none;
  outline: none;
  padding-left: 8px;
}

.pd-result-search-btn {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  font-size: 18px;
  align-self: center;
}

.pd-search-suggestions {
  top: calc(100% + 2px);
  left: 0;
  right: -58px;
}
.pd-search-purpose-wrap,
.pd-search-purpose-btn {
  align-self: stretch;
  min-height: 52px;
}
.premium-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
}

.premium-loader-overlay.show {
  display: flex !important;
}
.premium-loader-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(6px);
}

.premium-loader-overlay.show {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
}

.premium-loader-container {
  position: relative;
  z-index: 1000000 !important;
  text-align: center;
}
@media (max-width: 991.98px) {
  .pd-header--listing .pd-navbar__container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
  }

  .pd-header--listing .pd-mobile-hamburger {
    order: 1 !important;
    display: inline-flex !important;
  }

  .pd-header--listing .pd-brand {
    order: 2 !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
  }

  .pd-header--listing .pd-brand__logo {
    height: 36px !important;
  }

  .pd-header--listing .pd-mobile-right {
    order: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
  }

  .pd-header--listing .pd-result-header-search {
    order: 4 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 10px !important;
  }
}
@media (max-width: 991.98px) {
  .pd-header:not(.pd-header--listing) .pd-navbar__container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
  }

  .pd-header:not(.pd-header--listing) .pd-brand {
    order: 1 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    margin: 0 0 8px 0 !important;
    justify-content: flex-start !important;
  }

  .pd-header:not(.pd-header--listing) .pd-header__toolbar {
    order: 2 !important;
    display: contents !important;
  }

  .pd-header:not(.pd-header--listing) .pd-header__city-wrap {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
  }

  .pd-header:not(.pd-header--listing) .pd-mobile-right {
    order: 3 !important;
    margin-left: auto !important;
  }
}
.pd-search-property-type-error {
  display: none;
  margin: 8px 16px 0;
  font-size: 13px;
  font-weight: 600;
  color: #dc3545;
}

.pd-search-property-type-error.is-visible {
  display: block;
}