/* /css/map-found-animals.css — popup znalezionych zwierząt + przełącznik trybu */

/* ============================================================= */
/* PRZEŁĄCZNIK: Zaginione / Znalezione                           */
/* ============================================================= */

.map-mode-switch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  border: 1px solid #e4e4e4;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(6px);
}

.map-mode-btn {
  appearance: none;
  border: 0;
  margin: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease;
  color: #555;
  padding: 0;
}

.map-mode-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.map-mode-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
}

.map-mode-icon svg {
  width: 100%;
  height: 100%;
}

/* Lost = czerwony, lekki */
.map-mode-btn--lost {
  color: #d53a2f;
  background: #fce9e7;
}

.map-mode-btn--lost .map-mode-icon svg {
  fill: currentColor;
}

/* Found = zielony, lekki */
.map-mode-btn--found {
  color: #1e9c5d;
  background: #e8f6ee;
}

.map-mode-btn--found .map-mode-icon svg {
  fill: currentColor;
}

/* Hover stany (delikatne) */
.map-mode-btn--lost:hover {
  background: #f8d8d4;
}

.map-mode-btn--found:hover {
  background: #d6efe3;
}

/* Active = mocniejszy kolor + cień */
.map-mode-btn.active.map-mode-btn--lost {
  background: #e43d30;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 6px 14px rgba(228, 61, 48, 0.45);
}

.map-mode-btn.active.map-mode-btn--found {
  background: #1e9c5d;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 6px 14px rgba(30, 156, 93, 0.45);
}

.map-mode-btn.active:hover {
  transform: translateY(-1px);
}

/* Mobilki – delikatne zmniejszenie */
@media (max-width: 480px) {
  .map-mode-switch {
    top: 10px;
    gap: 4px;
    padding: 3px 5px;
  }

  .map-mode-btn {
    width: 34px;
    height: 34px;
  }
}

/* ============================================================= */
/* POPUP ZNALEZIONE — layout podobny do zaginionych              */
/* ============================================================= */

.found-popup {
  font: 14px/1.45 system-ui, Segoe UI, Roboto, Arial;
  color: #222;
  max-width: 560px;
}

.found-popup .fp-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ececec;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
  min-width: 0;
}

/* Lewa kolumna: zdjęcie + badge + chipy */
.found-popup .fp-left {
  flex: 0 0 48%;
  display: flex;
  flex-direction: column;
  background: #f5faf7;
  border-right: 1px solid #e2f1e6;
}

/* Kontener na zdjęcie */
.found-popup .fp-photo-wrap {
  position: relative;
  overflow: hidden;
  height: 260px;
  padding: 8px 8px 6px;
  background: #f5faf7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.found-popup .fp-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #f0f0f0;
}

/* Placeholder przy braku zdjęcia */
.found-popup .fp-img.fp-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #777;
}

/* Badge "ZNALEZIONO" */
.found-popup .fp-photo-wrap .fp-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
}

/* Chipy meta */
.found-popup .fp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 10px 10px;
  margin: 0;
}

.found-popup .fp-chip {
  display: inline-block;
  border: 1px solid #d8efdf;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f5faf7;
  color: #2f693f;
  font-size: 12px;
}

/* Prawa kolumna */
.found-popup .fp-body {
  flex: 1 1 auto;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

/* Badge */
.found-popup .fp-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff;
  background: #1e9c5d;
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  animation: fp-badge-pulse 2.4s ease-in-out infinite;
}

@keyframes fp-badge-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(30, 156, 93, 0.55);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 7px rgba(30, 156, 93, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(30, 156, 93, 0);
  }
}

/* Tytuł */
.found-popup .fp-title {
  font-weight: 800;
  margin: 0 0 6px;
  font-size: 17px;
  color: #111;
}

/* Opis */
.found-popup .fp-desc {
  margin: 6px 0 10px;
  color: #333;
  white-space: pre-line;
}

