﻿.qc-floating-wrap {
  position: fixed;
  bottom: var(--qc-offset-bottom, 20px);
  z-index: 99999;
  display: flex;
  align-items: center;
}

.qc-floating-wrap.qc-right { right: var(--qc-offset-side, 20px); }
.qc-floating-wrap.qc-left { left: var(--qc-offset-side, 20px); }

.qc-toggle,
.qc-btn {
  width: var(--qc-btn-size, 48px);
  height: var(--qc-btn-size, 48px);
  border: 0;
  border-radius: var(--qc-btn-radius, 999px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.qc-floating-list {
  display: flex;
  gap: var(--qc-btn-gap, 12px);
}

.qc-btn {
  position: relative;
  transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.qc-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.qc-btn:active { transform: translateY(0) scale(0.97); }

.qc-btn .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 2;
}

.qc-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
}

.qc-toggle {
  background: var(--qc-toggle-color, #5a55ea);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}
.qc-toggle .dashicons { position: relative; z-index: 2; }

/* Attention effects: ring + shake */
.qc-floating-wrap .qc-btn::before,
.qc-floating-wrap .qc-btn::after,
.qc-floating-wrap .qc-toggle::before,
.qc-floating-wrap .qc-toggle::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: var(--qc-item-bg, var(--qc-toggle-color, #5a55ea));
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.qc-floating-wrap[data-attention-effect="pulse"] .qc-btn::before,
.qc-floating-wrap[data-attention-effect="pulse"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse"] .qc-toggle::before,
.qc-floating-wrap[data-attention-effect="pulse"] .qc-toggle::after,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-btn::before,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-toggle::before,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-toggle::after,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-btn::before,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-toggle::before,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-toggle::after,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-btn::before,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-toggle::before,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-toggle::after {
  animation: qc-ring-pulse 2.2s ease-out infinite;
}

.qc-floating-wrap[data-attention-effect="pulse"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse"] .qc-toggle::after,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-toggle::after,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-toggle::after,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-btn::after,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-toggle::after {
  animation-delay: 0.9s;
}

.qc-floating-wrap[data-attention-effect="shake"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="shake"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="shake"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="shake"] .qc-toggle .qc-icon-img,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="pulse_shake"] .qc-toggle .qc-icon-img {
  transform-origin: 50% 60%;
  animation: qc-icon-shake 2.4s ease-in-out infinite;
}

.qc-floating-wrap[data-attention-effect="heartbeat"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="heartbeat"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="heartbeat"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="heartbeat"] .qc-toggle .qc-icon-img,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="pulse_heartbeat"] .qc-toggle .qc-icon-img {
  animation: qc-icon-heartbeat 1.8s ease-in-out infinite;
}

.qc-floating-wrap[data-attention-effect="tada"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="tada"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="tada"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="tada"] .qc-toggle .qc-icon-img,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="pulse_tada"] .qc-toggle .qc-icon-img {
  animation: qc-icon-tada 2.2s ease-in-out infinite;
}

.qc-floating-wrap[data-attention-effect="swing"] .qc-btn .dashicons,
.qc-floating-wrap[data-attention-effect="swing"] .qc-toggle .dashicons,
.qc-floating-wrap[data-attention-effect="swing"] .qc-btn .qc-icon-img,
.qc-floating-wrap[data-attention-effect="swing"] .qc-toggle .qc-icon-img {
  transform-origin: 50% 0%;
  animation: qc-icon-swing 2.1s ease-in-out infinite;
}

.qc-floating-wrap[data-attention-effect="glow"] .qc-btn,
.qc-floating-wrap[data-attention-effect="glow"] .qc-toggle {
  animation: qc-glow 1.8s ease-in-out infinite;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn.qc-center-item::before,
.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn.qc-center-item::after {
  display: none;
}

/* In callbar layout, only center button (toggle) gets attention effects */
.qc-floating-wrap.qc-layout-bottom-callbar[data-attention-effect]:not([data-attention-effect="none"]) .qc-btn::before,
.qc-floating-wrap.qc-layout-bottom-callbar[data-attention-effect]:not([data-attention-effect="none"]) .qc-btn::after {
  animation: none !important;
  opacity: 0 !important;
}

.qc-floating-wrap.qc-layout-bottom-callbar[data-attention-effect]:not([data-attention-effect="none"]) .qc-btn .dashicons,
.qc-floating-wrap.qc-layout-bottom-callbar[data-attention-effect]:not([data-attention-effect="none"]) .qc-btn .qc-icon-img,
.qc-floating-wrap.qc-layout-bottom-callbar[data-attention-effect="glow"] .qc-btn {
  animation: none !important;
}

.qc-toggle:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26); }
.qc-floating-wrap.is-collapsed .qc-toggle { transform: rotate(0deg); }
.qc-floating-wrap:not(.is-collapsed) .qc-toggle { transform: rotate(45deg); }
.qc-floating-wrap[data-show-toggle="0"]:not(.qc-layout-bottom-callbar) .qc-toggle { display: none !important; }

.qc-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%) translateX(6px);
  background: rgba(28, 33, 46, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 8px;
  padding: 6px 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.18s ease;
}

.qc-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -4px;
  width: 8px;
  height: 8px;
  background: rgba(28, 33, 46, 0.95);
  transform: translateY(-50%) rotate(45deg);
}

