/* SMS/Call pill — bottom-right pill button with modal popup */

#sms-call-pill {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  transform: translateX(140%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

#sms-call-pill.visible { 
  transform: translateX(0); 
  opacity: 1; 
}

/* Main pill trigger button - properly pill-shaped */
.sms-call-pill-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 24px;
  border: none !important;
  border-radius: 50px !important; /* Perfect pill shape */
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  min-width: 120px;
  white-space: nowrap;
  text-decoration: none !important;
  outline: none !important;
}

/* Size variations for the pill button */
.sms-call-pill-trigger.size-small {
  padding: 10px 18px;
  font-size: 12px;
  min-width: 100px;
  gap: 6px;
}

.sms-call-pill-trigger.size-medium {
  padding: 14px 24px;
  font-size: 14px;
  min-width: 120px;
  gap: 8px;
}

.sms-call-pill-trigger.size-large {
  padding: 18px 30px;
  font-size: 16px;
  min-width: 140px;
  gap: 10px;
}

.sms-call-pill-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.sms-call-pill-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  margin-left: 4px;
}

#sms-call-pill.expanded .sms-call-pill-arrow {
  transform: rotate(180deg);
}

/* Modal popup - positioned as tooltip above button */
.sms-call-modal {
  position: absolute;
  bottom: 100%;
  right: 0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  pointer-events: none;
}

.sms-call-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Remove backdrop for tooltip style */
.sms-call-modal-backdrop {
  display: none;
}

/* Modal content - tooltip style */
.sms-call-modal-content {
  position: relative;
  background: #1DA1F2;
  border-radius: 16px;
  padding: 16px;
  min-width: 180px;
  max-width: 250px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: translateY(10px) scale(0.95);
  transition: all 0.3s ease;
}

/* Tooltip arrow pointing down to button */
.sms-call-modal-content::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #1DA1F2;
}

.sms-call-modal.active .sms-call-modal-content {
  transform: translateY(0) scale(1);
}

/* Modal items - smaller for tooltip */
.sms-call-modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

.sms-call-modal-item:last-child {
  margin-bottom: 0;
}

.sms-call-modal-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.sms-call-modal-item:active {
  transform: translateX(2px) scale(0.98);
}

/* Modal icons - smaller for tooltip */
.sms-call-modal-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sms-call-modal-text {
  font-size: 14px;
  font-weight: 500;
}

/* Call item specific styling */
.call-item:hover .sms-call-modal-icon {
  background: rgba(34, 197, 94, 0.3);
}

/* SMS item specific styling */
.sms-item:hover .sms-call-modal-icon {
  background: rgba(59, 130, 246, 0.3);
}

/* Mobile responsive - tooltip adjustments */
@media (max-width: 480px) {
  #sms-call-pill {
    right: 16px;
    bottom: 16px;
  }
  
  .sms-call-pill-trigger { 
    padding: 12px 20px;
    font-size: 13px;
    min-width: 100px;
  }
  
  .sms-call-modal-content {
    min-width: 160px;
    max-width: 200px;
    padding: 12px;
  }
  
  .sms-call-modal-item {
    padding: 10px 12px;
    font-size: 13px;
    gap: 10px;
  }
  
  .sms-call-modal-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  /* Adjust arrow position for mobile */
  .sms-call-modal-content::after {
    right: 20px;
  }
}

/* Animation for modal entrance */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sms-call-modal.active .sms-call-modal-content {
  animation: modalSlideIn 0.3s ease forwards;
}