:root {
  --popup-green: #25D366;
  --popup-green-dark: #128C7E;
  --popup-blue: #007bff;
  --popup-blue-dark: #0056b3;
  --popup-tg: #0088cc;
  --popup-tg-dark: #006699;
  --popup-skype: #00aff0;
  --popup-skype-dark: #0078a0;
  --popup-fb: #1877F2;
  --popup-fb-dark: #145DBF;
  --popup-header-bg: #128C7E;
  --popup-header-color: #fff;
 }

/* === Floating launcher === */
#chatcall-popup-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--popup-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 9999;
  transition: background-color 0.2s ease;
  animation: pulseAnim 2s infinite;
}
#chatcall-popup-btn:hover {
  background-color: var(--popup-green-dark);
  animation: none;
}

/* === Pulse animation === */
@keyframes pulseAnim {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(37,211,102,0.6); }
  70%  { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37,211,102,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* === Popup box === */
#chatcall-box {
  position: fixed;
  bottom: 90px;
  left: 20px;
  width: 280px;
  max-width: 90%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  font-family: sans-serif;
  z-index: 9999;
  overflow: hidden;

  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.25,.8,.25,1);
}
#chatcall-box.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  animation: bounceIn .4s ease;
}
@keyframes bounceIn {
  0%   { transform: translateY(20px) scale(0.9); opacity: 0; }
  60%  { transform: translateY(-5px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
#chatcall-box.closing {
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
}

/* === Header bar === */
#chatcall-box header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--popup-header-bg);
  color: var(--popup-header-color);
  font-weight: bold;
  padding: 10px;
  height: 45px;
  box-sizing: border-box;
}
#chatcall-box header span {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}

/* Close button */
#chatcall-close {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  color: var(--popup-header-color);
}
#chatcall-close:hover { color: #ff4444; }

/* Layout direction helpers */
.layout-auto { direction: inherit; }
.layout-ltr  { direction: ltr !important; }
.layout-rtl  { direction: rtl !important; }

/* === Popup body === */
#chatcall-box .body {
  padding: 15px;
  font-size: 14px;
  color: #333;
}
#chatcall-box textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 6px;
  resize: none;
}

/* === Channel icons layout === */
.channel-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.channel-icons button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transition: transform .2s ease, background-color .25s ease;
}
.channel-icons button:hover { transform: scale(1.08); }

/* === SVG icon size === */
.channel-icons button svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

/* === Brand colours (keep these) === */
.btn-whatsapp  { background-color: var(--popup-green); }
.btn-whatsapp:hover  { background-color: var(--popup-green-dark); }

.btn-telegram  { background-color: var(--popup-tg); }
.btn-telegram:hover  { background-color: var(--popup-tg-dark); }

.btn-skype  { background-color: var(--popup-skype); }
.btn-skype:hover  { background-color: var(--popup-skype-dark); }

.btn-facebook  { background-color: var(--popup-fb); }
.btn-facebook:hover  { background-color: var(--popup-fb-dark); }

.btn-xmpp  { background-color: #444; }
.btn-xmpp:hover  { background-color: #222; }

.btn-call  { background-color: var(--popup-blue); }
.btn-call:hover  { background-color: var(--popup-blue-dark); }
/* Improve visibility of white phone icon on blue */
/* Make handset thicker but keep blue background visible */
.btn-call svg path {
  fill: none;             /* clear inside—no white blob */
  stroke: #ffffff;        /* draw lines in white */
  stroke-width: 1.0;      /* control thickness */
  stroke-linecap: round;  /* smoother ends */
  stroke-linejoin: round;
}

/* === Force visible icons inside coloured circles === */
#chatcall-box .channel-icons button svg path {
  fill: #ffffff !important;  /* white icons for contrast */
}

/* Focus outline for accessibility */
button:focus {
  outline: 2px solid #99cc00;
  outline-offset: 2px;
}

/* === Responsive === */
@media (max-width:400px){
  #chatcall-box { left:10px; right:10px; width:auto; }
}
.btn-whatsapp svg {
  width: 30px;
  height: 30px;
}

