/* ==========================================================================
   ADDRESS LOCAL VN - HỆ THỐNG CHI NHÁNH & BẢN ĐỒ GOOGLE MAPS KHÔNG CẦN API
   ========================================================================== */

.alvn-branches-page,
.tq-branches-page {
  background-color: #f8fafc;
  min-height: 100vh;
  padding-bottom: 60px;
  font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
}

/* 1. Header Section: Nền trắng chữ đen */
.alvn-branches-hero,
.tq-branches-hero {
  background: #ffffff;
  color: #0f172a;
  padding: 30px 0 24px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.alvn-branches-hero::before,
.tq-branches-hero::before {
  display: none;
}

.alvn-branches-hero-content,
.tq-branches-hero-content {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.alvn-branches-breadcrumb,
.tq-branches-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 10px;
}

.alvn-branches-breadcrumb a,
.tq-branches-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.alvn-branches-breadcrumb a:hover,
.tq-branches-breadcrumb a:hover {
  color: #0f172a;
}

.alvn-branches-breadcrumb span,
.tq-branches-breadcrumb span {
  color: #cbd5e1;
}

.alvn-branches-breadcrumb .alvn-breadcrumb-current,
.alvn-branches-breadcrumb span:last-child {
  color: #0f172a;
  font-weight: 700;
}

.alvn-branches-hero-title,
.tq-branches-hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.alvn-branches-grid,
.tq-branches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 1024px) {

  .alvn-branches-grid,
  .tq-branches-grid {
    grid-template-columns: 480px 1fr;
    align-items: start;
  }
}

/* 3. Left Column: Branch Explorer List */
.alvn-branch-explorer,
.tq-branch-explorer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Search Box & Region Filters */
.alvn-branch-controls-card,
.tq-branch-controls-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 18px 20px;
}

.alvn-branch-search-box,
.tq-branch-search-box {
  position: relative;
  margin-bottom: 14px;
}

.alvn-branch-search-icon,
.tq-branch-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 1 !important;
  z-index: 2;
}

.alvn-branch-search-icon svg,
.tq-branch-search-icon svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
}

.alvn-branch-search-input,
.tq-branch-search-input {
  width: 100% !important;
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 10px 14px 10px 42px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  outline: none !important;
  box-shadow: none !important;
  height: 44px !important;
  min-height: 44px !important;
  line-height: 22px !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  /* OVERRIDE Flatsome's margin-bottom: 1em */
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

.alvn-branch-search-input:focus,
.tq-branch-search-input:focus {
  background: #ffffff !important;
  border-color: #112e5b !important;
  box-shadow: 0 0 0 3px rgba(17, 46, 91, 0.12) !important;
}

.alvn-branch-filter-pills,
.tq-branch-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alvn-filter-pill,
.tq-filter-pill {
  background: #f1f5f9;
  border: 1px solid transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 !important;
  margin-bottom: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
}

.alvn-filter-pill:hover,
.tq-filter-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.alvn-filter-pill.active,
.tq-filter-pill.active {
  background: #112e5b;
  color: #ffffff;
  border-color: #112e5b;
}

/* Branch List Items */
.alvn-branch-list-container,
.tq-branch-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.alvn-branch-list-container::-webkit-scrollbar,
.tq-branch-list-container::-webkit-scrollbar {
  width: 6px;
}

.alvn-branch-list-container::-webkit-scrollbar-track,
.tq-branch-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.alvn-branch-list-container::-webkit-scrollbar-thumb,
.tq-branch-list-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.alvn-branch-list-container::-webkit-scrollbar-thumb:hover,
.tq-branch-list-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Single Branch Card */
.alvn-branch-card,
.tq-branch-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.alvn-branch-card:hover,
.tq-branch-card:hover {
  border-color: #cbd5e1;
}

.alvn-branch-card.active,
.tq-branch-card.active {
  border-color: #112e5b;
  background: #ffffff;
}

.alvn-branch-card-head,
.tq-branch-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.alvn-branch-card-title,
.tq-branch-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  flex: 1;
}

.alvn-branch-card.active .alvn-branch-card-title,
.tq-branch-card.active .tq-branch-card-title {
  color: #112e5b;
}

.alvn-hq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e31b25;
  color: #ffffff;
  font-size: 11px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: -1px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.35);
}

.alvn-branch-region-badge,
.tq-branch-region-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #475569;
}

.alvn-region-mien-nam,
.tq-region-mien-nam {
  background: #eff6ff;
  color: #1d4ed8;
}

.alvn-region-mien-bac,
.tq-region-mien-bac {
  background: #e0e7ff;
  color: #3730a3;
}

.alvn-region-mien-trung,
.tq-region-mien-trung {
  background: #fefce8;
  color: #a16207;
}

.alvn-region-mien-tay,
.tq-region-mien-tay {
  background: #ecfdf5;
  color: #047857;
}

.alvn-region-quoc-te,
.tq-region-quoc-te {
  background: #f5f3ff;
  color: #6d28d9;
}

