:root {
  --w: 425px;
  --blue: #0c82ff;
  --border: #e6eaf2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  display: flex;
  justify-content: center;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
  color: #181f34;
  overflow-y: auto;
}

.phone {
  width: var(--w);
  max-width: 100%;
  min-height: 100dvh;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  display: flex;
  flex-direction: column;
}

.header {
  padding: 20px 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.title {
  font-weight: 700;
  font-size: 24px;
  color: var(--blue);
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.tabs {
  display: flex;
  padding: 0px 16px 0px;
}
.tabs:first-child {
  padding-top: 24px;
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0px 3px 10px;
  border-radius: 10px;
  color: rgba(24, 31, 52, 0.5);
  font-size: 14px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
}

.tab span {
  font-size: 18px;
}

.tab.active {
  font-weight: 700;
  color: var(--blue);
}

.tab.active:after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: var(--blue);
  border-radius: 10px 10px 0 0;
  position: absolute;
  bottom: 0px;
  left: 0;
}

#map {
  width: 100%;
  min-height: 250px;
  flex: 1;
}

.leaflet-tile {
  filter: grayscale(1) contrast(1.05) brightness(0.95) !important;
}

.leaflet-container {
  background: #eef2f7;
}

.leaflet-control-attribution {
  display: none;
}

.emj {
  transform: translate(-14px, -14px);
  font-size: 22px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 6px 0 rgba(24, 31, 52, 0.1);
}
.leaflet-popup-content-wrapper {
  max-width: 329px;
  width: 100vw;
  padding: 24px 16px 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0px;
}
.leaflet-popup-tip-container {
  display: none;
}

/* Popup positioning - below the marker */
.leaflet-popup {
  margin-left: 0 !important;
  margin-top: 0 !important;
}

.leaflet-popup-content-wrapper {
  margin-left: 0 !important;
  margin-top: 0 !important;
}

/* Active marker styles */
.marker-active {
  z-index: 1000 !important;
  filter: drop-shadow(0 0 8px rgba(12, 130, 255, 0.6)) !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
}

/* Map blur when popup is open */
/* .map-blurred .leaflet-marker-icon:not(._active) {
  filter: blur(2px);
  pointer-events: none;
  transition: filter 0.3s ease;
}
.map-blurred .leaflet-tile-pane {
  filter: blur(2px);
  transition: filter 0.3s ease;
}
.map-blurred .leaflet-overlay-pane {
  filter: blur(2px);
  transition: filter 0.3s ease;
} */

