/* ===============================================
   FLOATING ACTION BUTTON - MODERN & ATTRACTIVE
   =============================================== */

/* Main Container */
.fab-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main FAB Button */
.fab-main {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.fab-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fab-main:hover::before {
  opacity: 1;
}

.fab-main i {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.fab-main:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.fab-main:hover i {
  transform: scale(1.1);
}

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

/* Sub Items Container */
.fab-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.fab-container.open .fab-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Individual FAB Items */
.fab-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 12px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  min-width: 140px;
}

.fab-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
  transition: left 0.6s ease;
}

.fab-item:hover::before {
  left: 100%;
}

.fab-item:hover {
  transform: translateX(-8px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 1);
  color: #333;
}

.fab-item i {
  margin-right: 12px;
  font-size: 1.1rem;
  color: #667eea;
  transition: all 0.3s ease;
}

.fab-item:hover i {
  transform: scale(1.2);
  color: #764ba2;
}

/* Realtime Item Special Styling */
.fab-item.realtime-item {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
}

.fab-item.realtime-item::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.fab-item.realtime-item i {
  color: #ffd700;
}

.fab-item.realtime-item:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
  transform: translateX(-10px) scale(1.08);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  color: white;
}

.fab-item.realtime-item:hover i {
  color: #fff700;
  transform: scale(1.3) rotate(10deg);
}

/* Microsite Item Styling */
.fab-item.microsite-item {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.fab-item.microsite-item::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.fab-item.microsite-item i {
  color: #ffd700;
}

.fab-item.microsite-item:hover {
  background: linear-gradient(135deg, #20c997, #28a745);
  transform: translateX(-8px) scale(1.06);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
  color: white;
}

.fab-item.microsite-item:hover i {
  color: #fff;
  transform: scale(1.2) rotate(15deg);
}

/* WhatsApp Item Styling */
.fab-item.whatsapp-item {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.fab-item.whatsapp-item::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.fab-item.whatsapp-item i {
  color: #fff;
}

.fab-item.whatsapp-item:hover {
  background: linear-gradient(135deg, #128C7E, #25D366);
  transform: translateX(-8px) scale(1.06);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  color: white;
}

.fab-item.whatsapp-item:hover i {
  color: #ffd700;
  transform: scale(1.2) rotate(-10deg);
  animation: whatsapp-bounce 0.6s ease-in-out;
}

@keyframes whatsapp-bounce {
  0%, 100% { transform: scale(1.2) rotate(-10deg); }
  50% { transform: scale(1.4) rotate(-15deg); }
}

/* Email Item Styling */
.fab-item.email-item {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.fab-item.email-item::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.fab-item.email-item i {
  color: #fff;
}

.fab-item.email-item:hover {
  background: linear-gradient(135deg, #c82333, #dc3545);
  transform: translateX(-8px) scale(1.06);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
  color: white;
}

.fab-item.email-item:hover i {
  color: #ffd700;
  transform: scale(1.2) rotate(5deg);
}

/* Login Item Styling */
.fab-item.login-item {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.fab-item.login-item::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.fab-item.login-item i {
  color: #fff;
}

.fab-item.login-item:hover {
  background: linear-gradient(135deg, #0056b3, #007bff);
  transform: translateX(-8px) scale(1.06);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
  color: white;
}

.fab-item.login-item:hover i {
  color: #ffd700;
  transform: scale(1.2) translateX(3px);
}

/* Dashboard Item Styling */
.fab-item.dashboard-item {
  background: linear-gradient(135deg, #6f42c1, #563d7c);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.fab-item.dashboard-item::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.fab-item.dashboard-item i {
  color: #fff;
}

.fab-item.dashboard-item:hover {
  background: linear-gradient(135deg, #563d7c, #6f42c1);
  transform: translateX(-8px) scale(1.06);
  box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4);
  color: white;
}

.fab-item.dashboard-item:hover i {
  color: #ffd700;
  transform: scale(1.2) rotate(10deg);
}

/* Toggle Animation for Main Button */
.fab-container.open .fab-main {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.fab-container.open .fab-main:hover {
  transform: rotate(45deg) scale(1.1);
}

/* Pulse Animation */
@keyframes fab-pulse {
  0% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  70% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 0 0 15px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.fab-main.pulse {
  animation: fab-pulse 2.5s infinite;
}

/* Notification Badge */
.fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #ff4757, #ff3838);
  border: 3px solid white;
  border-radius: 50%;
  font-size: 11px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
  animation: badge-bounce 1s ease-in-out infinite alternate;
}

@keyframes badge-bounce {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.15);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .fab-container {
    bottom: 20px;
    right: 20px;
  }
  
  .fab-main {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }
  
  .fab-item {
    padding: 10px 16px;
    font-size: 0.85rem;
    min-width: 120px;
  }
  
  .fab-item i {
    margin-right: 8px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .fab-container {
    bottom: 15px;
    right: 15px;
  }
  
  .fab-main {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .fab-item {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-width: 110px;
  }
}

/* Smooth entrance animation */
.fab-container {
  animation: fabEnter 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fabEnter {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Hover effect for items */
.fab-item {
  transform-origin: right center;
}

.fab-items .fab-item:nth-child(1) {
  transition-delay: 0.1s;
}

.fab-items .fab-item:nth-child(2) {
  transition-delay: 0.15s;
}

.fab-items .fab-item:nth-child(3) {
  transition-delay: 0.2s;
}

/* Glow effect */
.fab-main::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fab-main:hover::after {
  opacity: 0.3;
}