/* ===================================
   FAB (Floating Action Button) Menu
   =================================== */

/* Default (Desktop) */
.fab-container {
  position: absolute;
  right: 12px;
  bottom: 108px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mobile View */
@media (max-width: 768px) {
  .fab-container {
    right: 16px;
  }
}

/* Main FAB button (paper-plane icon) */
.fab-main {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #51a6f5;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(81, 166, 245, 0.5);
  transition: all 0.3s ease;
  z-index: 10;
}

.fab-main:hover {
  background: #2e93e8;
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(81, 166, 245, 0.6);
}

.fab-main i {
  transition: transform 0.3s ease;
}

.fab-container.fab-open .fab-main i {
  transform: none;
}

/* FAB menu (expanded buttons) */
.fab-menu {
  position: absolute;
  bottom: 70px;              /* gap between menu and + button */
  right: 2px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  opacity: 0;
  visibility: hidden;

  transform: translateY(10px) scale(0.95);
  transition: all 0.25s ease;
}

.fab-container.fab-open .fab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.fab-item {
  transition-delay: 0.05s;
}

/* Individual FAB items */
.fab-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  position: relative;
}

.fab-item:hover {
  transform: scale(1.1);
}

/* Add Profile - Teal/Cyan */
.fab-add {
  background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  box-shadow: 0 3px 10px rgba(20, 184, 166, 0.3);
}

.fab-add:hover {
  box-shadow: 0 5px 14px rgba(20, 184, 166, 0.4);
}

/* Download Template - Blue */
.fab-download {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.fab-download:hover {
  box-shadow: 0 5px 14px rgba(59, 130, 246, 0.4);
}

/* Bulk Upload - Green */
.fab-upload {
  background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
}

.fab-upload:hover {
  box-shadow: 0 5px 14px rgba(34, 197, 94, 0.4);
}

/* Tooltip on hover */
.fab-item::before {
  content: attr(title);
  position: absolute;
  right: 54px;
  bottom: 50%;
  transform: translateY(50%);
  background: #1f2937;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  max-width: 180px;
  text-overflow: ellipsis;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.fab-item:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Post count below FAB */
.customform-post-count {
  margin-top: 8px;
  text-align: center;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .fab-main {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .fab-item {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .fab-menu {
    gap: 10px;
    bottom: 56px;
  }
}
