/* SOSJibon Web — Enhanced Styles & Micro-Animations */
:root {
  --jibon-primary: #159A6C;
  --jibon-dark: #087A55;
  --jibon-red: #D92D20;
  --jibon-blue: #1565C0;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-tap-highlight-color: transparent;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}

/* ── Pulsing SOS ── */
@keyframes sosPulse {
  0%, 100% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.45);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 22px rgba(217, 45, 32, 0);
  }
}

@keyframes sosRipple {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.animate-sos-pulse {
  animation: sosPulse 1.6s ease-in-out infinite;
}

.sos-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(217, 45, 32, 0.4);
  animation: sosRipple 2s ease-out infinite;
  pointer-events: none;
}

.sos-ripple:nth-child(2) {
  animation-delay: 0.6s;
}

/* ── Float ── */
@keyframes floatSlow {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(3px); }
}
.animate-float-slow {
  animation: floatSlow 2.4s ease-in-out infinite;
}

/* ── Page Transitions ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page-enter {
  animation: fadeSlideUp 0.28s ease-out;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* ── Card hover lift ── */
.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Button press feedback ── */
.btn-press {
  transition: transform 0.1s ease, filter 0.1s ease;
}

.btn-press:active {
  transform: scale(0.96);
  filter: brightness(0.95);
}

/* ── Shimmer skeleton ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

.dark .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 800px 100%;
}

/* ── Glow effects ── */
.glow-green {
  box-shadow: 0 0 20px rgba(21, 154, 108, 0.15);
}

.glow-red {
  box-shadow: 0 0 20px rgba(217, 45, 32, 0.15);
}

/* ── Badge bounce ── */
@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.badge-bounce {
  animation: badgeBounce 0.4s ease-out;
}

/* ── Progress bar ── */
@keyframes progressFill {
  from { width: 0%; }
  to { width: var(--fill, 0%); }
}

.progress-bar {
  transition: width 0.35s ease-out;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(21, 154, 108, 0.2);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(21, 154, 108, 0.4);
}

/* ── Hide scrollbar for pill strips ── */
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ── Input focus glow ── */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(21, 154, 108, 0.12);
}

/* ── Leaflet map fix ── */
.leaflet-container {
  font-family: 'Plus Jakarta Sans', sans-serif;
  z-index: 1;
  border-radius: 16px;
}

/* ── Tooltip ── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #17332A;
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ── Empty state illustration ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state .material-symbols-rounded {
  font-size: 48px;
  color: rgba(21, 154, 108, 0.3);
  margin-bottom: 12px;
}
