:root {
  --ue-header-purple: #51008b;
  --ue-nav-purple: #ad07c3;
  --ue-nav-purple-dark: #8b019d;
  --ue-header-black: #0d0d0d;
  --ue-search-pink: #e0006c;
  --ue-search-gold: #f5a623;
}

/* Desktop header */
.desktop-header.ue-directory-header {
  display: block;
  position: relative;
  z-index: 1000;
  width: 100%;
  background: var(--ue-header-purple);
}

.ue-directory-header .header-topbar {
  display: grid;
  grid-template-columns: minmax(220px, 430px) minmax(260px, 680px) auto;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  padding: 8px 24px;
  background: var(--ue-header-purple);
}

.ue-directory-header .header-logo {
  min-width: 0;
  width: 100%;
}

.ue-directory-header .header-logo a {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 430px;
}

.ue-directory-header .header-logo img,
.ue-directory-header .header-logo .ue-site-logo-image {
  display: block;
  width: 100%;
  max-width: 430px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.ue-directory-header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
  margin-left: 0;
}

.ue-directory-header .header-actions .btn-login,
.ue-directory-header .header-actions .btn-register {
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ue-header-black);
  border-radius: 0;
  background: var(--ue-header-black);
  color: #fff;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: none;
}

.ue-directory-header .header-actions svg {
  width: 16px;
  height: 16px;
}

/* Global live search */
.ue-header-search {
  position: relative;
  z-index: 1005;
  width: 100%;
  min-width: 0;
}

.ue-header-search .ue-directory-search-form {
  position: relative;
  width: 100%;
  margin: 0;
}

.ue-header-search .ue-directory-search-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  overflow: hidden;
  background: #0c0c0c;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 8px 24px rgba(0,0,0,.22);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ue-header-search .ue-directory-search-field:focus-within {
  background: #101010;
  border-color: var(--ue-search-pink);
  box-shadow: 0 0 0 3px rgba(224,0,108,.16), 0 12px 30px rgba(0,0,0,.3);
}

.ue-header-search .ue-directory-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  color: rgba(255,255,255,.55);
}

.ue-header-search .ue-directory-search-icon svg {
  width: 19px;
  height: 19px;
}

.ue-header-search .ue-directory-search-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 70px 0 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 44px;
  appearance: none;
}

.ue-header-search .ue-directory-search-input::placeholder {
  color: rgba(255,255,255,.43);
  opacity: 1;
}

.ue-header-search .ue-directory-search-input::-webkit-search-cancel-button { display: none; }

.ue-header-search .ue-directory-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.075);
  color: rgba(255,255,255,.72);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ue-header-search .ue-directory-search-spinner {
  display: none;
  position: absolute;
  top: 50%;
  right: 45px;
  width: 15px;
  height: 15px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: var(--ue-search-gold);
  border-radius: 50%;
  animation: ue-header-search-spin .65s linear infinite;
}

.ue-header-search.is-loading .ue-directory-search-spinner { display: block; }
@keyframes ue-header-search-spin { to { transform: rotate(360deg); } }


.ue-header-search .ue-directory-search-advanced {
  margin-top: 5px;
  text-align: right;
  line-height: 1;
}

.ue-header-search .ue-directory-search-advanced a {
  display: inline-block;
  color: rgba(255,255,255,.58);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: color .16s ease;
}

.ue-header-search .ue-directory-search-advanced a:hover,
.ue-header-search .ue-directory-search-advanced a:focus {
  color: #fff;
  text-decoration: underline;
}

.ue-header-search .ue-directory-search-results {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 10050;
  max-height: min(440px, 64vh);
  overflow-y: auto;
  padding: 7px;
  background: #111;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  box-shadow: 0 22px 55px rgba(0,0,0,.55);
}

