/* Rider: Places to explore */

body.explore-page.page-shell.page-shell--narrow,
body.explore-page.ddg-page.page-shell--narrow {
  max-width: 36rem;
  padding-bottom: calc(var(--space-6) + var(--safe-bottom));
}

.explore-toolbar,
.explore-filters {
  width: 100%;
}

.explore-header {
  margin-bottom: var(--space-3);
}

.explore-header__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ddg-page-heading, var(--ddg-sage-dark));
  line-height: 1.2;
}

.explore-header__lead {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--ddg-text-muted);
}

.explore-header__cta {
  margin: var(--space-3) 0 0;
}

.explore-header__book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 18rem;
  text-decoration: none;
}

.explore-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--ddg-border);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ddg-text-muted);
  text-align: center;
}

.explore-footer a {
  font-weight: 600;
  color: var(--ddg-text);
}

.explore-toolbar {
  margin: 0 0 var(--space-3);
  padding: var(--space-2) 0 var(--space-3);
  background: var(--ddg-page-bg, var(--ddg-surface));
  border-bottom: 1px solid var(--ddg-border);
}

.explore-search {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-2);
}

.explore-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.explore-search__wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem var(--space-3);
  background: var(--ddg-surface-warm, var(--ddg-surface-elevated, #fff));
  border: 1px solid var(--ddg-border);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.explore-search__wrap:focus-within {
  background: var(--ddg-surface-elevated, #fff);
  border-color: var(--ddg-sage, #5c6b5a);
  box-shadow: none;
}

.explore-search__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  font-size: 0.875rem;
  line-height: 1;
  color: var(--ddg-text-muted);
  opacity: 0.65;
  pointer-events: none;
}

/* Override body.ddg-page input (padding, margin, border, focus ring) */
body.ddg-page .explore-search__wrap .explore-search__input,
.explore-search__wrap .explore-search__input {
  flex: 1;
  align-self: center;
  min-width: 0;
  width: auto;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  padding-block: 0;
  margin-block: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5rem;
  color: var(--ddg-text);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
}

.explore-search__wrap .explore-search__input::placeholder {
  color: var(--ddg-text-muted);
  opacity: 0.75;
}

body.ddg-page .explore-search__wrap .explore-search__input:focus,
.explore-search__wrap .explore-search__input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.explore-search__input::-webkit-search-decoration,
.explore-search__input::-webkit-search-cancel-button,
.explore-search__input::-webkit-search-results-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.explore-search__clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--ddg-text-muted);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.85;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.explore-search__clear[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.explore-search__clear:hover,
.explore-search__clear:focus-visible {
  color: var(--ddg-text);
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.explore-status {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--ddg-text-muted);
}

.explore-status--error {
  color: var(--ddg-danger, #b91c1c);
}

.explore-filters {
  margin: 0 0 var(--space-3);
}

.explore-filters__label {
  margin: 0 0 0.35rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ddg-text-muted);
}

.explore-filters__label:not(:first-child) {
  margin-top: var(--space-2);
}

.explore-chips-wrap {
  margin: 0 0 0;
}

.explore-sorts-wrap {
  margin: 0;
}

.explore-sorts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

@media (max-width: 520px) {
  .explore-sorts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .explore-sorts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.explore-sort {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2rem;
  padding: 0.35rem 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ddg-text-muted);
  background: var(--ddg-surface-elevated, #fff);
  border: 1px solid var(--ddg-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.explore-sort i {
  font-size: 0.65rem;
  opacity: 0.85;
}

.explore-sort[aria-selected='true'] {
  color: var(--ddg-text);
  background: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.18);
  border-color: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.5);
}

.explore-sort:hover,
.explore-sort:focus-visible {
  outline: none;
  border-color: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.45);
}

.explore-chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
}

@media (max-width: 520px) {
  .explore-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .explore-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.explore-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.2rem;
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ddg-text-muted);
  background: var(--ddg-surface-elevated, #fff);
  border: 1px solid var(--ddg-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  white-space: normal;
  -webkit-tap-highlight-color: transparent;
}

.explore-chip__label {
  display: block;
  max-width: 100%;
}

.explore-chip__count {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.75;
}

.explore-chip i {
  font-size: 0.7rem;
  opacity: 0.85;
}

.explore-chip[aria-selected='true'] {
  color: var(--ddg-text);
  background: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.18);
  border-color: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.5);
}

.explore-chip:hover,
.explore-chip:focus-visible {
  outline: none;
  border-color: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.45);
}

.explore-count {
  margin: var(--space-3) 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ddg-text-muted);
}

.explore-count:empty {
  display: none;
}

.explore-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  scroll-margin-top: var(--space-4);
}

.explore-place {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  margin: 0;
  padding: var(--space-2);
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: var(--uber-surface, var(--ddg-surface-elevated));
  border: 1px solid var(--ddg-page-card-border, var(--ddg-border));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.explore-place:hover,
.explore-place:focus-visible {
  border-color: rgba(var(--ddg-yellow-rgb, 245, 197, 24), 0.45);
  outline: none;
}

.explore-place__thumb-wrap {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}

.explore-place__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-place__thumb-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ddg-text-muted);
  font-size: 1rem;
}

.explore-place__body {
  flex: 1;
  min-width: 0;
}

.explore-place__name {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-place__meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--ddg-text-muted);
}

.explore-place__snippet {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.625rem;
  line-height: 1.3;
  color: var(--ddg-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-place__chev {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--ddg-text-muted);
}

.explore-empty {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ddg-text-muted);
  background: var(--ddg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px dashed var(--ddg-border);
}
