/* Marker Filter Styles */
.rd-marker-filter {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  width: 280px;
}

.rd-marker-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  user-select: none;
}

.rd-marker-filter-title {
  font-weight: bold;
  font-size: 14px;
}

.rd-marker-filter-toggle {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  position: relative;
  cursor: pointer;
}

.rd-marker-filter-toggle span {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  transition: transform 0.3s;
}

.rd-marker-filter-collapsed .rd-marker-filter-toggle span {
  transform: rotate(-135deg);
}

.rd-marker-filter-content {
  padding: 12px 15px;
  max-height: 250px; /* Allow more height but cap it */
  overflow-y: auto; /* Enable scrolling when content overflows */
  overflow-x: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  box-sizing: border-box;
}

.rd-marker-filter-collapsed .rd-marker-filter-content {
  max-height: 0;
  padding: 0 15px;
  overflow: hidden;
}

.rd-marker-filter-section {
  margin-bottom: 15px;
}

.rd-marker-filter-section:last-child {
  margin-bottom: 0;
}

.rd-marker-filter-section-title {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 8px;
  color: #555;
}

/* Filter options container - compact grid layout */
.rd-marker-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Filter option styles - compact badges */
.rd-switcher-option {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 12px;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
}

.rd-switcher-option:hover {
  background-color: #e8e8e8;
}

.rd-switcher-active {
  background-color: #d0e8ff !important;
  border-color: #3b82f6 !important;
  font-weight: 600;
}

/* Smaller icons in compact mode */
.rd-switcher-option .rd-marker-icon {
  width: 12px;
  height: 12px;
  margin-right: 4px;
}

/* Use consistent grey background for all active filters */
.rd-switcher-active.rd-marker-primary,
.rd-switcher-active.rd-marker-secondary,
.rd-switcher-active.rd-content-post,
.rd-switcher-active.rd-content-status_update,
.rd-switcher-active.rd-content-product {
  background-color: #f0f0f0 !important;
}

/* Remove colored backgrounds from marker type options */
.rd-marker-primary,
.rd-marker-secondary {
  background-color: transparent !important;
}

/* Fix mobile styling */
@media (max-width: 768px) {
  .rd-marker-filter {
    width: 250px;
  }

  .rd-marker-filter-toggle {
    background: transparent !important;
  }
}

.rd-marker-filter-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.rd-marker-filter-toggle {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.rd-marker-filter-collapsed .rd-marker-filter-toggle span {
  transform: rotate(-135deg);
}

.rd-marker-filter-section {
  margin-bottom: 15px;
}

.rd-marker-filter-section:last-child {
  margin-bottom: 0;
}

.rd-marker-filter-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.rd-marker-filter-option {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.rd-marker-filter-option:last-child {
  margin-bottom: 0;
}

.rd-marker-filter-option input {
  margin-right: 8px;
}

.rd-marker-filter-option label {
  font-size: 13px;
  cursor: pointer;
}

/* Responsive styles */
@media (min-width: 768px) {
  /* For wider screens, we could make the image side-by-side with content */
  .rd-popup-image img {
    max-height: 200px;
  }
}

@media (max-width: 767px) {
  .rd-popup-title h3 {
    font-size: 16px;
  }

  .rd-popup-excerpt {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  /* Keep footer elements in one line */
  .rd-popup-footer {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .rd-popup-type {
    max-width: 25%;
    font-size: 11px;
  }

  .rd-popup-more {
    margin: 0 2px;
  }
}
