/**
 * [search-near-me] category grid. Enqueued by the shortcode only.
 */

.snm-root {
  padding: 0.5rem;
}

.snm-search-input {
  width: 100%;
  box-sizing: border-box;
  height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 99px;
  font-size: 1rem;
  outline: none !important;
  margin-bottom: 1rem;
}

.snm-search-input:focus {
  border-color: var(--primary);
}

.snm-heading-group {
  margin-bottom: 1.5rem;
}

.snm-heading-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.snm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.snm-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  min-width: 0;
  gap: 0.5rem;
  text-decoration: none !important;
  color: inherit;
  background: #ffffff;
  border: 0.5px solid #ececec;
  border-radius: 1rem;
  padding: 0.75rem 0.25rem 0.6rem;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.snm-cat-card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.snm-cat-card:active,
.snm-cat-card.snm-loading {
  transform: scale(0.96);
  box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0.1);
}

.snm-cat-card img {
  width: 100%;
  max-width: 4rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  flex-shrink: 0;
}

.snm-cat-card span {
  font-size: 0.72rem;
  overflow-wrap: anywhere;
  font-weight: 500;
  line-height: 1.2;
  color: #222;
}

.snm-search-results[hidden] {
  display: none;
}

.snm-no-results {
  grid-column: 1 / -1;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem 0;
}
