/* Floating Action Button (FAB) Styles */
:root {
  --fab-primary: #2ea6ff;
  --fab-primary-hover: #1e90ff;
  --fab-danger: #ef4444;
  --fab-danger-hover: #dc2626;
  --fab-success: #10b981;
  --fab-success-hover: #059669;
  --fab-bg: rgba(17, 17, 17, 0.98);
  --fab-border: rgba(255, 255, 255, 0.1);
  --fab-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --fab-text: #ffffff;
  --fab-text-muted: rgba(255, 255, 255, 0.7);
}

:root:not(.theme-dark) {
  --fab-bg: rgba(255, 255, 255, 0.98);
  --fab-border: rgba(0, 0, 0, 0.1);
  --fab-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  --fab-text: #1f2937;
  --fab-text-muted: #6b7280;
}

/* Main FAB Button */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.fab-main-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--fab-primary);
  border: none;
  box-shadow: var(--fab-shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.fab-main-btn:hover {
  transform: scale(1.1);
  background: var(--fab-primary-hover);
  box-shadow: 0 6px 30px rgba(46, 166, 255, 0.5);
}

.fab-main-btn.active {
  transform: rotate(45deg);
}

.fab-main-btn svg {
  width: 24px;
  height: 24px;
  color: white;
  transition: transform 0.3s ease;
}

/* Balance Badge */
.fab-balance-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--fab-success);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  min-width: 45px;
  text-align: center;
}

/* FAB Menu */
.fab-menu {
  position: absolute;
  bottom: 75px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--fab-bg);
  border: 1px solid var(--fab-border);
  border-radius: 28px;
  padding: 12px 20px 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--fab-shadow);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--fab-text);
}

.fab-menu-item:hover {
  transform: translateX(-4px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  background: var(--glass);
}

.fab-menu-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fab-menu-item-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.fab-menu-item-icon.primary {
  background: var(--fab-primary);
}

.fab-menu-item-icon.danger {
  background: var(--fab-danger);
}

.fab-menu-item-icon.success {
  background: var(--fab-success);
}

.fab-menu-item-icon.warning {
  background: #f59e0b;
}

.fab-menu-item:hover .fab-menu-item-icon.primary {
  background: var(--fab-primary-hover);
}

.fab-menu-item:hover .fab-menu-item-icon.danger {
  background: var(--fab-danger-hover);
}

.fab-menu-item:hover .fab-menu-item-icon.success {
  background: var(--fab-success-hover);
}

.fab-menu-item-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fab-menu-item-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--fab-text);
}

.fab-menu-item-subtitle {
  font-size: 12px;
  color: var(--fab-text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .fab-container {
    bottom: 16px;
    right: 16px;
  }
  
  .fab-main-btn {
    width: 56px;
    height: 56px;
  }
  
  .fab-menu {
    bottom: 70px;
    right: 0;
  }
  
  .fab-menu-item {
    padding: 10px 16px 10px 12px;
  }
  
  .fab-menu-item-icon {
    width: 36px;
    height: 36px;
  }
  
  .fab-balance-badge {
    font-size: 10px;
    padding: 3px 6px;
    min-width: 40px;
  }
}

/* Animation delays for menu items */
.fab-menu.active .fab-menu-item:nth-child(1) {
  transition-delay: 0.05s;
}

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

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

.fab-menu.active .fab-menu-item:nth-child(4) {
  transition-delay: 0.2s;
}

.fab-menu.active .fab-menu-item:nth-child(5) {
  transition-delay: 0.25s;
}

.fab-menu.active .fab-menu-item:nth-child(6) {
  transition-delay: 0.3s;
}

/* Backdrop when FAB menu is open */
.fab-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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