.alvn-branch-card-address,
.tq-branch-card-address {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 10px 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

.alvn-branch-card-address svg,
.tq-branch-card-address svg {
  color: #64748b;
  flex-shrink: 0;
  margin-top: 3px !important;
  margin-bottom: 0 !important;
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
}

.alvn-branch-card-meta-row,
.tq-branch-card-meta-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px !important;
  border-top: 1px dashed #f1f5f9;
  padding-top: 8px;
}

.alvn-meta-line,
.tq-meta-line {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.alvn-meta-line svg,
.tq-meta-line svg {
  color: #94a3b8;
  flex-shrink: 0;
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  width: 15px !important;
  height: 15px !important;
}

.alvn-meta-line a,
.tq-meta-line a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.alvn-meta-line a:hover,
.tq-meta-line a:hover {
  color: #0f172a;
  text-decoration: underline;
}

.alvn-branch-card-actions,
.tq-branch-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
}

.alvn-btn-view-map,
.tq-btn-view-map {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease;
  margin: 0 !important;
  margin-bottom: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
}

.alvn-btn-view-map svg,
.tq-btn-view-map svg {
  flex-shrink: 0;
  display: inline-block !important;
  margin: 0 !important;
  width: 14px !important;
  height: 14px !important;
}

.alvn-btn-view-map:hover,
.tq-btn-view-map:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.alvn-branch-card.active .alvn-btn-view-map,
.tq-branch-card.active .tq-btn-view-map {
  background: #112e5b;
  color: #ffffff;
  border-color: #112e5b;
}

.alvn-btn-directions,
.tq-btn-directions {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin: 0 !important;
  margin-bottom: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.4 !important;
}

.alvn-btn-directions:hover,
.tq-btn-directions:hover {
  background: #112e5b;
  border-color: #112e5b;
  color: #ffffff;
}

.alvn-btn-directions svg,
.tq-btn-directions svg {
  flex-shrink: 0;
  display: inline-block !important;
  margin: 0 !important;
  width: 14px !important;
  height: 14px !important;
}

/* Empty Search Results Notice */
.alvn-no-branches-found,
.tq-no-branches-found {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
}

.alvn-no-branches-found svg,
.tq-no-branches-found svg {
  color: #94a3b8;
  margin: 0 auto 10px;
}

.alvn-no-branches-found p,
.tq-no-branches-found p {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 4px;
}

/* 4. Right Column: Google Maps Interactive Box */
.alvn-branch-map-panel,
.tq-branch-map-panel {
  position: sticky;
  top: 90px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
}

.alvn-map-panel-header,
.tq-map-panel-header {
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.alvn-map-header-info,
.tq-map-header-info {
  flex: 1;
  min-width: 0;
}

.alvn-map-active-badge,
.tq-map-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #059669;
  margin-bottom: 4px;
}

.alvn-btn-reset-map {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.alvn-btn-reset-map:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.alvn-map-active-badge::before,
.tq-map-active-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  background-color: #059669;
  border-radius: 50%;
  display: inline-block;
  animation: alvnPulse 1.8s infinite;
}

@keyframes alvnPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
  }
}

.alvn-map-active-title,
.tq-map-active-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvn-map-active-address,
.tq-map-active-address {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alvn-map-cta-directions,
.tq-map-cta-directions {
  background: #112e5b;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.alvn-map-cta-directions:hover,
.tq-map-cta-directions:hover {
  background: #0b192e;
  transform: translateY(-1px);
}

/* Map Iframe Container */
.alvn-map-iframe-wrapper,
.tq-map-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 580px;
  background: #f1f5f9;
}

.alvn-map-iframe-wrapper iframe,
.tq-map-iframe-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

.alvn-map-loading-overlay,
.tq-map-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.alvn-map-loading-overlay.is-loading,
.tq-map-loading-overlay.is-loading {
  opacity: 1;
  pointer-events: auto;
}

.alvn-map-spinner,
.tq-map-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #112e5b;
  border-radius: 50%;
  animation: alvnSpin 0.8s linear infinite;
}

@keyframes alvnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* 5. Mobile Tab Switcher (Visible on small screens) */
.alvn-mobile-view-tabs,
.tq-mobile-view-tabs {
  display: none;
  margin-bottom: 16px;
}

@media (max-width: 1023px) {

  .alvn-mobile-view-tabs,
  .tq-mobile-view-tabs {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
  }

  .alvn-mobile-tab-btn,
  .tq-mobile-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .alvn-mobile-tab-btn.active,
  .tq-mobile-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  }

  .alvn-map-iframe-wrapper,
  .tq-map-iframe-wrapper {
    height: 380px;
  }

  .alvn-branch-map-panel,
  .tq-branch-map-panel {
    position: static;
  }

  .alvn-branches-hero-title,
  .tq-branches-hero-title {
    font-size: 26px;
  }

  .alvn-map-panel-header,
  .tq-map-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .alvn-map-cta-directions,
  .tq-map-cta-directions {
    width: 100%;
    justify-content: center;
  }
}