/* ===== POPUP OVERLAY & BOX ===== */
.bg-alu-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.15s ease;
}

.bg-alu-popup.active {
  display: flex;
}

.bg-alu-popup-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Loading State */
.bg-alu-popup.loading .bg-alu-popup-box {
  pointer-events: none;
}

/* Removed animations to prevent lag */
.bg-alu-popup.loading .bg-alu-popup-title {
  color: transparent;
  background: #e0e0e0;
  border-radius: 4px;
}

.bg-alu-popup.loading .bg-alu-popup-image {
  background: #e8e8e8;
}

/* ===== POPUP CONTAINER (WRAPPER) ===== */
.bg-alu-popup-container {
  position: relative;
  width: 100%;
  max-width: 1020px;
  animation: popupSlide 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10000;
  display: flex;
  margin: auto;
}

/* ===== POPUP BOX ===== */
.bg-alu-popup-box {
  background: #fff;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: minmax(0, 65%) minmax(0, 35%);
  gap: 0;
  max-height: 90vh;
  overflow-y: auto;
}

/* ===== POPUP SCROLLBAR (Scoped) ===== */
/* Firefox */
.bg-alu-popup-box {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent; /* thumb, track */
}

/* WebKit (Chrome, Edge, Safari) */
.bg-alu-popup-box::-webkit-scrollbar {
  width: 8px;
}

.bg-alu-popup-box::-webkit-scrollbar-track {
  background: transparent;
}

.bg-alu-popup-box::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  border-radius: 12px;
  border: 2px solid transparent;
  background-clip: padding-box; /* creates inset border look */
}

.bg-alu-popup-box::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

@media (max-width: 767px) {
  .bg-alu-popup-box::-webkit-scrollbar {
    width: 6px;
  }
  .bg-alu-popup-box {
    scrollbar-width: thin; /* ensure thin on Firefox mobile */
  }
}

.bg-alu-popup-wrap {
  position: relative;
  max-width: 980px;
  width: 92%;
  background: #fff;
  margin: 5vh auto;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 6fr 4fr;
  overflow: hidden;
}

@keyframes popupSlide {
  from { 
    transform: scale(0.9);
    opacity: 0;
  }
  to { 
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   CLOSE BUTTON - Äáº¦Y Äá»¦ CSS DESKTOP & MOBILE (CHá»NG XUNG Äá»˜T)
   ============================================ */

/* Reset button default styles from Theme */
#bgAluPopup button.bg-alu-popup-close,
#bgAluPopup button.alu-popup-close {
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  line-height: 0 !important;
  background-color: transparent !important;
  text-indent: 0 !important;
}

/* DESKTOP - 1020px+ */
@media (min-width: 1024px) {
  #bgAluPopup button.bg-alu-popup-close, 
  #bgAluPopup button.alu-popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: #fff !important;
  }

  #bgAluPopup button.bg-alu-popup-close:hover, 
  #bgAluPopup button.alu-popup-close:hover {
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.2);
  }

  #bgAluPopup button.bg-alu-popup-close:active, 
  #bgAluPopup button.alu-popup-close:active {
    transform: scale(0.95) rotate(90deg);
  }

  #bgAluPopup button.bg-alu-popup-close svg, 
  #bgAluPopup button.alu-popup-close svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2.5;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
  }

  #bgAluPopup button.bg-alu-popup-close::after, 
  #bgAluPopup button.alu-popup-close::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    transition: all 0.3s ease;
  }

  #bgAluPopup button.bg-alu-popup-close:hover::after, 
  #bgAluPopup button.alu-popup-close:hover::after {
    inset: -8px;
    opacity: 0.3;
  }
}