.qc-btn:hover .qc-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.qc-floating-wrap.qc-left .qc-tooltip {
  left: calc(100% + 10px);
  right: auto;
  transform: translateY(-50%) translateX(-6px);
}

.qc-floating-wrap.qc-left .qc-tooltip::after {
  left: -4px;
  right: auto;
}

.qc-floating-wrap.qc-left .qc-btn:hover .qc-tooltip {
  transform: translateY(-50%) translateX(0);
}

/* Layout: vertical */
.qc-floating-wrap.qc-layout-vertical {
  flex-direction: column;
  gap: var(--qc-btn-gap, 12px);
}

.qc-floating-wrap.qc-layout-vertical .qc-toggle { order: 1; }
.qc-floating-wrap.qc-layout-vertical .qc-floating-list {
  order: 2;
  flex-direction: column;
  gap: var(--qc-btn-gap, 12px);
}

/* Layout: bottom bar */
.qc-floating-wrap.qc-layout-bottom {
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  transform: none;
  flex-direction: row;
  gap: 0;
  bottom: 0 !important;
}

.qc-floating-wrap.qc-layout-bottom .qc-floating-list {
  order: 1;
  flex-direction: row;
  gap: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  width: 100%;
}

.qc-floating-wrap.qc-layout-bottom .qc-btn,
.qc-floating-wrap.qc-layout-bottom .qc-toggle {
  border-radius: 0 !important;
  background: var(--qc-toggle-color, #5a55ea) !important;
  box-shadow: none;
  flex: 1 1 auto;
  min-width: 44px;
  width: 100%;
  height: var(--qc-btn-size, 48px);
}

.qc-floating-wrap.qc-layout-bottom .qc-btn + .qc-btn {
  margin-left: 0;
}

.qc-floating-wrap.qc-layout-bottom .qc-toggle {
  order: 1;
  margin-left: 0;
  flex: 1 1 auto;
}

.qc-floating-wrap.qc-layout-bottom .qc-toggle,
.qc-floating-wrap.qc-layout-bottom.is-collapsed .qc-toggle,
.qc-floating-wrap.qc-layout-bottom:not(.is-collapsed) .qc-toggle {
  transform: none !important;
}

.qc-floating-wrap.qc-layout-bottom .qc-tooltip {
  top: auto;
  bottom: calc(100% + 10px);
  right: 50%;
  left: auto;
  transform: translateX(50%) translateY(4px);
}

.qc-floating-wrap.qc-layout-bottom .qc-tooltip::after {
  top: auto;
  bottom: -4px;
  right: 50%;
  transform: translateX(50%) rotate(45deg);
}

.qc-floating-wrap.qc-layout-bottom .qc-btn:hover .qc-tooltip {
  transform: translateX(50%) translateY(0);
}

/* Layout: bottom call bar */
.qc-floating-wrap.qc-layout-bottom-callbar {
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  transform: none;
  bottom: 0 !important;
  justify-content: center;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-floating-list {
  width: 100%;
  display: flex;
  gap: 0;
  justify-content: space-around;
  align-items: flex-end;
  background: url('../images/mb-footer-bg.svg') center top / cover no-repeat;
  padding: 16px 10px 10px;
  box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.08);
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn {
  flex: 1 1 20%;
  min-width: 58px;
  width: auto;
  height: auto;
  padding: 0 2px;
  background: transparent !important;
  box-shadow: none;
  border-radius: 0 !important;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  color: #1f2937;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn .dashicons {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  background: var(--qc-item-bg, #0ea5e9);
  margin: 0 auto;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn .qc-icon-img {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 999px;
  background: var(--qc-item-bg, #0ea5e9);
  margin: 0 auto;
  display: block;
  object-fit: contain;
  box-sizing: border-box;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn .qc-tooltip {
  opacity: 1;
  visibility: visible;
  position: static;
  transform: none !important;
  background: transparent;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn .qc-tooltip::after {
  display: none;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn:hover {
  transform: none;
  box-shadow: none;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-toggle {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%) !important;
  width: calc(var(--qc-btn-size, 48px) + 10px);
  height: calc(var(--qc-btn-size, 48px) + 10px);
  border-radius: 999px !important;
  border: 4px solid #dbeafe;
  background: var(--qc-toggle-color, #5a55ea);
  box-shadow: 0 12px 22px rgba(168, 85, 247, 0.3);
  z-index: 2;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-toggle .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-toggle .qc-icon-img {
  width: 20px;
  height: 20px;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-toggle .qc-center-label {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  background: #0b67c2;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  padding: 3px 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(11, 103, 194, 0.38);
  z-index: 3;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-toggle,
.qc-floating-wrap.qc-layout-bottom-callbar.is-collapsed .qc-toggle,
.qc-floating-wrap.qc-layout-bottom-callbar:not(.is-collapsed) .qc-toggle {
  transform: translateX(-50%) !important;
}

.qc-floating-wrap.qc-layout-bottom-callbar.is-collapsed .qc-btn {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn[data-action="phone"] .dashicons {
  opacity: 1;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn[data-action="phone"] .qc-tooltip {
  color: #111827;
  font-weight: 600;
}

.qc-floating-wrap.qc-layout-bottom-callbar .qc-btn.qc-center-item {
  display: none !important;
}

@media (max-width: 420px) {
  .qc-floating-wrap.qc-layout-bottom-callbar .qc-floating-list {
    padding-left: 6px;
    padding-right: 6px;
  }
  .qc-floating-wrap.qc-layout-bottom-callbar .qc-btn .qc-tooltip {
    font-size: 11px;
  }
}

/* Effects */
.qc-floating-wrap.qc-effect-zoom .qc-btn { transition-delay: calc(var(--i, 0) * 40ms); }
.qc-floating-wrap.qc-effect-zoom.is-collapsed .qc-btn { opacity: 0; transform: translateY(8px) scale(0.78); pointer-events: none; }

.qc-floating-wrap.qc-effect-slide .qc-btn { transition-delay: calc(var(--i, 0) * 34ms); }
.qc-floating-wrap.qc-effect-slide.is-collapsed .qc-btn { opacity: 0; transform: translateX(14px); pointer-events: none; }
.qc-floating-wrap.qc-left.qc-effect-slide.is-collapsed .qc-btn { transform: translateX(-14px); }

.qc-floating-wrap.qc-effect-fade .qc-btn { transition-delay: calc(var(--i, 0) * 30ms); }
.qc-floating-wrap.qc-effect-fade.is-collapsed .qc-btn { opacity: 0; transform: scale(0.92); pointer-events: none; }

.qc-floating-wrap.qc-effect-bounce .qc-btn { transition-delay: calc(var(--i, 0) * 42ms); }
.qc-floating-wrap.qc-effect-bounce:not(.is-collapsed) .qc-btn { animation: qc-bounce-in 0.52s cubic-bezier(0.2, 0.9, 0.32, 1.2) both; animation-delay: calc(var(--i, 0) * 46ms); }
.qc-floating-wrap.qc-effect-bounce.is-collapsed .qc-btn { opacity: 0; transform: translateY(10px) scale(0.7); pointer-events: none; }

.qc-floating-wrap.qc-effect-elastic .qc-btn { transition-delay: calc(var(--i, 0) * 44ms); }
.qc-floating-wrap.qc-effect-elastic:not(.is-collapsed) .qc-btn { animation: qc-elastic-in 0.68s cubic-bezier(0.22, 1.4, 0.36, 1) both; animation-delay: calc(var(--i, 0) * 50ms); }
.qc-floating-wrap.qc-effect-elastic.is-collapsed .qc-btn { opacity: 0; transform: scale(0.55); pointer-events: none; }

@keyframes qc-ring-pulse {
  0% { opacity: 0.42; transform: scale(0.72); }
  70% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.72); }
}

@keyframes qc-icon-shake {
  0%, 60%, 100% { transform: rotate(0deg); }
  64% { transform: rotate(-16deg); }
  68% { transform: rotate(12deg); }
  72% { transform: rotate(-9deg); }
  76% { transform: rotate(6deg); }
  80% { transform: rotate(0deg); }
}

@keyframes qc-icon-heartbeat {
  0%, 28%, 100% { transform: scale(1); }
  10% { transform: scale(1.16); }
  18% { transform: scale(0.96); }
}

@keyframes qc-icon-tada {
  0%, 100% { transform: scale(1) rotate(0deg); }
  8%, 16% { transform: scale(0.9) rotate(-6deg); }
  24%, 32%, 40% { transform: scale(1.1) rotate(6deg); }
  48% { transform: scale(1) rotate(0deg); }
}

@keyframes qc-icon-swing {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(12deg); }
  40% { transform: rotate(-8deg); }
  60% { transform: rotate(5deg); }
  80% { transform: rotate(-3deg); }
}

@keyframes qc-glow {
  0%, 100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.25), 0 14px 30px rgba(0, 0, 0, 0.26); }
}

@keyframes qc-bounce-in {
  0% { opacity: 0; transform: translateY(16px) scale(0.65); }
  55% { opacity: 1; transform: translateY(-4px) scale(1.08); }
  78% { transform: translateY(2px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes qc-elastic-in {
  0% { opacity: 0; transform: scale(0.45); }
  48% { opacity: 1; transform: scale(1.16); }
  68% { transform: scale(0.9); }
  84% { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}


.qc-cf7-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}

.qc-cf7-modal.is-open {
  display: block;
}

.qc-cf7-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.qc-cf7-dialog {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  margin: 24px auto;
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.qc-cf7-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #eef1f8;
  color: #333;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.qc-cf7-fallback {
  font-size: 15px;
  color: #2e3340;
  padding: 8px 0;
}

.qc-text-popup-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
}

.qc-text-popup-body {
  font-size: 15px;
  line-height: 1.62;
  color: #1f2937;
}

.qc-text-popup-cta {
  margin: 16px 0 0;
}

.qc-text-popup-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #4f46e5;
  color: #fff;
  text-decoration: none;
}

.qc-text-popup-cta a .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.qc-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: #222a3b;
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 100001;
  opacity: 0;
  transition: all 0.2s ease;
}

.qc-copy-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.qc-copy-toast.is-error {
  background: #b42318;
}
