/**
 * Floating Contact Widget Styles (Compact & Clean Pill Bar)
 */
.qc-bar-widget {
  box-sizing: border-box;
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  background: #ffffff;
  border-radius: 28px;
  padding: 8px 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 99999;
  border: 1px solid rgba(226, 232, 240, 0.85);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: all 0.25s ease;
}

.qc-bar-widget * {
  box-sizing: border-box;
}

/* Individual Item */
.qc-bar-widget .qc-contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  padding: 3px 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.qc-bar-widget .qc-contact-item:hover {
  transform: scale(1.08);
}

/* Icon Wrap: White circle with pale halo border around it */
.qc-bar-widget .qc-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

/* 1. Phone: Solid vivid green with soft green outer glow/ring */
.qc-bar-widget .qc-bg-phone {
  background: #1cb053;
  color: #ffffff;
  font-size: 15px;
  border: 2.5px solid #d4f7dc;
}

/* 2. Zalo: White interior, bold 2px royal blue circle border, blue italic text */
.qc-bar-widget .qc-bg-zalo {
  background: #ffffff;
  border: 2px solid #0068ff;
  outline: 2px solid #ddecff;
  color: #0068ff;
}

.qc-bar-widget .qc-zalo-text {
  font-size: 10.5px;
  font-weight: 800;
  font-style: italic;
  font-family: sans-serif;
  letter-spacing: -0.3px;
  color: #0068ff;
  line-height: 1;
}

/* 3. Facebook: Official Royal Blue with soft blue halo border */
.qc-bar-widget .qc-bg-facebook,
.qc-bar-widget .qc-bg-messenger {
  background: #1877f2;
  color: #ffffff;
  font-size: 16px;
  border: 2.5px solid #dbeafe;
}

/* 4. Chat (LiveChat): Teal/Emerald green with soft cyan halo */
.qc-bar-widget .qc-bg-livechat {
  background: #00a884;
  color: #ffffff;
  font-size: 15px;
  border: 2.5px solid #d0f7ef;
}

/* 5. Custom Button */
.qc-bar-widget .qc-bg-custom {
  background: #2563eb;
  color: #ffffff;
  font-size: 15px;
  border: 2.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.qc-bar-widget .qc-bg-custom img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.qc-bar-widget .qc-bg-custom svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Text label underneath each circle */
.qc-bar-widget .qc-text {
  font-size: 9.5px;
  font-weight: 700;
  color: #334155;
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

/* Subtle fading separator line between items */
.qc-bar-widget .qc-separator {
  width: 26px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(203, 213, 225, 0.7), transparent);
  margin: 4px 0;
}

/* Mobile responsive - Sleek Bottom Glassmorphism Dock */
@media (max-width: 768px) {
  .qc-bar-widget {
    top: auto !important;
    right: auto !important;
    left: 50% !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px) !important;
    max-width: 390px !important;
    min-height: auto !important;
    height: auto !important;
    border-radius: 24px !important;
    padding: 10px 8px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px 4px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2), 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    z-index: 99999 !important;
  }

  .qc-bar-widget .qc-separator {
    display: none !important;
  }

  .qc-bar-widget .qc-contact-item {
    /* Exactly 4 items per row, centered */
    flex: 0 0 24% !important;
    max-width: 24% !important;
    width: 24% !important;
    padding: 2px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .qc-bar-widget .qc-icon-wrap {
    width: 42px !important;
    height: 42px !important;
    border-width: 2.5px !important;
  }

  .qc-bar-widget .qc-bg-phone,
  .qc-bar-widget .qc-bg-facebook,
  .qc-bar-widget .qc-bg-messenger {
    font-size: 17px !important;
  }

  .qc-bar-widget .qc-bg-livechat {
    font-size: 17px !important;
  }

  .qc-bar-widget .qc-zalo-text {
    font-size: 11.5px !important;
  }

  .qc-bar-widget .qc-bg-custom img {
    width: 22px !important;
    height: 22px !important;
  }

  .qc-bar-widget .qc-bg-custom svg,
  .qc-bar-widget .qc-bg-custom div {
    width: 22px !important;
    height: 22px !important;
  }

  .qc-bar-widget .qc-text {
    font-size: 10.5px !important;
    margin-top: 4px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    letter-spacing: -0.2px !important;
    line-height: 1.15 !important;
  }
}

/* Hide ONLY the minimized round bubble & attention grabber, leave the chat window header & close button intact */
.tawk-min-container,
.tawk-bubble-container,
.tawk-custom-bubble,
.tawk-attention-grabber,
#tawk-default-container,
[id*="tawk-bubble"],
[class*="tawk-bubble"],
[class*="attention-grabber"],
div[style*="bottom: 0px"][style*="right: 0px"]:not(:has(iframe[style*="height: 100%"])):not(:has(iframe[height="100%"])):not(:has(iframe[style*="height: 5"])):not(:has(iframe[style*="height: 6"])) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide all floating contact widgets and livechat embeds when printing or exporting to PDF */
@media print {
  .qc-bar-widget,
  #tawk-default-container,
  [class*="tawk"],
  [id*="tawk"],
  iframe[src*="tawk.to"],
  iframe[title*="chat"],
  .contact-modal-popup,
  div[role="dialog"][aria-modal="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