/* TABLET - 641px Ä‘áº¿n 1023px */
@media (min-width: 641px) and (max-width: 1023px) {
  #bgAluPopup button.bg-alu-popup-close, 
  #bgAluPopup button.alu-popup-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: #fff !important;
  }

  #bgAluPopup button.bg-alu-popup-close:hover, 
  #bgAluPopup button.alu-popup-close:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.15);
  }

  #bgAluPopup button.bg-alu-popup-close:active, 
  #bgAluPopup button.alu-popup-close:active {
    transform: scale(0.93) rotate(90deg);
  }

  #bgAluPopup button.bg-alu-popup-close svg, 
  #bgAluPopup button.alu-popup-close svg {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 2.5;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
  }

  #bgAluPopup button.bg-alu-popup-close::after, 
  #bgAluPopup button.alu-popup-close::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    transition: all 0.3s ease;
  }

  #bgAluPopup button.bg-alu-popup-close:hover::after, 
  #bgAluPopup button.alu-popup-close:hover::after {
    inset: -7px;
    opacity: 0.3;
  }
}

/* MOBILE - 481px Ä‘áº¿n 640px */
@media (min-width: 481px) and (max-width: 640px) {
  #bgAluPopup button.bg-alu-popup-close, 
  #bgAluPopup button.alu-popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.08);
    touch-action: manipulation;
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: #fff !important;
  }

  #bgAluPopup button.bg-alu-popup-close:hover, 
  #bgAluPopup button.alu-popup-close:hover {
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.12);
  }

  #bgAluPopup button.bg-alu-popup-close:active, 
  #bgAluPopup button.alu-popup-close:active {
    transform: scale(0.92) rotate(90deg);
  }

  #bgAluPopup button.bg-alu-popup-close svg, 
  #bgAluPopup button.alu-popup-close svg {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 2.5;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
  }

  #bgAluPopup button.bg-alu-popup-close::after, 
  #bgAluPopup button.alu-popup-close::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    transition: all 0.3s ease;
  }

  #bgAluPopup button.bg-alu-popup-close:hover::after, 
  #bgAluPopup button.alu-popup-close:hover::after {
    inset: -6px;
    opacity: 0.25;
  }
}

/* MOBILE NHá»Ž - DÆ°á»›i 480px */
@media (max-width: 480px) {
  #bgAluPopup button.bg-alu-popup-close, 
  #bgAluPopup button.alu-popup-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.07);
    touch-action: manipulation;
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: #fff !important;
  }

  #bgAluPopup button.bg-alu-popup-close:hover, 
  #bgAluPopup button.alu-popup-close:hover {
    transform: scale(1.06) rotate(90deg);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.1);
  }

  #bgAluPopup button.bg-alu-popup-close:active, 
  #bgAluPopup button.alu-popup-close:active {
    transform: scale(0.9) rotate(90deg);
  }

  #bgAluPopup button.bg-alu-popup-close svg, 
  #bgAluPopup button.alu-popup-close svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.5;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
  }

  #bgAluPopup button.bg-alu-popup-close::after, 
  #bgAluPopup button.alu-popup-close::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    transition: all 0.3s ease;
  }

  #bgAluPopup button.bg-alu-popup-close:hover::after, 
  #bgAluPopup button.alu-popup-close:hover::after {
    inset: -5px;
    opacity: 0.2;
  }
}

/* ===== POPUP COLUMNS ===== */
.bg-alu-popup-left {
  grid-column: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.bg-alu-popup-right {
  grid-column: 2;
  padding: 28px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border-left: 1px solid #f0f0f0;
}

/* Desktop: keep right column sticky while scrolling inside popup */
@media (min-width: 1025px) {
  .bg-alu-popup-right {
    position: sticky;
    top: 0;
    align-self: start;
  }
}

/* ===== POPUP HEADER ===== */
.bg-alu-popup-header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

.bg-alu-popup-image {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.bg-alu-popup-image img,
.bg-alu-popup-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  margin-bottom: 0;
}

/* ===== POPUP CONTENT ===== */
.bg-alu-popup-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bg-alu-popup-title {
  font-size: 22px;
  font-weight: 800;
  color: #000;
  margin: 0;
  line-height: 1.3;
}

.bg-alu-popup-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bg-alu-popup-article-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.bg-alu-popup-article-btn:hover {
  background: #e3f2fd;
  color: #0084ff;
  border-color: #0084ff;
  transform: translateY(-1px);
}

.bg-alu-popup-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0;
}

