/* Site-wide styles for the dealer location dropdown */
#aldmg-dealer-location-container {
  z-index: 900;
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #dcddde;
  margin-top: 3px; /* move down by 3px */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  max-width: 420px;
  min-width: 320px;
}

/* utility to hide the container until toggled */
#aldmg-dealer-location-container.aldmg-hidden {
  display: none;
}

/* simple layout helpers for the panel rows */
#aldmg-dealer-dropdown .aldmg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

#aldmg-dealer-dropdown .aldmg-icon {
  color: #004781;
  line-height: 1;
  padding-top: 2px;
  flex-shrink: 0;
}

#aldmg-dealer-dropdown .aldmg-col {
  flex: 1;
  min-width: 0;
}

#aldmg-dealer-dropdown .aldmg-name {
  font-weight: 600;
  color: #1e2a3a;
  font-size: 16px;
  margin-bottom: 4px;
}

#aldmg-dealer-dropdown .aldmg-address {
  color: #454c63;
  font-size: 14px;
  line-height: 1.5;
}

#aldmg-dealer-dropdown .aldmg-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

#aldmg-dealer-dropdown .aldmg-links a {
  color: #0e76bc;
  text-decoration: none;
  font-size: 14px;
}

#aldmg-dealer-dropdown .aldmg-links a:hover {
  text-decoration: underline;
}

#aldmg-dealer-dropdown .aldmg-divider {
  height: 1px;
  background: #dcddde;
  margin: 12px 0;
}

/* Phone link */
#aldmg-current-location-phone {
  color: #0e76bc;
  text-decoration: none;
  font-size: 14px;
}

#aldmg-current-location-phone:hover {
  text-decoration: underline;
}

/* Hours status */
#aldmg-current-location-hours {
  font-size: 14px;
  color: #454c63;
}

#aldmg-current-location-hours.aldmg-is-open {
  color: #059669; /* green for open */
  font-weight: 500;
}

#aldmg-current-location-hours.aldmg-is-closed {
  color: #dc2626; /* red for closed */
  font-weight: 500;
}

/* ============================================
   Button System
   Shared button styles for consistency
   ============================================ */

/* Base button styles - shared across all variants */
.aldmg-button,
a.aldmg-button,
.aldmg-button-primary,
a.aldmg-button-primary,
.aldmg-button-secondary,
a.aldmg-button-secondary {
  display: inline-block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 200ms ease;
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.4;
}

/* Primary button - filled style */
.aldmg-button-primary,
a.aldmg-button-primary {
  background: #0e76bc;
  color: #ffffff !important;
  border-color: #0e76bc;
}

.aldmg-button-primary:hover,
a.aldmg-button-primary:hover {
  background: #0b5a8f;
  border-color: #0b5a8f;
  text-decoration: none;
  color: #ffffff !important;
}

.aldmg-button-primary:active,
a.aldmg-button-primary:active {
  background: #094770;
  border-color: #094770;
}

.aldmg-button-primary:focus,
a.aldmg-button-primary:focus {
  outline: 2px solid #0e76bc;
  outline-offset: 2px;
}

/* Secondary button - outlined style */
.aldmg-button-secondary,
a.aldmg-button-secondary {
  background: transparent;
  color: #0e76bc !important;
  border-color: #0e76bc;
}

.aldmg-button-secondary:hover,
a.aldmg-button-secondary:hover {
  background: #f0f7fc;
  border-color: #0b5a8f;
  color: #0b5a8f !important;
  text-decoration: none;
}

.aldmg-button-secondary:active,
a.aldmg-button-secondary:active {
  background: #e0f2fe;
  border-color: #094770;
  color: #094770 !important;
}

.aldmg-button-secondary:focus,
a.aldmg-button-secondary:focus {
  outline: 2px solid #0e76bc;
  outline-offset: 2px;
}

/* Spacing helpers for stacked buttons */
.aldmg-button-primary + .aldmg-button-primary,
.aldmg-button-primary + .aldmg-button-secondary,
.aldmg-button-secondary + .aldmg-button-primary,
.aldmg-button-secondary + .aldmg-button-secondary,
a.aldmg-button-primary + a.aldmg-button-primary,
a.aldmg-button-primary + a.aldmg-button-secondary,
a.aldmg-button-secondary + a.aldmg-button-primary,
a.aldmg-button-secondary + a.aldmg-button-secondary,
a.aldmg-button-primary + .aldmg-button-secondary,
.aldmg-button-primary + a.aldmg-button-secondary,
a.aldmg-button-secondary + .aldmg-button-primary,
.aldmg-button-secondary + a.aldmg-button-primary {
  margin-top: 8px;
}

/* Dealer selection list */
.aldmg-dealer-list-section {
  margin-top: 8px;
}

.aldmg-dealer-list-header {
  font-size: 13px;
  font-weight: 600;
  color: #454c63;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aldmg-dealer-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #dcddde;
  border-radius: 6px;
  background: #f9fafb;
}

.aldmg-dealer-list-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
  text-align: left;
  text-decoration: none;
  transition: background-color 150ms ease;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.aldmg-dealer-list-item:last-child {
  border-bottom: none;
}

.aldmg-dealer-list-item:hover {
  background-color: #f3f4f6;
}

.aldmg-dealer-list-item.aldmg-current {
  background-color: #e0f2fe;
  border-left: 3px solid #0e76bc;
  padding-left: 11px;
}

.aldmg-dealer-list-item.aldmg-current:hover {
  background-color: #dbeafe;
}

.aldmg-dealer-item-name {
  font-weight: 600;
  color: #1e2a3a;
  font-size: 14px;
  margin-bottom: 2px;
}

.aldmg-dealer-item-location {
  font-size: 13px;
  color: #6b7280;
}

/* Toast confirmation for location change */
.aldmg-location-toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483647; /* above all */
  background: #0f766e; /* teal */
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.aldmg-location-toast.show {
  opacity: 1;
}

/* Brief highlight on header city link to draw attention */
.aldmg-location-highlight {
  background-color: #fff3bf !important; /* soft yellow */
  transition: background-color 300ms ease;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Responsive adjustments */
@media only screen and (max-width: 480px) {
  #aldmg-dealer-location-container {
    max-width: calc(100vw - 24px);
    min-width: 280px;
    padding: 16px;
  }

  #aldmg-dealer-dropdown .aldmg-links {
    flex-direction: column;
    gap: 8px;
  }

  #aldmg-dealer-dropdown .aldmg-name {
    font-size: 15px;
  }

  #aldmg-dealer-dropdown .aldmg-address {
    font-size: 13px;
  }
}
