
/* Front-end (Themeable) */
.bal-locator{
  max-width: 100%;
  margin: 0 auto;
  padding: 25px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(27,38,83,.06), rgba(27,38,83,0) 70%);
  position: relative;
}

.bal-locator *{box-sizing:border-box;}

.bal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 14px 10px;
}

.bal-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.bal-logo{
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.bal-brand--no-logo .bal-logo{display:none;}

.bal-brand-text{min-width:0;}
.bal-title{
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin: 0;
}
.bal-subtitle{
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.3;
  color: rgba(15,23,42,.72);
  max-width: 720px;
}

/* Toolbar */
.bal-toolbar{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
  padding: 10px 14px 14px;
}

.bal-searchwrap{
  flex: 1;
  min-width: 240px;
  position: relative;
}
.bal-search{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.bal-search:focus{
  border-color: var(--bal-accent, #1b2653);
  box-shadow: 0 0 0 4px rgba(27,38,83,.12);
}

.bal-selectwrap{min-width: 180px;}
.bal-filter{
  width: 100%;
  padding: 12px 12px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  outline: none;
}

.bal-geolocate{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: var(--bal-accent, #1b2653);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: 0 10px 30px rgba(27,38,83,.22);
}
.bal-geolocate:hover{transform: translateY(-1px);}
.bal-geolocate:active{transform: translateY(0);}
.bal-geolocate:disabled{opacity:.65; cursor:not-allowed; box-shadow:none;}

.bal-geolocate-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgb(49 43 107);
  box-shadow: 0 0 0 6px rgba(255,255,255,.14);
}

.bal-notice{
  margin: 0 14px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.35;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.85);
  color: rgba(15,23,42,.86);
}
.bal-notice--ok{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.08);
}
.bal-notice--warn{
  border-color: rgba(245,158,11,.40);
  background: rgba(245,158,11,.10);
}

/* Grid */
.bal-grid{
  display:grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  align-items: stretch;
  --bal-height: 460px;
}

.bal-map{
  height: var(--bal-height);
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 18px 50px rgba(0,0,0,.10);
}

.bal-list{
  height: var(--bal-height);
  overflow:auto;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  padding: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.06);
}

