/**
 * BFM Store Locator Styles
 */

/* Container and Layout */
.bfm-store-locator-container {
  margin: 0 auto;
}
.bfm-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.bfm-header h2 {
  color: #000;
  margin-bottom: 0.75rem;
}
.bfm-header p {
  color: #555;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}
.bfm-header-logo {
  display: inline-block;
  max-height: 55px;
  width: auto;
  vertical-align: middle;
  margin: 0 6px;
}

/* 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;
}

/* 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 */
.bfm-store-card.bfm-featured {
  border: 2px solid #ffcc00;
  background-color: #fffdf0;
}
.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 Info Window */
.gm-style-iw-chr {
  position: absolute;
  top: 0;
  right: 0;
}
.gm-style-iw.gm-style-iw-c {
  padding: 0 0.6rem !important;
}
.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;
}
.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);
  }
}

/* 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-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-zipcode {
    border-right: 2px solid #e0e0e0;
    border-bottom: none;
  }
  #bfm-locations-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
  }
  .bfm-results-container {
    flex-direction: column-reverse;
  }
  .bfm-header-logo {
    display: block;
    text-align: center;
    margin: 1rem auto;
  }
}