.bg-alu-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0px 12px;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 8px;
  font-size: 14px;
}

.bg-alu-info-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.bg-alu-info-label {
  font-weight: 600;
  color: #333;
  min-width: 80px;
}

.bg-alu-info-value {
  color: #333;
}

/* ===== POPUP DESCRIPTION ===== */
.bg-alu-popup-description {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
}

.bg-alu-popup-description h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #333;
}

.bg-alu-description-content {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
}

.bg-alu-description-content p {
  margin: 0 0 10px 0;
}

.bg-alu-description-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  table-layout: fixed;
}

.bg-alu-description-content table tbody tr:first-child {
  background: #f5f5f5;
}

.bg-alu-description-content table tbody tr:first-child td {
  background: #f5f5f5;
  color: #333;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
  font-size: 14px;
}

.bg-alu-description-content table td {
  padding: 10px 8px;
  border: 1px solid #eee;
  color: #333;
  font-size: 14px;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  vertical-align: middle;
}

/* ===== POPUP NOTE ===== */
.bg-alu-popup-note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px 12px;
  margin: 12px 0 0 0;
  border-radius: 6px;
  font-size: 12px;
  color: #856404;
  line-height: 1.5;
}

/* ===== DEALER INFO BOX ===== */
.alu-default-agent-info {
  position: relative;
  border: 2px solid #ff4757;
  border-radius: 12px;
  padding: 6px;
  background: #fff;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { 
    opacity: 0;
    transform: translateY(-10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.alu-agent-badge {
  position: absolute;
  top: -14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff4757;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.25);
}

.alu-agent-badge svg {
  width: 14px;
  height: 14px;
}

.alu-agent-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.alu-agent-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  align-items: center;
  text-align: center;
}

.alu-agent-name {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
}

.alu-agent-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.alu-agent-area svg {
  flex-shrink: 0;
  color: #ff4757;
}

.alu-agent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.alu-agent-btn-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alu-btn-label {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alu-agent-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  background: #f8f9fa;
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.14);
}

.alu-agent-btn:hover {
  transform: translateY(-1px);
}

.alu-agent-btn .alu-btn-icon {
  flex-shrink: 0;
}

.alu-agent-btn .alu-btn-value {
  flex: 0 1 auto;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.4px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.alu-agent-btn-zalo {
  background: linear-gradient(135deg, #0a8dff 0%, #005fcc 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.alu-agent-btn-zalo:hover {
  background: linear-gradient(135deg, #0079e6 0%, #0054b8 100%);
  box-shadow: 0 8px 18px rgba(0, 95, 204, 0.35);
}

.alu-agent-btn-call {
  background: linear-gradient(135deg, #ff5d49 0%, #ef3340 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.alu-agent-btn-call:hover {
  background: linear-gradient(135deg, #f24a35 0%, #d92a37 100%);
  box-shadow: 0 8px 18px rgba(217, 42, 55, 0.32);
}

/* OLD STYLES FOR BACKWARD COMPATIBILITY */
.bg-alu-dealer-info {
  position: relative;
  border: 2px solid #ff4757;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  animation: slideDown 0.3s ease;
}

.bg-alu-dealer-badge {
  position: absolute;
  top: -14px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff4757;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 2;
}

.bg-alu-dealer-badge svg {
  width: 14px;
  height: 14px;
}

.bg-alu-dealer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.bg-alu-dealer-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  padding-top: 6px;
}

.bg-alu-dealer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bg-alu-dealer-phone {
  display: inline-block;
  font-size: 14px;
  color: #0084ff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.bg-alu-dealer-phone:hover {
  color: #005fcc;
  text-decoration: underline;
}

/* ===== DEALER BUTTONS ===== */
.bg-alu-dealer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bg-alu-dealer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: white;
  transition: all 0.2s ease;
}

.bg-alu-btn-zalo {
  background: #0084ff;
}

.bg-alu-btn-zalo:hover {
  background: #0073d9;
  transform: translateY(-2px);
}

.bg-alu-btn-call {
  background: #ff4757;
}

.bg-alu-btn-call:hover {
  background: #ff3838;
  transform: translateY(-2px);
}

/* ===== DEALER SELECT ===== */
.bg-alu-dealer-select-wrap {
  padding: 14px;
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.04) 0%, rgba(0, 95, 204, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 132, 255, 0.15);
}

.bg-alu-dealer-select-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.bg-alu-dealer-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding: 2px;
}

.bg-alu-dealer-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s ease;
}