.leaflet-interactive {
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup {
  width: 100%;
  display: grid;
  gap: 20px;
  font-size: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  overflow: hidden;
}

.p-top {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 8px;
  align-items: center;
}

.p-head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.p-name {
  flex: 1;
}
.avatar {
  align-self: flex-start;
  width: 60px;
  height: 60px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #e6eaf2;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 56 56"><path fill="currentColor" d="M7.715 49.574h40.57c4.899 0 7.36-2.437 7.36-7.265V13.69c0-4.828-2.461-7.265-7.36-7.265H7.715C2.84 6.426.355 8.84.355 13.69v28.62c0 4.851 2.485 7.265 7.36 7.265m10.218-21c-3.187 0-5.789-2.601-5.789-5.789c0-3.164 2.602-5.789 5.79-5.789c3.164 0 5.765 2.625 5.765 5.79c0 3.187-2.601 5.788-5.766 5.788M7.762 45.801c-2.25 0-3.633-1.36-3.633-3.657v-1.43l7.195-6.28c1.031-.914 2.156-1.383 3.211-1.383c1.125 0 2.32.469 3.352 1.43l4.5 4.03l11.18-9.937c1.171-1.031 2.46-1.5 3.773-1.5c1.289 0 2.625.492 3.75 1.524l10.78 9.984v3.61c0 2.25-1.405 3.609-3.632 3.609Z"/></svg>')
    center / 24px no-repeat;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-name {
  font-weight: 700;
  font-size: 14px;
  color: #181f34;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}
.p-desc {
  color: #181f34;
  font-size: 14px;
  hyphens: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}

.p-link a {
  color: #0c82ff;
  text-decoration: underline;
}

/* Event popup specific styles */
.event-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.event-meta-category {
  display: block;
  line-height: 1.4;
  color: rgba(24, 31, 52, 0.5);
  font-size: 13px;
}

.event-meta-line {
  display: block;
  line-height: 1.4;
  color: #181f34;
  font-size: 14px;
}

.event-meta-line a {
  color: #0c82ff;
  text-decoration: underline;
}

.event-description {
  margin-top: 12px;
  color: #181f34;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.cta {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--blue);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s 0s;
}
.popup-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.mapwrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mapwrap__footer {
  padding: 20px 16px;
  background: #fff;
  display: flex;
  justify-content: flex-end;
}

.flt-btn {
  display: flex;
  align-items: center;
  column-gap: 2px;
  color: #0c82ff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.flt-btn svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.mapwrap__filter-arrow {
  transition: transform 0.3s 0s;
}

.flt-btn._active .mapwrap__filter-arrow {
  transform: rotate(180deg);
}

.flt-badge {
  color: #1976ff;
}

.sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: var(--w);
  background: #fff;
  border-radius: 16px 16px 0 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 800;
  max-height: 75svh;
  overflow: hidden;
  width: 100%;
  max-width: var(--w);
  padding: 24px 16px 24px;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}

.sheet:not(.open) {
  transform: translateX(-50%) translateY(100%);
}

.sheet-handle {
  width: 32px;
  height: 4px;
  background: rgba(24, 31, 52, 0.1);
  border-radius: 999px;
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  cursor: grab;
  transition: background-color 0.2s ease;
}

.sheet-handle:active {
  cursor: grabbing;
  background: rgba(24, 31, 52, 0.2);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title {
  font-weight: 800;
}

.a-link {
  color: #1976ff;
  font-weight: 800;
  cursor: pointer;
}

.danger {
  color: #e60023;
}

.filters {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  flex: 1 1 auto;
  margin: 0px -16px -24px;
  padding: 12px 16px 24px;
  overflow-y: auto;
}

.label {
  color: #181f34;
  font-size: 17px;
}

.label span {
  font-size: 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 12px;
  background: #eef4ff;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  border: 1px solid #dfe8ff;
}

.chip.on {
  background: #eaf2ff;
  color: #1976ff;
  border-color: #cfe0ff;
}

.gender {
  display: flex;
  gap: 8px;
}

.toggle {
  padding: 8px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.toggle.on {
  background: #eaf2ff;
  border-color: #cfe0ff;
  color: #1976ff;
}

.inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inputs input {
  width: 78px;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  font-weight: 700;
}

.hidden {
  display: none;
}

.sheet-foot {
  padding: 12px 14px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e6eaf2;
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  border: 1px solid #d0d5dd;
  background: #fff;
  cursor: pointer;
}

.btn.primary {
  background: #1976ff;
  color: #fff;
  border-color: #1976ff;
}

.footer {
  padding: 16px;
  display: grid;
  gap: 20px;
  border-top: 1px solid var(--border);
}

.bullet {
  font-size: 14px;
  color: #1f2937;
  line-height: 1.5;
}

.btn-primary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 17px;
  transition: background 0.3s 0s;
}

.btn-primary:hover {
  background: #0e6bcf;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid #d0d5dd;
  border-radius: 100px;
  padding: 2px 20px;
  color: #181f34;
  font-size: 17px;
  text-decoration: none;
  background: none;
  min-height: 50px;
}

.btn-secondary > svg {
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
}

.join {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  color: #181f34;
  margin-top: 6px;
}

.join > span {
  display: flex;
  align-items: center;
  column-gap: 4px;
}

.join > span > svg {
  width: 20px;
}

.icons {
  display: flex;
  gap: 18px;
  font-size: 22px;
}

.social {
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
}

.social > svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* NEW MY CODE */

.sheet-top {
  display: flex;
  align-items: center;
  column-gap: 10px;
}
.sheet-top__main {
  display: flex;
  align-items: center;
  column-gap: 4px;
  background: none;
  border: none;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  padding: 0px;
  cursor: pointer;
}
.sheet-top__main svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}
.sheet-top__main svg path[fill] {
  fill: var(--blue);
}
.sheet-top__main svg path[stroke] {
  stroke: var(--blue);
}

.sheet-top__main._clear {
  color: #ff0c0c;
}
.sheet-top__main._clear svg path[fill] {
  fill: #ff0c0c;
}
.sheet-top__main._clear svg path[stroke] {
  stroke: #ff0c0c;
}
.sheet-top__main._reset {
  color: #ff0c0c;
}
.sheet-top__main._reset svg path[fill] {
  fill: #ff0c0c;
}
.sheet-top__main._reset svg path[stroke] {
  stroke: #ff0c0c;
}
.sheet-top__arrow {
  margin-left: auto;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.section-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 12px;
}
.section-head._with-options{
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
}

.section-body {
  margin-top: 12px;
}

.options {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
}
.option {
  display: block;
  cursor: pointer;
}

.option__input {
  display: none;
}

.option__input:checked + .option__text {
  color: #0c82ff;
  background: rgba(12, 130, 255, 0.1);
}

.option__text {
  border-radius: 51px;
  background: #d9d9d9;
  padding: 4px 8px;
  color: #181f34;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#range-age {
  color: #0c82ff;
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  margin-left: auto;
}

#fltCount {
  display: none;
}

/* Services overlay styles */
.services-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  row-gap: 8px;
  text-align: center;
  z-index: 1000;
}

.services-overlay.show {
  display: flex;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 8px;
  text-align: center;
  padding: 40px 20px;
  max-width: 300px;
}

.overlay-icon {
  font-size: 35px;
}
.overlay-title {
  font-size: 17px;
  font-weight: 700;
  color: #181f34;
  margin: 0px;
}
.overlay-text {
  font-size: 14px;
  color: rgba(24, 31, 52, 0.5);
  line-height: 1.4;
  margin: 0px;
  text-align: center;
}

/* External user popup styles */
.popup.external .cta-external {
  padding: 10px 16px 16px;
  display: flex;
  flex-direction: column;
  row-gap: 12px;
  border-radius: 12px;
  border: 1px solid #FFD70E;
}

.popup.external .cta-external-btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px;
  border-radius: 100px;
  background: #FFD70E;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s 0s;
}

.popup.external .cta-external-btn:hover {
  background: #ebc60d;
}

.cta-external-note {
  font-size: 10px;
  color: #8B8F99;
  text-align: center;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}
.cta-external-note a{
  color: inherit;
}
.cta-external-note a:hover{
  text-decoration: none;
}
