/**
 * BFM Store Locator Styles
 */
/* Container and Layout */
.bfm-store-locator-container {
  margin: 0 auto;
  color: #333;
}
.bfm-header {
  text-align: center;
  margin-bottom: 30px;
}
.bfm-header h2 {
  color: #000;
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 700;
}
.bfm-header p {
  color: #555;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}
.bfm-store-logo {
  max-height: 48px;
  width: auto;
  vertical-align: middle;
}
/* Search Form */
.bfm-search-container {
  max-width: 600px;
  margin: 0 auto 30px;
}
.bfm-search-form {
  display: flex;
  justify-content: center;
}
.bfm-input-group {
  display: flex;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
#bfm-zipcode {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-right: none;
  padding: 15px 20px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}
#bfm-zipcode:focus {
  border-color: #ffcc00;
}
.bfm-search-btn {
  background-color: #ffcc00;
  border: none;
  color: #000;
  font-weight: 600;
  padding: 15px 25px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 16px;
}
.bfm-search-btn:hover {
  background-color: #e6b800;
}
/* Map and Results */
.bfm-results-container {
  display: flex;
  flex-direction: column;
}
.bfm-map-container {
  width: 100%;
  margin-bottom: 30px;
}
#bfm-map {
  height: 400px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.bfm-locations-list-container {
  width: 100%;
}
.bfm-locations-list-container h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #000;
  border-bottom: 2px solid #ffcc00;
  padding-bottom: 10px;
}
#bfm-locations-list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
  max-height: 580px;
  overflow-y: scroll;
}
/* Store Cards */
.bfm-store-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.bfm-store-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}
/* Featured cards — colors overridden by dynamic inline styles from PHP */
.bfm-store-card.bfm-featured {
  border: 2px solid #ffcc00;
  background-color: #fffdf0;
}
.bfm-store-card.bfm-featured:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.bfm-featured-badge {
  display: inline-block;
  background-color: #ffcc00;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.bfm-store-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #000;
}
.bfm-store-distance {
  display: inline-block;
  background-color: #ffcc00;
  color: #000;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 10px;
}
.bfm-store-address {
  margin-bottom: 8px;
  font-size: 15px;
  color: #555;
}
.bfm-store-phone {
  margin-bottom: 15px;
  font-size: 15px;
  color: #555;
}
.bfm-store-phone a {
  color: #555;
  text-decoration: none;
  transition: color 0.3s;
}
.bfm-store-phone a:hover {
  color: #ffcc00;
}
.bfm-store-actions {
  display: flex;
  gap: 10px;
}
.bfm-btn {
  padding: 8px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition:
    background-color 0.3s,
    color 0.3s;
  text-align: center;
}
.bfm-btn-primary {
  background-color: #ffcc00;
  color: #000;
}
.bfm-btn-primary:hover {
  background-color: #e6b800;
}
.bfm-btn-secondary {
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #e0e0e0;
}
.bfm-btn-secondary:hover {
  background-color: #e6e6e6;
}
/*Map Popup Modal*/
.gm-style-iw-chr {
  position: absolute;
  top: 0;
  right: 0;
}
.gm-style .gm-style-iw-d {
  overflow: visible !important;
  max-height: fit-content !important;
}
.bfm-info-window {
  padding: 1rem 0.25rem 1.6rem;
}
.bfm-info-window h3.h6 {
  color: #333 !important;
  margin-right: 50px;
  max-width: 200px;
}
.bfm-info-window div {
  display: flex !important;
  flex-wrap: wrap;
}
.gm-style-iw.gm-style-iw-c {
  padding: 0 0.6rem !important;
}
.bfm-info-window a {
  line-height: 1.5em;
  color: #333;
}
/* Loading Indicator */
.bfm-loading {
  text-align: center;
  padding: 20px;
}
.bfm-spinner {
  border: 4px solid rgba(255, 204, 0, 0.3);
  border-radius: 50%;
  border-top: 4px solid #ffcc00;
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  animation: bfm-spin 1s linear infinite;
}
@keyframes bfm-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* Sample note shown above the initial random dealer list */
.bfm-sample-note {
  font-size: 0.82em;
  color: #888;
  text-align: center;
  padding: 6px 12px 10px;
  margin: 0 0 4px;
  border-bottom: 1px solid #eee;
}
/* No Results */
.bfm-no-results {
  text-align: center;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-top: 20px;
}
.bfm-no-results h3 {
  color: #555;
  margin-bottom: 10px;
}
.bfm-no-results p {
  color: #777;
}
/* Responsive Design */
@media (min-width: 768px) {
  .bfm-results-container {
    flex-direction: row;
    gap: 30px;
  }
  .bfm-results-container.bfm-layout-list-left {
    flex-direction: row-reverse;
  }
  .bfm-map-container {
    width: 60%;
    margin-bottom: 0;
  }
  .bfm-locations-list-container {
    width: 40%;
  }
  #bfm-map {
    height: 500px;
  }
  #bfm-locations-list {
    grid-template-columns: repeat(1, 1fr);
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
  }
}
@media (min-width: 1024px) {
  #bfm-locations-list {
    max-height: 520px;
  }
  #bfm-map {
    height: 600px;
  }
}
@media (max-width: 767px) {
  .bfm-input-group {
    flex-direction: column;
  }
  #bfm-zipcode {
    border-right: 2px solid #e0e0e0;
    border-bottom: none;
  }
  #bfm-locations-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
  }
}
/* ── Layout: map-top ───────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .bfm-results-container.bfm-layout-map-top {
    flex-direction: column;
  }
  .bfm-results-container.bfm-layout-map-top .bfm-map-container {
    width: 100%;
  }
  .bfm-results-container.bfm-layout-map-top .bfm-locations-list-container {
    width: 100%;
    margin-top: 30px;
  }
  .bfm-results-container.bfm-layout-map-top #bfm-locations-list {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}
@media (min-width: 1024px) {
  .bfm-results-container.bfm-layout-map-top #bfm-locations-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .bfm-results-container.bfm-layout-map-top #bfm-map {
    height: 500px;
  }
}
@media (min-width: 1280px) {
  .bfm-results-container.bfm-layout-map-top #bfm-locations-list {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* ── Layout: map-only ──────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .bfm-results-container.bfm-layout-map-only .bfm-map-container {
    width: 100%;
  }
  .bfm-results-container.bfm-layout-map-only #bfm-map {
    height: 550px;
  }
}
@media (min-width: 1024px) {
  .bfm-results-container.bfm-layout-map-only #bfm-map {
    height: 650px;
  }
}
/* ── Layout: list-only ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .bfm-results-container.bfm-layout-list-only .bfm-locations-list-container {
    width: 100%;
  }
  .bfm-results-container.bfm-layout-list-only #bfm-locations-list {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}
@media (min-width: 1024px) {
  .bfm-results-container.bfm-layout-list-only #bfm-locations-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1280px) {
  .bfm-results-container.bfm-layout-list-only #bfm-locations-list {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* ── Style: hero ───────────────────────────────────────────────────────────── */
.bfm-theme-hero .bfm-hero-banner {
  background-color: var(--bfm-primary, #ffcc00);
  padding: 60px 20px 50px;
  margin-bottom: 30px;
  text-align: center;
}
.bfm-theme-hero .bfm-hero-banner .bfm-header {
  margin-bottom: 24px;
}
.bfm-theme-hero .bfm-hero-banner .bfm-header h2 {
  color: var(--bfm-primary-text, #000);
}
.bfm-theme-hero .bfm-hero-banner .bfm-header p {
  color: var(--bfm-primary-text, #000);
  opacity: 0.8;
}
.bfm-theme-hero .bfm-hero-banner .bfm-search-container {
  margin-bottom: 0;
}
.bfm-theme-hero .bfm-hero-banner #bfm-zipcode {
  border-color: rgba(0, 0, 0, 0.2);
}
/* ── Style: minimal ────────────────────────────────────────────────────────── */
.bfm-theme-minimal .bfm-header {
  margin-bottom: 16px;
}
.bfm-theme-minimal .bfm-header h2 {
  font-size: 22px;
  font-weight: 600;
}
.bfm-theme-minimal .bfm-store-card {
  box-shadow: none;
  border-radius: 4px;
}
.bfm-theme-minimal .bfm-store-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