.bg-alu-dealer-chip:hover {
  border-color: #0084ff;
  background: #f0f7ff;
  transform: translateY(-1px);
}

.bg-alu-dealer-chip.active {
  border-color: #0084ff;
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.12) 0%, rgba(0, 95, 204, 0.08) 100%);
  color: #0084ff;
}

.bg-alu-chip-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding-left: 22px;
  position: relative;
}

.bg-alu-chip-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.8;
}

.bg-alu-chip-badge {
  font-size: 12px;
  flex-shrink: 0;
}

/* ===== CTA BUTTON ===== */
.bg-alu-btn-main {
  display: none !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  background: linear-gradient(135deg, #0084ff 0%, #005fcc 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 132, 255, 0.2);
  letter-spacing: 0.2px;
}

.bg-alu-btn-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.3);
  background: linear-gradient(135deg, #0073e6 0%, #0054b3 100%);
}

.bg-alu-btn-main:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(0, 132, 255, 0.2);
}

/* ===== OLD STYLES (FALLBACK) ===== */
.bg-alu-btn {
  display: block;
  text-align: center;
  padding: 12px;
  margin-top: 10px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.bg-alu-btn.primary {
  background: #2563eb;
  color: #fff;
}

.bg-alu-btn.zalo {
  background: #0ea5e9;
  color: #fff;
}

.bg-alu-popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 26px;
  cursor: pointer;
}