/* Lista informacji */
.found-popup .fp-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.found-popup .fp-list li {
  display: flex;
  gap: 8px;
  margin: 4px 0;
}
.found-popup .fp-list .k {
  min-width: 86px;
  color: #666;
  font-size: 12px;
}
.found-popup .fp-list .v {
  color: #222;
  font-size: 13px;
}

/* CTA */
.found-popup .fp-cta {
  margin-top: 10px;
}
.found-popup .fp-cta .btn {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
}

/* Responsywność */
@media (max-width: 480px) {
  .found-popup {
    max-width: 86vw;
  }
  .found-popup .fp-card {
    flex-direction: column;
  }
  .found-popup .fp-left {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid #e2f1e6;
  }
  .found-popup .fp-photo-wrap {
    height: 220px;
  }
  .found-popup .fp-title {
    font-size: 16px;
  }
}

/* ============================================================= */
/* DODATKOWE STYLE: przypomnienie + wyszukiwarka zaginionych     */
/* ============================================================= */

/* Złoty przycisk: Szukaj w zaginionych */
.btn-search-lost {
  background: linear-gradient(135deg, #f7d26a, #f3b944);
  border-color: #f0ae2e;
  color: #5b4100;
  font-weight: 600;
}
.btn-search-lost:hover {
  background: linear-gradient(135deg, #f9dd86, #f4c456);
  border-color: #f0ae2e;
}

/* Modal: przypomnienie przed zgłoszeniem znalezienia */
.modal-found-reminder .modal-dialog {
  max-width: 540px;
}
.modal-found-reminder .modal-body {
  padding-top: 8px;
}
.modal-found-reminder p {
  margin: 8px 0;
}
.modal-found-reminder p.hint {
  font-size: 13px;
  color: #555;
}
.modal-found-reminder .modal-actions {
  margin-top: 16px;
}

/* Modal: wyszukiwarka zaginionych – nowy, kompaktowy layout */
.modal-search-lost .modal-dialog {
  max-width: 780px;
}
.modal-search-lost h3 {
  font-size: 16px;
  margin: 2px 0 6px;
}
.modal-search-lost .modal-body {
  padding: 10px 14px 12px;
}

/* Formularz filtrów */
.sl-form {
  margin: 0;
}

.sl-filters {
  border-radius: 10px;
  border: 1px solid #e4e4e4;
  background: #fafafa;
  padding: 8px 10px 6px;
}

.sl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.sl-row--top {
  align-items: flex-end;
}

.sl-row--bottom {
  margin-top: 6px;
  align-items: center;
  justify-content: space-between;
}

.sl-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sl-col--location {
  flex: 1 1 42%;
}

.sl-col--species,
.sl-col--breed,
.sl-col--sex {
  flex: 0 0 17%;
  min-width: 130px;
}

.sl-col--intro {
  flex: 1 1 auto;
  min-width: 220px;
}

.sl-col--submit {
  flex: 0 0 auto;
}

/* Etykiety */
.sl-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}

.sl-label-main {
  font-size: 12px;
  font-weight: 600;
  color: #444;
}

/* Lokalizacja + adres */
.sl-location-input-wrap {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.sl-location-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.sl-input,
.sl-select {
  font-size: 13px;
  padding: 4px 8px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid #d6d6d6;
  outline: none;
  flex: 1 1 auto;
  min-width: 0;
}

.sl-input:focus,
.sl-select:focus {
  border-color: #5c8dff;
  box-shadow: 0 0 0 1px rgba(92, 141, 255, 0.25);
}

.sl-location-main .sl-input {
  width: 100%;
}

/* Lista podpowiedzi adresu – korzysta z globalnego .addr-suggest */
.sl-addr-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 10;
}

/* Mały przycisk Szukaj obok adresu */
.sl-btn-inline {
  font-size: 12px;
  padding: 0 8px;
  height: 32px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Przycisk pinezki */
.sl-btn-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.sl-btn-pin svg {
  width: 16px;
  height: 16px;
}

/* Status pinezki */
.sl-pin-status {
  font-size: 11px;
  font-weight: 600;
  color: #1e9c5d;
  background: #e8f6ee;
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sl-pin-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1e9c5d;
}

/* Adres pochodzi z pinezki – wyraźne „unavailable” */
.sl-location-input-wrap.sl-location--from-pin .sl-input {
  background: #f1f1f1;
  border-color: #d0d0d0;
  color: #888;
  cursor: default;
}

.sl-location-input-wrap.sl-location--from-pin .sl-input::placeholder {
  color: #aaaaaa;
}

.sl-location-input-wrap.sl-location--from-pin .sl-btn-inline,
.sl-location-input-wrap.sl-location--from-pin .sl-btn-pin {
  opacity: 0.35;
  pointer-events: none;
}

/* Dolny wiersz: opis + przycisk */
.sl-intro {
  margin: 0;
  font-size: 12px;
  color: #555;
}

.sl-submit {
  font-size: 13px;
  padding: 6px 14px;
  height: 32px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Tekst pod wynikami */
.search-lost-summary {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
}

/* Lista wyników */
.search-lost-results {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-lost-item {
  display: flex;
  align-items: stretch;
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid #ececec;
  padding: 6px 10px;
  background: #fff;
  cursor: pointer;
  gap: 10px;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.08s ease;
}

.search-lost-item:hover {
  border-color: #d6e4ff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.search-lost-item:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.search-lost-item .sli-photo {
  flex: 0 0 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-lost-item .sli-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-lost-item .sli-photo.sli-photo--placeholder {
  font-size: 11px;
  color: #777;
}

.search-lost-item .sli-main {
  flex: 1 1 auto;
  min-width: 0;
}

.search-lost-item .sli-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #111;
}

.search-lost-item .sli-meta {
  font-size: 12px;
  color: #555;
}

.search-lost-item .sli-meta span + span::before {
  content: "•";
  margin: 0 4px;
  color: #999;
}

.search-lost-item .sli-extra {
  font-size: 11px;
  color: #777;
  margin-top: 2px;
}

.search-lost-item .sli-badge {
  flex: 0 0 auto;
  align-self: flex-start;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5ff;
  color: #29427a;
  border: 1px solid #e0e7ff;
}

/* Podkreślenie poziomu dopasowania */
.search-lost-item--level-0 .sli-badge {
  background: #e6f7ec;
  color: #1e6c3a;
  border-color: #c4ebd2;
}
.search-lost-item--level-1 .sli-badge {
  background: #fff9e6;
  color: #8a5c00;
  border-color: #f3e0a8;
}
.search-lost-item--level-2 .sli-badge {
  background: #f5f5f5;
  color: #555;
  border-color: #e2e2e2;
}

.search-lost-empty {
  margin-top: 10px;
  font-size: 13px;
  color: #666;
}

/* Mobile – upchnięty, ale nadal czytelny */
@media (max-width: 480px) {
  .modal-search-lost .modal-dialog {
    max-width: 92vw;
  }

  .sl-row {
    gap: 4px 8px;
  }

  .sl-col--location,
  .sl-col--species,
  .sl-col--breed,
  .sl-col--sex {
    flex: 1 1 100%;
    min-width: 0;
  }

  .sl-col--intro,
  .sl-col--submit {
    flex: 1 1 100%;
  }

  .sl-submit {
    width: 100%;
    justify-content: center;
  }

  .search-lost-results {
    max-height: 220px;
  }
}
/* ====== „Szukaj w zaginionych” – stan: lokalizacja z pinezki ====== */

.modal-search-lost .search-lost-location-note {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.3;
  color: #555;
}

.modal-search-lost #searchLostAddress[readonly] {
  background: #f3f3f3;
  border-color: #d0d0d0;
  color: #777;
}

.modal-search-lost .search-lost-location--from-pin .input-with-btn {
  opacity: 0.9;
}
