/* ============================================================
   FAB MENU - Expandable Floating Action Button
   ============================================================ */

#fab-menu-container {
  position: fixed;
  bottom: max(80px, calc(env(safe-area-inset-bottom) + 80px));
  right: max(20px, env(safe-area-inset-right));
  z-index: 140;
}

.fab-menu {
  position: relative;
}

/* ---- Backdrop ---- */
.fab-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: -1;
}

.fab-menu.expanded .fab-menu-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ---- Main FAB Button ---- */
.fab-main {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 
    0 4px 20px rgba(59, 130, 246, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.fab-main:hover {
  transform: scale(1.05);
  box-shadow: 
    0 6px 24px rgba(59, 130, 246, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

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

.fab-menu.expanded .fab-main {
  background: linear-gradient(135deg, #64748b, #475569);
  transform: rotate(0deg);
}

.fab-main-icon {
  line-height: 1;
  font-weight: 300;
  transition: transform 0.2s ease;
}

.fab-menu.expanded .fab-main-icon {
  transform: rotate(90deg);
}

.fab-main.pulse {
  animation: fabPulse 0.6s ease;
}

@keyframes fabPulse {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.05); }
}

/* ---- Options Container ---- */
.fab-menu-options {
  position: absolute;
  bottom: 64px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.fab-menu.expanded .fab-menu-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---- Option Buttons ---- */
.fab-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  color: var(--text-primary, #f1f5f9);
  cursor: pointer;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

.fab-option:hover:not(.disabled) {
  background: var(--bg-tertiary, #334155);
  transform: translateX(-4px);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3);
}

.fab-option:active:not(.disabled) {
  transform: scale(0.97) translateX(-4px);
}

.fab-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fab-option.pulse {
  animation: optionPulse 0.4s ease;
}

@keyframes optionPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-8px); }
}

.fab-option-icon {
  font-size: 18px;
  line-height: 1;
}

.fab-option-label {
  font-size: 14px;
}

/* ---- Option Variants ---- */
/* All options use default dark pill styling for consistency */
.fab-option-location,
.fab-option-session,
.fab-option-message {
  /* Default styling from .fab-option */
}

/* ---- Staggered Animation ---- */
.fab-menu.expanded .fab-option:nth-child(1) {
  transition-delay: 0.05s;
}

.fab-menu.expanded .fab-option:nth-child(2) {
  transition-delay: 0.1s;
}

.fab-menu.expanded .fab-option:nth-child(3) {
  transition-delay: 0.15s;
}

/* ---- Hide old FAB when new one is active ---- */
.fab-menu-active .asset-fab {
  display: none !important;
}
