/* BWS Maluku — Lokasi Saya v1.6.0 */
.bws-user-location-control {
  margin-bottom: 12px !important;
}

.bws-user-location-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  color: #006778;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.bws-user-location-button:hover {
  transform: translateY(-1px);
  background: #ecfeff;
  box-shadow: 0 13px 30px rgba(15, 23, 42, 0.22);
}

.bws-user-location-button:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.30);
  outline-offset: 2px;
}

.bws-user-location-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bws-user-location-button.is-loading svg {
  animation: bws-location-spin 1s linear infinite;
}

.bws-user-location-button.is-active {
  background: #008298;
  color: #fff;
  border-color: rgba(255, 255, 255, .42);
}

.bws-user-location-button.is-error {
  background: #fff1f2;
  color: #be123c;
}

.bws-user-location-button .bws-location-status-dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #94a3b8;
}

.bws-user-location-button.is-active .bws-location-status-dot { background: #22c55e; }
.bws-user-location-button.is-error .bws-location-status-dot { background: #ef4444; }
.bws-user-location-button.is-loading .bws-location-status-dot { background: #f59e0b; }

.bws-user-location-marker {
  background: transparent !important;
  border: 0 !important;
}

.bws-user-location-marker-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.bws-user-location-marker-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(14, 165, 233, .30);
  animation: bws-location-pulse 2s ease-out infinite;
}

.bws-user-location-marker-dot {
  position: relative;
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 2px 12px rgba(2, 132, 199, .60);
}

.bws-user-location-popup {
  min-width: 220px;
  color: #0f172a;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bws-user-location-popup h4 {
  margin: 0 0 9px;
  color: #006778;
  font-size: 14px;
}

.bws-user-location-popup-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 11px;
  align-items: center;
  font-size: 12px;
}

.bws-user-location-popup-grid span { color: #64748b; }
.bws-user-location-popup-grid b {
  color: #0f172a;
  text-align: right;
  word-break: break-word;
}

.bws-user-location-copy {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: #e6f7fa;
  color: #006778;
  font-weight: 800;
  cursor: pointer;
}

.bws-user-location-notice {
  position: fixed;
  left: 50%;
  bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px));
  z-index: 10050;
  max-width: min(440px, calc(100vw - 28px));
  padding: 11px 15px;
  border: 1px solid rgba(8, 145, 178, .20);
  border-radius: 13px;
  background: rgba(255, 255, 255, .97);
  color: #0f172a;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .22);
  font: 700 12px/1.45 Inter, system-ui, sans-serif;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.bws-user-location-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bws-user-location-notice.is-error {
  border-color: rgba(225, 29, 72, .20);
  background: rgba(255, 241, 242, .98);
  color: #9f1239;
}

@keyframes bws-location-spin { to { transform: rotate(360deg); } }
@keyframes bws-location-pulse {
  0% { transform: scale(.45); opacity: .9; }
  75%, 100% { transform: scale(1.45); opacity: 0; }
}

@media (max-width: 600px) {
  .bws-user-location-control { margin-bottom: 8px !important; }
  .bws-user-location-button { width: 40px; height: 40px; border-radius: 11px; }
  .bws-user-location-notice {
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 80px));
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bws-user-location-marker-pulse,
  .bws-user-location-button.is-loading svg { animation: none; }
  .bws-user-location-button,
  .bws-user-location-notice { transition: none; }
}

/* v1.7.0: tombol merupakan toggle enable/disable; status awal selalu nonaktif. */
.bws-user-location-button:not(.is-active):not(.is-loading):not(.is-error) .bws-location-status-dot{background:#64748b}