/* List items */
.bal-item{
  width:100%;
  text-align:left;
  border:1px solid rgba(15,23,42,.08);
  background: #fff;
  border-radius:16px;
  padding:12px 12px;
  margin: 10px 0;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.bal-item:hover{
  transform: translateY(-1px);
  border-color: rgba(15,23,42,.16);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.bal-item:active{transform: translateY(0);}

.bal-item-title{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  font-weight: normal;
  color: #0f172a;
}
.bal-item-meta{
  font-size: 12px;
  color: rgba(15,23,42,.72);
  margin-top: 4px;
}
.bal-dist{
  font-size: 12px;
  color: rgba(15,23,42,.70);
  font-weight: 800;
}

.bal-empty{padding: 14px; color: rgba(15,23,42,.65);}

/* Popup */
.bal-popup-meta{font-size:12px; opacity:.75; margin: 2px 0 8px;}
.bal-popup-line{margin: 3px 0;}
.bal-popup a{word-break: break-word;}

/* Marker icons */
.bal-icon{border-radius:999px; border:2px solid #fff; box-shadow: 0 10px 24px rgba(0,0,0,.20);}
.bal-icon-atm{background: var(--bal-accent, #1b2653);}
.bal-icon-branch{background:#22c55e;}

@media (max-width: 980px){
  .bal-grid{grid-template-columns: 1fr;}
  .bal-list{height: auto; max-height: 360px;}
}


/* Admin */
.bal-admin{display:grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px;}
@media (max-width: 1100px){ .bal-admin{grid-template-columns: 1fr;} }
.bal-admin-panel{background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding: 14px;}
.bal-admin-preview{background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding: 14px;}
.bal-pin{border:1px solid #e5e7eb; border-radius: 14px; padding: 12px; margin: 10px 0; background:#fafafa;}
.bal-pin-grid{display:grid; grid-template-columns: 1.2fr .8fr .7fr .7fr; gap: 10px;}
@media (max-width: 900px){ .bal-pin-grid{grid-template-columns: 1fr 1fr;} }
.bal-pin-grid input, .bal-pin-grid select{width:100%; padding:8px 10px; border:1px solid #d0d7de; border-radius: 10px; background:#fff;}
.bal-pin-actions{display:flex; gap: 10px; align-items:center; margin-top: 10px;}
.bal-admin-status{margin-left: 10px;}
.bal-admin-status.is-ok{color: #16a34a; font-weight: 600;}
.bal-admin-status.is-error{color: #dc2626; font-weight: 600;}
.bal-admin-status.is-saving{opacity: .75;}

/* Eye-catching styling */
.bal-locator{--bal-accent:#0b66c3;}
.bal-toolbar{margin-bottom: 15px;padding: 0 !important;}
.bal-geolocate{border-color: color-mix(in srgb, var(--bal-accent) 35%, #d0d7de); background: #fff;}
.bal-geolocate:hover{border-color: var(--bal-accent); box-shadow: 0 8px 20px rgba(0,0,0,.06);}
.bal-search:focus, .bal-filter:focus{outline:none; border-color: var(--bal-accent); box-shadow: 0 0 0 3px rgba(11,102,195,.15);}
.bal-map{box-shadow: 0 12px 30px rgba(0,0,0,.08);}
.bal-list{box-shadow: 0 12px 30px rgba(0,0,0,.05);}
.bal-item{transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;}
.bal-item:hover{transform: translateY(-1px); border-color: color-mix(in srgb, var(--bal-accent) 40%, #cbd5e1); box-shadow: 0 10px 18px rgba(0,0,0,.06);}
.bal-item-title{color:#0f172a;}
.bal-item-meta {
    text-transform: uppercase;
    display: inline-block;
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
    color: #fff;
    background: #312b6b;
    text-align: center;
    width: auto;
    min-width: 52px;
}
.bal-icon-atm{background: var(--bal-accent);}
.bal-icon-branch{background: color-mix(in srgb, var(--bal-accent) 40%, #22c55e);}




.bal-selectwrap .select2-hidden-accessible {
    position: static !important;
    visibility: visible;
    clip: auto !important;
    width: 100% !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    height: 50px !important;
    padding: 5px !important;
}
.bal-selectwrap .select2-container--default {
    visibility: hidden;
    opacity: 0;
    display: none !important;
}

/* Leaflet popup -> match screenshot */
.bal-map .leaflet-popup-content-wrapper{
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  border: 1px solid rgba(15,23,42,.10);
}

.bal-map .leaflet-popup-content{
  margin: 12px 14px;
  min-width: auto;
}

.bal-map .leaflet-popup-tip{
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
}

.bal-pop-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    color: #525252;
    margin-bottom: 4px;
}

.bal-pop-type{
  font-size: 12px;
  color: rgba(15,23,42,.70);
}

.bal-pop-phone{
  font-size: 12px;
  color: rgba(15,23,42,.85);
  margin-bottom: 10px;
}

.bal-pop-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding: 10px;
  border-radius: 10px;
  background: var(--bal-accent, #312b6b);
  color: #fff !important;
  font-weight: 800;
  font-size: 12.5px;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(11,102,195,.25);
}

.bal-pop-btn:hover{ filter: brightness(.98); }
.bal-pop-btn:active{ transform: translateY(1px); }

.bal-pop-btn-ico{ font-size: 14px; line-height: 1; }


.bal-selectwrap select.bal-filter{
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
}

.bal-pop-btn span {
  color: #fff !important;
  font-size: 12px;
}

/* Logo marker responsive */
.bal-marker-logo{
  width: 36px !important;
  height: 36px !important;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  background: #fff;
  padding: 4px;
}

/* Mobile */
@media (max-width: 768px){
  .bal-marker-logo{
    width: 28px !important;
    height: 28px !important;
    padding: 3px;
  }
}

.bal-geolocate {
    color: #606060 !important;
    font-weight: normal !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
}
.bal-list button {
    display: flex;
    justify-content: space-between;
    text-transform: capitalize;
    align-items: baseline;
}
.bal-item {
    border-radius: 6px;
}
.bal-pop-label {
    font-size: 12px;
    text-transform: capitalize;
    color: #000 !important;
    opacity: 1;
}

.bal-pop-phone{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(15,23,42,.9);
}

.bal-pop-ico{
  display: inline-flex;
  color: var(--bal-accent, #0b66c3);
}

/* IMPORTANT: Leaflet divIcon resets */
.bal-marker{
  background: transparent !important;
  border: 0 !important;
}

/* Marker pins */
.bal-marker-wrap{
  width:34px;
  height:34px;
  position:relative;
}

.bal-marker-pin{
  width:34px;
  height:34px;
  border-radius:999px;
  background:#fff;
  border:3px solid rgba(255,255,255,.95);
  box-shadow:0 10px 22px rgba(0,0,0,.18);
  display:flex;
  align-items:center;
  justify-content:center;
}

.bal-marker-badge{
  width:28px;
  height:28px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Mobile */
@media (max-width: 768px){
  .bal-marker-wrap{ width:28px; height:28px; }
  .bal-marker-pin{ width:28px; height:28px; }
  .bal-marker-badge{ width:24px; height:24px; }
  .bal-marker-badge svg{ width:18px; height:18px; }
}

.leaflet-map-pane svg path {
  fill: #312B6B !important;
}
/* New pill search bar */
.bal-searchbar{
  flex: 1;
  min-width: 260px;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(11,102,195,.20);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.bal-search-ico{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(15,23,42,.65);
  flex: 0 0 auto;
}

.bal-searchbar .bal-search{
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 10px 6px !important;
  border-radius: 999px;
  flex: 1;
  min-width: 140px;
}

.bal-searchbar:focus-within{
  border-color: var(--bal-accent, #0b66c3);
  box-shadow: 0 0 0 4px rgba(11,102,195,.15), 0 8px 24px rgba(0,0,0,.06);
}

/* Near me button inside bar */
.bal-searchbar .bal-geolocate{
  padding: 10px 14px;
  border-radius: 999px;
  border: 0;
  background: var(--bal-accent, #0b66c3);
  color: #fff !important;
  font-weight: 800;
  box-shadow: none;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 0 !important;
}

.bal-geolocate-ico{
  display:inline-flex;
}

/* mobile */
@media (max-width: 768px){
  .bal-searchbar{
    width: 100%;
  }
  .bal-searchbar .bal-geolocate{
    padding: 10px 12px;
  }
}
.bal-geolocate-ico svg {
  fill: #fff !important;
}
