/**
 * Agile Store Locator - Grouped Stores Styles
 * Version: 3.0.0
 */

/* ==========================================
   FORCE ONE COLUMN LAYOUT
   ========================================== */

#p-statelist,
.sl-list.panel-inner {
  display: block !important;
}

#p-statelist > .sl-item,
.sl-list.panel-inner > .sl-item {
  flex: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom:1em !important;
  break-inside: avoid;
}

/* Hide original items that have been grouped */
.asl-hidden-original {
  display: none !important;
}

/* ==========================================
   GROUP WRAPPER
   ========================================== */

.asl-group-wrapper {
  list-style: none;
}

.asl-group-wrapper .sl-items-inner {
  padding-bottom: 0 !important;
}

.asl-group-wrapper .sl-addr-sec {
  padding-bottom:0 !important;
}

.asl-group-wrapper > .sl-items-inner {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.asl-group-wrapper .map-icon {
  margin-right:0.25em !important;
}

@media (max-width: 800px) {
  #asl-storelocator.asl-cont.asl-template-4 .asl-wrapper .sl-main-cont .asl_locator-panel .asl-panel .asl-panel-inner .sl-list-wrapper .sl-list .sl-item.asl-group-wrapper .sl-addr-sec {
    padding-bottom:0 !important;
  }
}

/* ==========================================
   GROUP HEADER (Title + Image shown once)
   ========================================== */

.asl-group-header {
  margin-bottom:0 !important;
}

.asl-group-header .sl-logo-box {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  overflow: hidden;
  margin-bottom:0 !important;
}

.asl-group-header .sl-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asl-group-header .sl-title-bar {
  flex: 1;
  min-width: 0;
}

.asl-group-header .sl-items-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.asl-group-header .sl-short-decp {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #666;
  line-height: 1.4;
}

.asl-location-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #555;
  background: #e9ecef;
  border-radius: 4px;
  margin-top:0.5em;
}

/* ==========================================
   LOCATIONS LIST
   ========================================== */

.asl-locations-list {
  padding: 0;
  clear:both;
}

/* ==========================================
   INDIVIDUAL LOCATION ENTRY
   ========================================== */

.asl-location-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.asl-location-entry:last-child {
  border-bottom: none;
}

.asl-location-entry:hover {
  background-color: #f5f7fa;
}

.asl-location-entry:focus {
  outline: none;
  background-color: #e8f0fe;
}

.asl-location-entry.asl-highlighted {
  background-color: #e8f4fd;
  border-left: 3px solid #003b59;
  padding-left: calc(1.25rem - 3px);
}

/* Location number badge */
.asl-loc-number {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sl-action-btn-color, #ffffff);
  background: var(--sl-action-btn-bg, #002e5f);
  border: 2px solid var(--sl-action-btn-bg, #002e5f);
  border-radius: 50%;
  margin-top: 2px;
}

/* Content wrapper */
.asl-loc-content {
  flex: 1;
  min-width: 0;
}

.asl-loc-content .asl-addr {
  margin-bottom: 0.5rem;
}

.asl-loc-content .asl-addr span {
  font-size: 0.85rem;
  font-weight: 400;
  color: #333;
}

/* Info list */
.asl-loc-content .asl-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.asl-loc-content .asl-info-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #666;
}

.asl-loc-content .asl-info-list li i {
  color: #999;
  font-size: 0.875rem;
}

.asl-loc-content .asl-info-list li a {
  color: #666;
  text-decoration: none;
}

.asl-loc-content .asl-info-list li a:hover {
  color: #0075b2;
}

/* Categories */
.asl-loc-content .sl-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0 0;
  padding: 0;
  list-style: none;
}

.asl-loc-content .sl-cats-title img {
  height: 20px;
  width: auto;
}

/* ==========================================
   ACTION BUTTONS
   ========================================== */

.asl-loc-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.asl-loc-actions .asl-dir-btn,
.asl-loc-actions .asl-web-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: var(--sl-action-btn-color, #ffffff) !important;
  background-color: var(--sl-action-btn-bg, #002e5f) !important;
  border: 2px solid var(--sl-action-btn-bg, #002e5f) !important;
  border-radius: 0.25rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: 0.5s;
  white-space: nowrap;
  text-align:center;
}

a.btn-asl {
  width:140px !important;
  max-width:140px !important;
  padding: 8px 10px !important;
}

.asl-loc-actions .asl-dir-btn:hover,
.asl-loc-actions .asl-web-btn:hover {
  background-color: transparent !important;
  color: var(--sl-action-btn-bg, #002e5f) !important;
}

/* ==========================================
   SINGLE (NON-GROUPED) ITEMS
   ========================================== */

#p-statelist > .sl-item:not(.asl-group-wrapper):not(.asl-hidden-original) > .sl-items-inner {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

#p-statelist > .sl-item:not(.asl-group-wrapper):not(.asl-hidden-original):hover > .sl-items-inner {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#p-statelist > .sl-item:not(.asl-group-wrapper):not(.asl-hidden-original).highlighted > .sl-items-inner {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1000px) {
  .asl-group-header {
    flex-direction: column;
    align-items: center;
  }

 .asl-group-wrapper .asl-locations-list {
   padding-top:1em;
 }

  .asl-group-header .sl-logo-box {
    width: 80px;
    height: 80px;
  }

  .asl-location-entry {
    flex-wrap: wrap;
  }

  .asl-loc-actions {
    width: 100%;
  }

  .asl-dir-btn {
    flex: 1;
  }

  .asl-loc-content .asl-info-list {
    flex-direction: column;
    gap: 0.35rem;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  .asl-loc-actions {
    display: none;
  }

  .asl-group-wrapper > .sl-items-inner,
  #p-statelist > .sl-item:not(.asl-group-wrapper) > .sl-items-inner {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