.ue-header-search .ue-directory-result-heading {
  padding: 8px 10px 5px;
  color: rgba(255,255,255,.42);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ue-header-search .ue-directory-result {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #fff !important;
  text-decoration: none !important;
}

.ue-header-search .ue-directory-result:hover,
.ue-header-search .ue-directory-result.is-active,
.ue-header-search .ue-directory-result:focus-visible {
  background: rgba(255,255,255,.075) !important;
  outline: none;
}

.ue-header-search .ue-directory-result-icon {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: rgba(255,255,255,.055);
}

.ue-header-search .ue-directory-result-icon--profile { color: #f266aa; }
.ue-header-search .ue-directory-result-icon--location { color: var(--ue-search-gold); }
.ue-header-search .ue-directory-result-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ue-header-search .ue-directory-result-text { min-width: 0; flex: 1; }
.ue-header-search .ue-directory-result-text strong { display: block; overflow: hidden; color: #fff; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.ue-header-search .ue-directory-result-meta { display: block; overflow: hidden; margin-top: 2px; color: rgba(255,255,255,.48); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ue-header-search .ue-directory-result-arrow { color: rgba(255,255,255,.35); font-size: 22px; }
.ue-header-search .ue-directory-search-empty { padding: 16px 12px; color: rgba(255,255,255,.62); font-size: 13px; font-weight: 700; text-align: center; }

/* Desktop navigation + Home dropdown */
.ue-directory-header .header-navbar {
  min-height: 50px;
  padding: 0 18px;
  background: var(--ue-nav-purple);
  overflow: visible;
}

.ue-directory-header .header-navbar > .ue-primary-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ue-directory-header .header-navbar > .ue-primary-nav > li {
  position: relative;
  float: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ue-directory-header .header-navbar > .ue-primary-nav > li > a {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 13px;
  color: #fff;
  font-size: .985rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.ue-directory-header .header-navbar > .ue-primary-nav > li > a:hover,
.ue-directory-header .header-navbar > .ue-primary-nav > li > a:focus,
.ue-directory-header .header-navbar > .ue-primary-nav > li.current > a {
  background: rgba(0,0,0,.2);
  color: #fff;
}

.ue-directory-header .ue-home-link::after {
  content: "▾";
  margin-left: 7px;
  color: rgba(255,255,255,.82);
  font-size: 10px;
}

.ue-directory-header .ue-home-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10100;
  display: block;
  width: 250px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ue-nav-purple);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.ue-directory-header .ue-home-menu:hover > .ue-home-dropdown,
.ue-directory-header .ue-home-menu:focus-within > .ue-home-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.ue-directory-header .ue-home-dropdown li {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.ue-directory-header .ue-home-dropdown .ue-dropdown-label {
  padding: 8px 12px 6px;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ue-directory-header .ue-home-dropdown a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 9px 12px !important;
  border-radius: 4px;
  background: transparent !important;
  color: #fff !important;
  font-size: .83rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.ue-directory-header .ue-home-dropdown a:hover,
.ue-directory-header .ue-home-dropdown a:focus { background: rgba(255,255,255,.15) !important; }
.ue-directory-header .ue-home-dropdown small { padding: 3px 6px; border-radius: 99px; background: var(--ue-search-gold); color: #111; font-size: 9px; font-weight: 900; }

/* Mobile header */
.mobile-header-v1.ue-directory-mobile-header {
  display: none;
  position: relative;
  z-index: 1000;
  padding: 8px 14px 14px;
  background: var(--ue-header-purple);
  color: #fff;
}

.ue-directory-mobile-header .mobile-top-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  gap: 0;
}

.ue-directory-mobile-header .mobile-menu-toggle,
.ue-directory-mobile-header .mobile-top-actions {
  position: relative;
  z-index: 2;
}

.ue-directory-mobile-header .mobile-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.ue-directory-mobile-header .mobile-logo-v1 {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(230px, calc(100% - 132px));
  min-width: 0;
  transform: translate(-50%, -50%);
}

.ue-directory-mobile-header .mobile-logo-v1 a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ue-directory-mobile-header .mobile-logo-v1 img,
.ue-directory-mobile-header .mobile-logo-v1 .mobile-logo-image {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
}

.ue-directory-mobile-header .mobile-quick-links {
  margin-top: 8px;
}

.ue-directory-mobile-header .mobile-quick-links ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ue-directory-mobile-header .mobile-quick-links a {
  display: block;
  padding: 10px 6px;
  border-radius: 3px;
  background: var(--ue-nav-purple);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.ue-directory-mobile-header .ue-header-search--mobile {
  margin-top: 10px;
}

.ue-directory-mobile-header .mobile-account-dropdown {
  top: calc(100% + 8px);
}

.ue-directory-mobile-header .mobile-drawer-section-label {
  margin: 16px 0 7px !important;
  padding: 0 9px !important;
  color: #999;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ue-directory-mobile-header .mobile-drawer-section-label:first-child { margin-top: 0 !important; }
.ue-directory-mobile-header .mobile-drawer-section-label + li { margin-top: 0; }
.ue-directory-mobile-header .ue-category-link { display: flex !important; align-items: center; gap: 10px; }
.ue-directory-mobile-header .ue-category-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #bbb; }
.ue-directory-mobile-header .ue-category-vip .ue-category-dot { background: #f5a623; }
.ue-directory-mobile-header .ue-category-verified .ue-category-dot { background: #07883f; }
.ue-directory-mobile-header .ue-category-new .ue-category-dot { background: #8b019d; }
.ue-directory-mobile-header .ue-category-female .ue-category-dot { background: #e0006c; }
.ue-directory-mobile-header .ue-category-male .ue-category-dot { background: #2358a6; }
.ue-directory-mobile-header .ue-category-gay .ue-category-dot { background: #e26f00; }

/* Keep both login/register visible through tablet widths. */
@media (max-width: 1000px) and (min-width: 769px) {
  .ue-directory-header .header-topbar {
    grid-template-columns: minmax(170px, 280px) minmax(210px, 1fr) auto;
    gap: 10px;
    padding: 8px 14px;
  }
  .ue-directory-header .header-logo img,
  .ue-directory-header .header-logo .ue-site-logo-image { max-height: 46px; }
  .ue-directory-header .header-actions { gap: 6px; }
  .ue-directory-header .header-actions .btn-login,
  .ue-directory-header .header-actions .btn-register { height: 38px; padding: 0 11px; font-size: 12px; }
  .ue-directory-header .header-navbar { padding: 0 8px; }
  .ue-directory-header .header-navbar > .ue-primary-nav { flex-wrap: wrap; }
  .ue-directory-header .header-navbar > .ue-primary-nav > li > a { height: 44px; padding: 0 8px; font-size: 12px; }
}

@media (max-width: 820px) and (min-width: 769px) {
  .ue-directory-header .header-topbar {
    grid-template-columns: minmax(150px, 210px) minmax(185px, 1fr) auto;
    gap: 7px;
    padding: 8px 10px;
  }
  .ue-directory-header .header-logo img,
  .ue-directory-header .header-logo .ue-site-logo-image { max-height: 39px; }
  .ue-directory-header .header-actions .btn-login,
  .ue-directory-header .header-actions .btn-register { padding: 0 9px; font-size: 11.5px; }
  .ue-directory-header .ue-directory-search-field { height: 42px; }
  .ue-directory-header .ue-directory-search-input { height: 40px; line-height: 40px; font-size: 12.5px !important; }
}

/* Sidebar responsiveness is handled by responsive.css/responsive-listing.css. */
@media (max-width: 768px) {
  .desktop-header.ue-directory-header { display: none !important; }
  .mobile-header-v1.ue-directory-mobile-header { display: block !important; }

  /* Do not hide the right sidebar: it remains available below the content. */
  .sidebar-right { max-width: 100%; }
}

@media (max-width: 380px) {
  .mobile-header-v1.ue-directory-mobile-header { padding-left: 10px; padding-right: 10px; }
  .ue-directory-mobile-header .mobile-icon-btn { width: 38px; height: 38px; flex-basis: 38px; }
  .ue-directory-mobile-header .mobile-logo-v1 { width: min(205px, calc(100% - 112px)); }
  .ue-directory-mobile-header .mobile-logo-v1 img,
  .ue-directory-mobile-header .mobile-logo-v1 .mobile-logo-image { max-width: 205px; }
  .ue-directory-mobile-header .mobile-quick-links ul { gap: 6px; }
  .ue-directory-mobile-header .mobile-quick-links a { padding: 9px 4px; font-size: 12.5px; }
}

/* ==========================================================
   LOCATION SIDEBAR LABELS — SITE-WIDE RESPONSIVE STATE
   sidebar-left.php is used on listing and ordinary templates.
   Keep the two responsive labels mutually exclusive everywhere,
   not only where responsive-listing.css is loaded.
   ========================================================== */
.ue-location-sidebar .ue-location-sidebar-label--mobile {
    display: none !important;
}

.ue-location-sidebar .ue-location-sidebar-label--desktop {
    display: inline !important;
}

@media all and (max-width: 960px) {
    .ue-location-sidebar .ue-location-sidebar-label--desktop {
        display: none !important;
    }

    .ue-location-sidebar .ue-location-sidebar-label--mobile {
        display: inline !important;
    }
}

/* ==========================================================
   MOBILE NEAR-YOU LOCATION WIDGET
   Keep the desktop sidebar untouched. On the responsive/mobile
   sidebar, frame only the Near You location selector.
   ========================================================== */
@media all and (max-width: 960px) {
    .ue-location-sidebar .ue-near-you-locations {
        border: 4px solid #ffffff !important;
        box-sizing: border-box;
    }
}


/* ==========================================================
   ORIGINAL / DARK THEME — MOBILE ACCOUNT MENU STACKING
   Keep the Login / Register account dropdown above the mobile
   live-search block. The dropdown previously sat inside a z:2
   parent stacking context while search used z:1005.
   ========================================================== */
@media (max-width: 768px) {
  body:not(.ue-theme-light-purple) .mobile-header-v1.ue-directory-mobile-header {
    overflow: visible !important;
  }

  body:not(.ue-theme-light-purple) .ue-directory-mobile-header .mobile-top-row {
    position: relative !important;
    z-index: 1010 !important;
    overflow: visible !important;
  }

  body:not(.ue-theme-light-purple) .ue-directory-mobile-header .mobile-top-actions,
  body:not(.ue-theme-light-purple) .ue-directory-mobile-header .mobile-account-menu {
    position: relative !important;
    z-index: 1020 !important;
    overflow: visible !important;
  }

  body:not(.ue-theme-light-purple) .ue-directory-mobile-header .mobile-account-dropdown {
    z-index: 11000 !important;
  }

  body:not(.ue-theme-light-purple) .ue-directory-mobile-header .ue-header-search--mobile {
    position: relative !important;
    z-index: 1005 !important;
  }
}


/* ==========================================================
   MOBILE LOCATION SIDEBAR — ONE CONSISTENT COMPONENT
   The single-profile dark-theme treatment is the reference look. The same
   spacing, framing and row geometry now applies on homepage, taxonomy and
   ordinary pages. Template-specific placement rules may move the component,
   but they must not restyle it.
   ========================================================== */
@media all and (max-width: 960px) {
  .ue-location-sidebar {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    background: #FFF0F4 !important;
    overflow: visible !important;
  }

  .ue-location-sidebar .ue-location-widget,
  .ue-location-sidebar .ue-near-you-locations {
    box-sizing: border-box !important;
    width: auto !important;
    margin: 10px !important;
    border: 4px solid #fff !important;
    border-radius: 2px !important;
    background: #260B39 !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  .ue-location-sidebar .ue-location-widget > h2,
  .ue-location-sidebar .ue-near-you-locations > h2 {
    min-height: 52px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .ue-location-sidebar .country-list {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ue-location-sidebar .country-list > li {
    width: 100% !important;
    margin: 0 !important;
  }
}

@media all and (max-width: 600px) {
  .ue-location-sidebar .ue-location-widget,
  .ue-location-sidebar .ue-near-you-locations {
    margin: 10px !important;
  }
}