/* ===== RESPONSIVE - DESKTOP ===== */
@media (min-width: 1025px) {
  .bg-alu-popup {
    padding: 40px 20px;
  }

  .bg-alu-popup-box {
    grid-template-columns: minmax(0, 65%) minmax(0, 35%);
    max-height: 85vh;
  }

  .bg-alu-popup-left {
    padding: 28px;
  }

  .bg-alu-popup-right {
    padding: 24px;
    gap: 14px;
  }

  .bg-alu-popup-right > * {
    min-width: 0;
  }

  .alu-default-agent-info {
    padding: 10px;
    border-radius: 10px;
  }

  .alu-agent-badge {
    top: -12px;
    left: 12px;
    font-size: 11px;
    padding: 4px 10px;
  }

  .alu-agent-content {
    gap: 12px;
    margin-top: 8px;
  }

  .alu-agent-name {
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .alu-agent-area {
    font-size: 12px;
  }

  .alu-agent-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .alu-agent-btn-wrapper {
    gap: 4px;
  }

  .alu-btn-label {
    font-size: 10px;
    letter-spacing: 0.4px;
  }

  .bg-alu-description-content table {
    font-size: 9px !important;
    margin: 10px 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
    border: 1px solid #ddd !important;
    box-sizing: border-box !important;
    border-radius: 4px !important;
    max-width: 100% !important;
  }

  .bg-alu-description-content table th,
  .bg-alu-description-content table td {
    padding: 5px 4px !important;
    font-size: 9px !important;
  }

  .bg-alu-description-content table td {
    font-size: 14px !important;
  }

  .bg-alu-description-content table tbody tr:first-child td {
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 5px 3px !important;
    border: 1px solid #eee !important;
    border-bottom: 2px solid #ddd !important;
    background: #f5f5f5 !important;
    width: auto !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  .bg-alu-description-content table tbody tr:not(:first-child) td {
    border-bottom: 1px solid #eee !important;
  }

  .bg-alu-popup-note {
    padding: 8px 10px;
    margin: 10px 0 0 0;
    font-size: 11px;
  }

  /* POPUP TITLE - MOBILE */
  .bg-alu-popup-title-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .bg-alu-popup-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
  }

  .bg-alu-popup-article-btn {
    margin-left: auto;
    flex-shrink: 0;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    gap: 3px;
    line-height: 1.1;
  }

  /* DEALER INFO MOBILE */
  .alu-default-agent-info,
  .bg-alu-dealer-info {
    padding: 14px;
    margin: 0;
    border-radius: 10px;
  }

  .alu-agent-badge,
  .bg-alu-dealer-badge {
    font-size: 11px;
    padding: 4px 11px;
    top: -12px;
    left: 12px;
  }

  .alu-agent-name,
  .bg-alu-dealer-name {
    font-size: 15px;
    padding-top: 4px;
  }

  .alu-agent-area {
    font-size: 12px;
    gap: 5px;
  }

  .alu-agent-area svg {
    width: 12px;
    height: 12px;
  }

  .alu-agent-actions {
    gap: 10px;
  }

  .alu-agent-btn-wrapper {
    gap: 5px;
  }

  .alu-agent-btn {
    padding: 10px 11px;
    gap: 6px;
    border-radius: 10px;
  }

  .alu-agent-btn .alu-btn-icon {
    width: 16px;
    height: 16px;
  }

  .alu-agent-btn .alu-btn-value {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
    overflow-wrap: anywhere;
  }

  .bg-alu-dealer-select-wrap {
    padding: 12px;
    border-radius: 10px;
  }

  .bg-alu-dealer-select-title {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .bg-alu-dealer-chips {
    max-height: 210px;
    gap: 6px;
  }

  .bg-alu-dealer-chip {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  .bg-alu-btn-main {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 9px;
    margin-top: auto;
  }

  .bg-alu-popup-header {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .bg-alu-popup-image {
    width: 220px;
    height: 220px;
  }

  .bg-alu-popup-title {
    font-size: 24px;
  }
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 1024px) and (min-width: 768px) {
  .bg-alu-popup {
    padding: 30px 15px;
  }

  .bg-alu-popup-box {
    grid-template-columns: 1fr;
    max-height: 90vh;
  }

  .bg-alu-popup-left {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
  }

  .bg-alu-popup-right {
    padding: 20px;
    border-left: none;
  }

  .bg-alu-popup-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bg-alu-popup-image {
    width: 100%;
    height: 180px;
    border-radius: 10px;
  }

  .bg-alu-popup-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
  }

  .bg-alu-info-item {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 767px) {
  .bg-alu-popup {
    padding: 15px 10px;
  }

  .bg-alu-popup-box {
    display: flex;
    flex-direction: column;
    max-height: 88vh; /* Chá»«a khoáº£ng khÃ´ng cho thanh Address/Tab bar trÃªn Mobile */
    border-radius: 16px;
    height: auto;
  }

  .bg-alu-popup-close,
  .alu-popup-close {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: 12px;
    right: 12px;
  }

  .bg-alu-popup-left {
    padding: 18px 16px 12px; /* Chá»«a trÃªn 1 chÃºt do nÃºt Close to ra */
    gap: 12px;
    overflow: visible;
    max-height: none;
  }

  .bg-alu-popup-right {
    padding: 16px;
    gap: 16px;
    border-left: none;
    border-top: 1px solid #f0f0f0;
    overflow: visible;
    max-height: none;
  }

  .alu-default-agent-info,
  .bg-alu-dealer-select-wrap {
    display: none;
  }

  .bg-alu-btn-main {
    display: none;
  }

  #bgAluZaloMainBtn {
    display: none !important;
  }

  .bg-alu-popup-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bg-alu-popup-image {
    width: 100%;
    height: 180px;
    border-radius: 10px;
  }

  .bg-alu-popup-title {
    font-size: 16px;
    font-weight: 700;
  }

  .bg-alu-popup-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0 4px;
    padding: 10px;
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
    border: 1px solid #e2ebf7;
    border-radius: 12px;
  }

  .bg-alu-info-item {
    display: grid;
    grid-template-columns: 30px minmax(78px, auto) 1fr;
    align-items: center;
    padding: 9px 10px;
    font-size: 13px;
    gap: 8px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e6edf8;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  }

  .bg-alu-info-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 8px;
    background: #f1f6ff;
  }

  .bg-alu-info-label {
    font-size: 13px;
    min-width: 78px;
    font-weight: 700;
    color: #334155;
  }

  .bg-alu-info-value {
    font-size: 14px;
    color: #0f172a;
    text-align: right;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .bg-alu-popup-description {
    margin-top: 12px;
    padding-top: 12px;
  }

  .bg-alu-popup-description h4 {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .bg-alu-description-content {
    font-size: 12px;
    line-height: 1.5;
  }

  }

  .bg-alu-description-content table {
    font-size: 9px !important;
    margin: 10px 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
    border: 1px solid #ddd !important;
    box-sizing: border-box !important;
    border-radius: 4px !important;
    max-width: 100% !important;
  }

  .bg-alu-description-content table th,
  .bg-alu-description-content table td {
    padding: 5px 4px !important;
    font-size: 9px !important;
  }

  .bg-alu-description-content table td {
    font-size: 14px !important;
  }

  .bg-alu-description-content table tbody tr:first-child td {
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 5px 3px !important;
    border: 1px solid #eee !important;
    border-bottom: 2px solid #ddd !important;
    background: #f5f5f5 !important;
    width: auto !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }

  .bg-alu-description-content table tbody tr:not(:first-child) td {
    border-bottom: 1px solid #eee !important;
  }

  .bg-alu-popup-note {
    padding: 8px 10px;
    margin: 10px 0 0 0;
    font-size: 11px;
  }

  /* POPUP TITLE - MOBILE */
  .bg-alu-popup-title-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .bg-alu-popup-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
  }

  .bg-alu-popup-article-btn {
    margin-left: auto;
    flex-shrink: 0;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    gap: 3px;
    line-height: 1.1;
  }

  /* DEALER INFO MOBILE */
  .alu-default-agent-info,
  .bg-alu-dealer-info {
    padding: 14px;
    margin: 0;
    border-radius: 10px;
  }

  .alu-agent-badge,
  .bg-alu-dealer-badge {
    font-size: 11px;
    padding: 4px 11px;
    top: -12px;
    left: 12px;
  }

  .alu-agent-name,
  .bg-alu-dealer-name {
    font-size: 15px;
    padding-top: 4px;
  }

  .alu-agent-area {
    font-size: 12px;
    gap: 5px;
  }

  .alu-agent-area svg {
    width: 12px;
    height: 12px;
  }

  .alu-agent-actions {
    gap: 10px;
  }

  .alu-agent-btn-wrapper {
    gap: 5px;
  }

  .alu-agent-btn {
    padding: 10px 12px;
    font-size: 13px;
    gap: 8px;
  }


  .bg-alu-dealer-phone {
    font-size: 13px;
  }

  .bg-alu-dealer-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .bg-alu-dealer-btn {
    padding: 9px 10px;
    font-size: 12px;
    gap: 6px;
  }

  .bg-alu-dealer-btn svg {
    width: 14px;
    height: 14px;
  }

  /* DEALER SELECT MOBILE */
  .bg-alu-dealer-select-wrap {
    border-radius: 12px;
    margin: 15px 0;
    padding: 14px;
  }

  .bg-alu-dealer-select-title {
    font-size: 11px;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
  }

  .bg-alu-dealer-chips {
    gap: 6px;
    max-height: 280px;
  }

  .bg-alu-dealer-chip {
    padding: 7px 10px;
    font-size: 12px;
  }

  /* CTA BUTTON MOBILE */
  .bg-alu-btn-main {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 14px;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    margin-top: 8px;
  }

  /* CUSTOM MOBILE INFO & TITLE */
  .bg-alu-popup-info {
    margin: 2px 0 4px;
    padding: 5px;
    border: 1px solid #ffffff;
  }

  .bg-alu-popup-title {
    padding-left: 5px;
  }
}


