/**
 * KhataJi Social Chat - WhatsApp Floating Button Styles
 * Modern pill-style floating button matching professional martial arts websites
 * Clean, accessible, responsive, and conversion-focused
 * No external dependencies | Vanilla CSS
 */

:root {
  --khataji-whatsapp-green: #25D366;
  --khataji-transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ============================================
   FLOATING WHATSAPP BUTTON - PILL STYLE
   ============================================ */

#khataji-whatsapp-button {
  position: fixed;
  bottom: 24px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background-color: #25D366;
  color: #ffffff;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35),
              0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--khataji-transition);
  border: none;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}

/* Position */
#khataji-whatsapp-button.right {
  right: 24px;
}

#khataji-whatsapp-button.left {
  left: 24px;
}

/* Size variations (controlled from settings) */
#khataji-whatsapp-button.size-small {
  padding: 10px 16px;
  font-size: 13px;
  gap: 7px;
}

#khataji-whatsapp-button.size-small svg {
  width: 20px;
  height: 20px;
}

#khataji-whatsapp-button.size-medium {
  padding: 14px 22px;
  font-size: 15px;
  gap: 10px;
}

#khataji-whatsapp-button.size-large {
  padding: 16px 26px;
  font-size: 16px;
  gap: 12px;
}

#khataji-whatsapp-button.size-large svg {
  width: 28px;
  height: 28px;
}

/* Hover & Active states - professional feel */
#khataji-whatsapp-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2),
              0 4px 12px rgba(0, 0, 0, 0.15);
  filter: brightness(0.92); /* Works beautifully with any custom color from settings */
}

#khataji-whatsapp-button:active {
  transform: scale(0.98);
}

/* Icon container */
#khataji-whatsapp-button .khataji-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#khataji-whatsapp-button svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  transition: transform 0.3s ease;
}

#khataji-whatsapp-button:hover svg {
  transform: scale(1.1);
}

/* Text label */
#khataji-whatsapp-button .khataji-text {
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Subtle entrance animation */
#khataji-whatsapp-button {
  animation: khatajiPopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes khatajiPopIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  #khataji-whatsapp-button {
    bottom: 18px;
    padding: 12px 18px;
    font-size: 14px;
    gap: 8px;
  }
  
  #khataji-whatsapp-button.right {
    right: 18px;
  }
  
  #khataji-whatsapp-button.left {
    left: 18px;
  }
  
  #khataji-whatsapp-button svg {
    width: 22px;
    height: 22px;
  }
}

/* Very small devices - keep readable */
@media (max-width: 480px) {
  #khataji-whatsapp-button {
    padding: 11px 16px;
    font-size: 13.5px;
  }
  
  #khataji-whatsapp-button svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

#khataji-whatsapp-button:focus {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(37, 211, 102, 0.5);
}

#khataji-whatsapp-button:focus:not(:focus-visible) {
  outline: none;
}

/* Hide on print */
@media print {
  #khataji-whatsapp-button {
    display: none !important;
  }
}

/* ============================================
   INLINE SHORTCODE BUTTON (for pages/posts)
   ============================================ */

.khataji-whatsapp-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: #25D366;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--khataji-transition);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  border: none;
  cursor: pointer;
}

.khataji-whatsapp-inline-btn:hover {
  background-color: #20BA5A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  color: #ffffff;
}

.khataji-whatsapp-inline-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}