/* Product retailers frontend — shared across list, grid, modal, and map-card layouts. */

.flexa-retailers-ui.rmfw-product-retailers-frontend.rmfw-spacing-top {
  margin: 0.75rem 0px;
  font-size: 0.875rem;
  color: var(--foreground, #111827);
}

/* Section header: title + "Use location" */

.rmfw-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.rmfw-section-header-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.rmfw-section-header-main.rmfw-section-header--no-icon {
  gap: 0;
}

.rmfw-section-header-icon {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rmfw-section-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rmfw-section-title {
  font-weight: 600;
  color: var(--foreground, #111827);
  font-size: 0.95rem;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rmfw-section-subtitle {
  font-size: 0.8rem;
  color: var(--muted-foreground, #6b7280);
  padding-bottom: 0;
  margin-bottom: 0;
}

.rmfw-section-header__location {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  padding-right: 20px;
}

.rmfw-section-header__location-hint {
  margin: 0;
  max-width: 14rem;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted-foreground, #6b7280);
  text-align: right;
}

.rmfw-section-header__location-hint[hidden] {
  display: none !important;
}

/* Distance badge — filled by product-location.js after "Use location". */
.rmfw-retailer-distance {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted-foreground, #6b7280);
  background: var(--muted, #f3f4f6);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  white-space: nowrap;
}

.rmfw-retailer-distance[hidden] {
  display: none !important;
}

.rmfw-section-header__location-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  box-sizing: border-box;
  border-radius: 0.75rem;
  padding: 0.5rem 0.875rem;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.rmfw-section-header__location-btn:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: scale(1.02);
}

.rmfw-section-header__location-btn .rmfw-icon {
  flex-shrink: 0;
}

/* Icon sizes */

.rmfw-icon {
  display: inline-block;
}

.rmfw-icon--sm {
  width: 0.75rem;
  height: 0.75rem;
}

.rmfw-icon--md {
  width: 1.1rem;
  height: 1.1rem;
}

.rmfw-icon--lg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Retailer name link (list rows, grid cards, map-card list) */

.rmfw-name-link {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  transition: color 0.15s ease;
}

.rmfw-name-link:hover,
.rmfw-name-link:focus-visible {
  color: var(--primary, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rmfw-name-link:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 2px;
  border-radius: 2px;
}

/* "Get Directions" base — layout modifiers: .rmfw-direction-btn--list / --grid */

.rmfw-direction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--muted-foreground, #9ca3af);
  background: transparent;
  color: var(--foreground, #111827);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.rmfw-direction-btn:hover,
.rmfw-direction-btn:focus-visible {
  background: rgba(17, 24, 39, 0.05);
  border-color: var(--foreground, #111827);
  transform: scale(1.02);
  text-decoration: none;
}

.rmfw-direction-btn:focus-visible {
  outline: 2px solid var(--foreground, #111827);
  outline-offset: 2px;
}

.rmfw-direction-btn svg {
  flex-shrink: 0;
}

@media (max-width: 464px) {
  .rmfw-section-header {
    display: block;
  }

  .rmfw-section-header__location {
    align-items: unset;
    margin-top: 12px;
  }
  .rmfw-section-header__location-btn {
    padding: 12px;
  }

  .rmfw-section-header__location-hint {
    text-align: center;
    max-width: 100%;
    margin-top: 4px;
  }
}

/* Opening hours badge (product retailer cards — list / grid) */

.rmfw-opening-hours {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 100%;
}

.rmfw-opening-hours__label {
  white-space: nowrap;
}

.rmfw-opening-hours__detail {
  font-weight: 400;
  opacity: 0.9;
}

.rmfw-opening-hours--open {
  background: color-mix(in srgb, #16a34a 18%, transparent);
  color: #15803d;
}

.rmfw-opening-hours--soon {
  background: color-mix(in srgb, #eab308 26%, transparent);
  color: #a16207;
}

.rmfw-opening-hours--closed {
  background: color-mix(in srgb, #dc2626 16%, transparent);
  color: #b91c1c;
}

.rmfw-retailer-main-header-info .rmfw-opening-hours,
.rmfw-grid-main-header-info .rmfw-opening-hours {
  flex-shrink: 1;
  min-width: 0;
}

/* Retailer contact rows (phone / email) — shared across all layouts. */
.rmfw-retailer-contact-list {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.rmfw-retailer-contact-list--grid {
  margin-top: 0.5rem;
}

.rmfw-retailer-contact {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  color: var(--muted-foreground, #6b7280);
  font-size: 14px;
  line-height: 1.45;
}

.rmfw-retailer-contact > svg {
  flex-shrink: 0;
  color: inherit;
}

.rmfw-retailer-contact__link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.rmfw-retailer-contact__link:hover,
.rmfw-retailer-contact__link:focus-visible {
  color: inherit;
  text-decoration: underline;
}
