:root {
  --mintyreseller-color-primary: #009fe3;
  --mintyreseller-color-text: #1e293b;
  --mintyreseller-color-muted: #64748b;
  --mintyreseller-color-border: #e2e8f0;
  --mintyreseller-color-bg: #ffffff;
  --mintyreseller-radius: 0.75rem;
  --mintyreseller-spacing-sm: 0.5rem;
  --mintyreseller-spacing-md: 1rem;
  --mintyreseller-spacing-lg: 1.5rem;
  --mintyreseller-list-height: 520px;
  --mintyreseller-breakpoint-md: 768px;
}

.mintyreseller {
  color: var(--mintyreseller-color-text);
}

.mintyreseller__inner {
  display: flex;
  flex-direction: column;
  gap: var(--mintyreseller-spacing-lg);
}

.mintyreseller__header {
  text-align: center;
}

.mintyreseller__description {
  color: var(--mintyreseller-color-muted);
  margin: var(--mintyreseller-spacing-sm) 0 0;
}

.mintyreseller__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mintyreseller-spacing-md);
  align-items: flex-end;
}

.mintyreseller__filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 180px;
}

.mintyreseller__filter label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mintyreseller-color-muted);
}

.mintyreseller__filter select,
.mintyreseller__filter input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--mintyreseller-color-border);
  border-radius: var(--mintyreseller-radius);
  background: var(--mintyreseller-color-bg);
  font-size: 0.875rem;
  color: var(--mintyreseller-color-text);
}

.mintyreseller__filter select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Select2 (filters) — match the theme look */
.mintyreseller__filter .select2-container {
  width: 100% !important;
}

.mintyreseller__filter .select2-container--default .select2-selection--single {
  height: auto;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0.25rem 0.25rem 0.25rem 0.5rem;
  border: 1px solid var(--mintyreseller-color-border);
  border-radius: var(--mintyreseller-radius);
}

.mintyreseller__filter .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--mintyreseller-color-text);
  line-height: 1.5;
  /* Right padding reserves room for the dropdown arrow so the badge never slides under it. */
  padding: 0 1.25rem 0 0;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

/* Active filter shown as a removable pill, with the "×" inside so it reads as one unit. */
.mintyreseller__filter .mintyreseller-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  min-width: 0;
  padding: 0.1rem 0.25rem 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 159, 227, 0.12);
  color: var(--mintyreseller-color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
}

.mintyreseller__filter .mintyreseller-filter-badge__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* The "×" is a circular button inside the pill, on the right. The cross is drawn with two rotated
   pseudo-element bars so it stays perfectly centered whatever the font's "×" glyph metrics are. */
.mintyreseller__filter .mintyreseller-filter-badge__clear {
  position: relative;
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 159, 227, 0.18);
  font-size: 0; /* hide the "×" text glyph; the bars below render the cross */
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mintyreseller__filter .mintyreseller-filter-badge__clear::before,
.mintyreseller__filter .mintyreseller-filter-badge__clear::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.6rem;
  height: 2px;
  border-radius: 1px;
  background: var(--mintyreseller-color-primary);
}

.mintyreseller__filter .mintyreseller-filter-badge__clear::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mintyreseller__filter .mintyreseller-filter-badge__clear::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mintyreseller__filter .mintyreseller-filter-badge__clear:hover,
.mintyreseller__filter .mintyreseller-filter-badge__clear:focus {
  background: var(--mintyreseller-color-primary);
  outline: none;
}

.mintyreseller__filter .mintyreseller-filter-badge__clear:hover::before,
.mintyreseller__filter .mintyreseller-filter-badge__clear:hover::after,
.mintyreseller__filter .mintyreseller-filter-badge__clear:focus::before,
.mintyreseller__filter .mintyreseller-filter-badge__clear:focus::after {
  background: #fff;
}

.mintyreseller__filter .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
}

.mintyreseller__filter .select2-container--default.select2-container--focus .select2-selection--single,
.mintyreseller__filter .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--mintyreseller-color-primary);
  box-shadow: 0 0 0 2px rgba(0, 159, 227, 0.15);
}

/* Dropdown is appended to <body>; these are global Select2 classes (CSS only loaded on this page). */
.select2-dropdown {
  border-color: var(--mintyreseller-color-border);
  border-radius: var(--mintyreseller-radius);
  overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--mintyreseller-color-primary);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--mintyreseller-color-border);
  border-radius: var(--mintyreseller-radius);
  padding: 0.4rem 0.6rem;
}

.mintyreseller__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mintyreseller-spacing-lg);
}

@media (min-width: 768px) {
  .mintyreseller__layout {
    grid-template-columns: 2fr 1fr;
  }
}

.mintyreseller__map {
  width: 100%;
  min-height: 320px;
  border-radius: var(--mintyreseller-radius);
  overflow: hidden;
}

.mintyreseller__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--mintyreseller-spacing-sm);
  max-height: var(--mintyreseller-list-height);
  overflow-y: auto;
}

.mintyreseller__item {
  border: 1px solid var(--mintyreseller-color-border);
  border-radius: var(--mintyreseller-radius);
  padding: var(--mintyreseller-spacing-md);
  background: var(--mintyreseller-color-bg);
  cursor: pointer;
  transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

.mintyreseller__item:hover,
.mintyreseller__item:focus-within {
  border-color: var(--mintyreseller-color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mintyreseller__name {
  font-weight: 600;
  margin: 0 0 var(--mintyreseller-spacing-sm);
}

.mintyreseller__addr {
  color: var(--mintyreseller-color-muted);
  font-size: 0.875rem;
  margin: 0 0 var(--mintyreseller-spacing-sm);
}

.mintyreseller__contact {
  display: flex;
  gap: var(--mintyreseller-spacing-md);
  font-size: 0.875rem;
}

.mintyreseller__distance {
  display: inline-block;
  margin-top: var(--mintyreseller-spacing-sm);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--mintyreseller-color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.mintyreseller__website,
.mintyreseller__phone {
  color: var(--mintyreseller-color-primary);
  text-decoration: none;
}

.mintyreseller__empty {
  text-align: center;
  color: var(--mintyreseller-color-muted);
}

.mintyreseller-popup strong {
  display: block;
  margin-bottom: 0.25rem;
}

.mintyreseller-popup p {
  margin: 0 0 0.25rem;
  color: var(--mintyreseller-color-muted);
  font-size: 0.8125rem;
}

.mintyreseller-popup a {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--mintyreseller-color-primary);
  text-decoration: none;
}
