/* ========================================
   FAB INCIDENCIES — Floating Action Button
   ======================================== */

.fab-incidencies {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FF9F0A;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 999;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-incidencies:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.fab-incidencies:active {
  transform: scale(0.95);
}

.fab-incidencies .material-symbols-outlined {
  font-size: 26px;
}

/* Badge comptador */
.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #FF453A;
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Mobile: sobre tabbar */
@media (max-width: 1023px) {
  .fab-incidencies {
    bottom: calc(70px + 16px);
  }
}

/* Amagar en certs contextos */
body[data-page="incidencies"] .fab-incidencies,
body[data-page="login"] .fab-incidencies {
  display: none !important;
}

/* Multi-seleccion: pujar FAB sobre la barra */
@media (max-width: 1023px) {
  body.seleccion-activa .fab-incidencies {
    bottom: calc(70px + 72px + 16px); /* tabbar + selection-bar + gap */
  }
}

@media (min-width: 1024px) {
  body.seleccion-activa .fab-incidencies {
    bottom: calc(80px + 16px);
  }
}

/* ========================================
   DARK MODE
   ======================================== */

@media (prefers-color-scheme: dark) {
  .fab-incidencies {
    background: #FF9F0A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  .fab-incidencies:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  }
}
