/* ============================================================
   Floating Action Button
   ============================================================ */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #d4af37;
  color: #0a0a0a;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
              0 1px 3px rgba(212, 175, 55, 0.15);
  z-index: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
}

.fab__icon {
  display: inline-block;
  transition: transform 0.25s ease;
  font-weight: 300;
}

.fab--open {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5),
              0 1px 4px rgba(212, 175, 55, 0.2);
}

.fab--open .fab__icon {
  transform: rotate(45deg);
}

.fab:active {
  transform: scale(0.94);
}

/* ============================================================
   Menu contextual
   ============================================================ */
.fab-menu {
  position: fixed;
  right: 16px;
  bottom: calc(76px + 48px + 12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 899;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.fab-menu--open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fab-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #1a1715;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 999px;
  color: #f5f0eb;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.fab-menu__item:active {
  transform: scale(0.97);
}

.fab-menu__item:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: #d4af37;
}

.fab-menu__item-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #d4af37;
  align-items: center;
  justify-content: center;
}

.fab-menu__item-icon svg {
  width: 18px;
  height: 18px;
}

.fab-menu__item-label {
  color: #f5f0eb;
}

/* ============================================================
   Responsivo — sidebar em desktop
   ============================================================ */
@media (min-width: 900px) {
  .fab {
    right: 32px;
    bottom: 32px;
  }
  .fab-menu {
    right: 32px;
    bottom: calc(32px + 56px + 12px);
  }
}

/* Esconde em paginas de formulario aberto */
body.fab-hidden .fab,
body.fab-hidden .fab-menu {
  display: none;
}
