/*
  Ardbin local UI layer
  - No dependency on foreign CDNs
  - Local SVG map fallback for intranet deployments
*/

:root{
  --sb-red:#dc3545;
  --sb-yellow:#ffc107;
  --sb-green:#198754;
  --sb-blue:#0d6efd;
  --sb-soft:#ffffff;
  --sb-border: rgba(0,0,0,.08);
}

body{font-feature-settings: "ss01";}

.card-soft{
  background: var(--sb-soft);
  border: 1px solid var(--sb-border);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(0,0,0,.05);
}

#map,#pickMap,.sb-map-host{
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  border: 1px solid rgba(13,110,253,.08);
}
#pickMap{height: 460px;}

@media (max-width: 992px){
  #map{height: 480px;}
  #pickMap{height: 420px;}
}
@media (max-width: 576px){
  #map{height: 420px;}
  #pickMap{height: 360px;}
}

.badge-status{
  padding: .35rem .55rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .1px;
}
.badge-red{background: rgba(220,53,69,.12); color: var(--sb-red); border:1px solid rgba(220,53,69,.25);} 
.badge-yellow{background: rgba(255,193,7,.14); color: #8a6b00; border:1px solid rgba(255,193,7,.28);} 
.badge-green{background: rgba(25,135,84,.12); color: var(--sb-green); border:1px solid rgba(25,135,84,.25);} 
.badge-gray{background: rgba(108,117,125,.12); color: #495057; border:1px solid rgba(108,117,125,.25);} 
.badge-purple{background: rgba(111,66,193,.12); color: #6f42c1; border:1px solid rgba(111,66,193,.25);} 

.form-hint{font-size: .85rem; color: rgba(0,0,0,.55);}
#sb-toast-holder .alert{margin-bottom: .5rem; border-radius: 14px;}

.sb-simple-map-wrapper{
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 15%, rgba(13,110,253,.08), transparent 25%),
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}
.sb-simple-map-svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.sb-map-grid line{
  stroke: rgba(13,110,253,.06);
  stroke-width: 1;
}
.sb-map-region{
  fill: rgba(13,110,253,.07);
  stroke: rgba(13,110,253,.42);
  stroke-width: 2;
  cursor: pointer;
  transition: fill .15s ease, stroke .15s ease, opacity .15s ease;
}
.sb-map-region:hover{fill: rgba(13,110,253,.12);}
.sb-map-region.is-selected{
  fill: rgba(13,110,253,.18);
  stroke: rgba(13,110,253,.88);
  stroke-width: 3;
}
.sb-map-region-label{
  fill: rgba(0,0,0,.58);
  font-size: 26px;
  font-weight: 700;
  pointer-events: none;
}
.sb-map-markers{
  position: absolute;
  inset: 0;
}
.sb-map-marker{
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  cursor: pointer;
  z-index: 2;
  text-decoration: none;
}
.sb-map-marker.is-point{
  width: 22px;
  height: 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.sb-map-marker-red{background: var(--sb-red);} 
.sb-map-marker-yellow{background: #d39e00;} 
.sb-map-marker-green{background: var(--sb-green);} 
.sb-map-marker-blue{background: var(--sb-blue);} 
.sb-map-marker-gray{background: #6c757d;} 
.sb-map-marker-purple{background: #6f42c1;} 
.sb-map-caption{
  position: absolute;
  inset-inline-start: 12px;
  inset-block-end: 12px;
  z-index: 2;
  max-width: min(88%, 420px);
  padding: .5rem .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.08);
  color: rgba(0,0,0,.64);
  font-size: .82rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
}
.sb-map-empty{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,.5);
  font-size: .95rem;
}
.sb-coord-readout{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .83rem;
}
