.sidebar-right {
  background-color: var(--violet-200);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

#results-list {
  margin-inline: 1rem;
}

.sidebar-right.visible {
  transform: translateX(0);
}

.result-card {
  width: 100%;
  background-color: #f4eefc;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-left: 4px solid #7b2cbf;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #1c0033;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.result-card.ngo-card {
  background-color: #fcd6ee;
  border-left-color: #d8288a;
}

.result-card.gov-card {
  background-color: #e2ccf7;
  border-left-color: var(--violet-200);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  text-wrap-style: balance;
}

.result-title {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
  word-break: break-word;
  margin-top: 4px;
  margin-bottom: 8px;
}

.result-body {
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  display: none;
}

.result-body.expanded {
  display: block;
}

.result-footer {
  margin-top: 6px;
  text-align: right;
}

.toggle-btn {
  background-color: #ab47bc;
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.help-icons {
  margin-top: 14px;
  font-size: 1rem;
}

.distance-info {
  font-size: 0.75rem;
  color: #444;
  margin-bottom: 6px;
}

.type-badge {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 4px;
  background-color: var(--violet-200);
  color: white;
  white-space: nowrap;
  margin-right: 8px;
  margin-bottom: 8px;
}

.type-badge.ngo {
  background-color: #d8288a;
}

.type-badge.public,
.gov-card .type-badge {
  background-color: var(--violet-200);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 10px 0 20px 0;
}

.pagination button.page-num,
.pagination button.page-arrow {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid #7b2cbf;
  border-radius: 6px;
  background-color: var(--teal);
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.pagination button.page-num.active {
  background-color: #7b2cbf;
}

.pagination button:hover {
  background-color: #268077;
}

#results-loader {
  display: none;
  justify-content: center;
  align-items: center;
  height: 60px;
}

#results-loader.visible {
  display: flex;
}

.loader {
  border: 4px solid #f3e5f5;
  border-top: 4px solid #ab47bc;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 0.8s linear infinite;
}

.results-summary {
  background-color: var(--teal);
  color: white;
  padding: 6px 16px 8px;
  margin: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-thumb {
  background-color: #9b59b6;
  border-radius: 6px;
  border: 3px solid #f0f0f0;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #9b59b6 #f0f0f0;
}

.leaflet-popup-content .result-header {
  margin-top: 6px;
  margin-bottom: 10px;
}

.leaflet-popup-content p {
  margin: 4px 0;
}

.leaflet-popup-content .result-icons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.result-content .contact-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 6px;
}

.result-content .help-icons img.help-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 6px;
}

.result-content p {
  margin: 4px 0;
}

.result-card {
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1;
}

@media (height > 900px) {
  .result-card {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 12px;
    .results-summary {
      padding: 8px 16px 10px;
      margin: 12px 16px;
    }
    .result-header {
      margin-bottom: 4px;
    }
  }
}

.main-content:has(#results-list:empty) {
  .toggle-results-btn {
    display: none;
  }
}
