/* ========== Wrapper ========== */
.via-contact-bubble {
  --width: 48px;
  position: fixed;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Vị trí */
.via-contact-bubble.bottom-right {
  --direction: right;
  --align-items: flex-end;
  --order-bubble: 2;
  --order-bubble-hover: 1;
  --margin: 0 calc(var(--width) * -1) 0 0;
  --padding: 0 calc(var(--width) + 12px) 0 24px;
  right: 20px;
}

.via-contact-bubble.bottom-left {
  --direction: left;
  --align-items: flex-start;
  --order-bubble: 1;
  --order-bubble-hover: 2;
  --margin: 0 0 0 calc(var(--width) * -1);
  --padding: 0 24px 0 calc(var(--width) + 12px);
  left: 20px;
}

/* Bubble wrapper */
.via-contact-bubble .bubble-wrapper {
  display: flex;
  flex-direction: column;
  align-items: var(--align-items);
  gap: inherit;
  position: relative;
}

.via-contact-bubble .bubble-wrapper > div {
  opacity: 0;
  transform: translateY(var(--pos, var(--width)));
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.via-contact-bubble:not(.collapsed) .bubble-wrapper > div {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Toggle */
.via-toggle-bubble {
  width: var(--width);
  height: var(--width);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 5px rgba(0,0,0,0.17);
  color: #333;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 2;
}
.via-toggle-bubble:hover { background: #fff; }

/* Bubble màu */
.zalo      { --via-icon-color: #0180DA; }
.messenger { --via-icon-color: #6f42c1; }
.phone     { --via-icon-color: #34C759; }

/* Bubble */
.bubble {
  width: var(--width);
  height: var(--width);
  border-radius: 50%;
  background: var(--via-icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
  z-index: 1;
}
.bubble:hover { transform: scale(1.15); }
.bubble img {
  width: 70%; height: 70%;
  object-fit: contain;
  border-radius: 50%;
  z-index: 2;
  animation: via-tilt-shake 0.6s ease infinite;
  transition: transform 0.2s ease;
}
.bubble img:hover { transform: scale(1.3); }
.bubble::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  background: var(--via-icon-color);
  border-radius: 50%;
  animation: via-pulse 2.5s ease-in-out infinite;
  opacity: 0;
  z-index: 0;
}

/* Responsive */
@media (max-width:1024px) {
  .via-contact-bubble { bottom: 67px; --width: 40px; gap: 8px; }
  .via-contact-bubble .bubble-wrapper { gap: 8px; }
  .via-contact-bubble.bottom-left { left: 12px; }
  .via-contact-bubble.bottom-right { right: 12px; }
}

/* Animations */
@keyframes via-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.3; }
  50%  { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}
@keyframes via-tilt-shake {
  0%,100% { transform: rotate(0); }
  25%     { transform: rotate(-5deg); }
  50%     { transform: rotate(5deg); }
  75%     { transform: rotate(-5deg); }
}

/* Bubble-type + hover text */
.bubble-type {
  display: flex;
  align-items: center;
  height: var(--width);
}
.bubble-type .bubble { order: var(--order-bubble); }
.bubble-hover {
  visibility: hidden;
  opacity: 0;
  background: var(--via-icon-color);
  color: #fff;
  margin: var(--margin);
  padding: var(--padding);
  border-radius: 24px;
  height: 100%;
  transform: scaleX(0);
  transform-origin: var(--direction);
  transition: transform 0.5s ease, opacity 0.5s ease;
  display: flex;
  align-items: center;
  order: var(--order-bubble-hover);
}
.bubble-type:hover .bubble-hover {
  visibility: visible;
  opacity: 1;
  transform: scaleX(1);
}

/**************************
	Contact list
**************************/

.via-contact-quote {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-width: 360px;
  margin: 20px;
  font-family: sans-serif;
}

.via-contact-quote__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  color: #222;
}

.via-contact-quote__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.via-contact-quote__item {
  margin-bottom: 12px;
}

.via-contact-quote__link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.25s ease;
  border: 1px solid #eee;
}

.via-contact-quote__link:hover {
  background: #0073e6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.via-contact-quote__icon {
  width: 20px;
  height: 20px;
}

.via-contact-quote__text {
  font-size: 16px;
  font-weight: 500;
}