/* ============================================================
   HÒA CƯỜNG M&E — Phase 1: Mobile-first Conversion Layer
   Components: sticky bottom CTA bar (mobile) + floating Zalo (desktop+mobile)
              + sticky top hotline ribbon
   Tone: navy #0d4d8c, cam #ff6a00, Zalo blue #0068ff
   ============================================================ */

/* CSS variables - design tokens for Phase 1 components */
:root {
  --hc-navy: #0d4d8c;
  --hc-navy-dark: #093663;
  --hc-orange: #ff6a00;
  --hc-orange-dark: #e25c00;
  --hc-zalo: #0068ff;
  --hc-zalo-dark: #0050cc;
  --hc-messenger: #0084ff;
  --hc-green: #25d366;
  --hc-shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --hc-shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

/* ============================================================
   1. STICKY TOP HOTLINE RIBBON — desktop + mobile (closable)
   ============================================================ */
.hc-hotline-ribbon {
  position: relative;
  background: linear-gradient(90deg, var(--hc-navy) 0%, var(--hc-navy-dark) 100%);
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  text-align: center;
  z-index: 9998;
  line-height: 1.4;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.hc-hotline-ribbon a {
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.hc-hotline-ribbon a:hover { color: #ffd34d !important; }
.hc-hotline-ribbon-icon {
  display: inline-block; width: 16px; height: 16px;
  margin-right: 6px; vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd34d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.hc-ribbon-close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: 0; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  transition: background 0.2s ease;
}
.hc-ribbon-close:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 549px) {
  .hc-hotline-ribbon { font-size: 12.5px; padding: 7px 36px 7px 10px; }
}

/* ============================================================
   2. FLOATING ZALO BUBBLE — desktop + mobile (right-bottom)
   ============================================================ */
.hc-zalo-float {
  position: fixed; right: 16px; bottom: 16px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 12px;
  align-items: flex-end;
}
.hc-zalo-float a {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--hc-zalo); color: #fff;
  box-shadow: var(--hc-shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  text-decoration: none;
}
.hc-zalo-float a:hover {
  transform: scale(1.08);
  box-shadow: var(--hc-shadow-lg);
}
.hc-zalo-float a svg { width: 28px; height: 28px; fill: #fff; }

/* Zalo bubble specifically */
.hc-zalo-bubble { background: var(--hc-zalo); }
.hc-zalo-bubble::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--hc-zalo); opacity: 0.35;
  animation: hcPulse 2s ease-out infinite;
  z-index: -1;
}
@keyframes hcPulse {
  0%   { transform: scale(0.95); opacity: 0.5; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Call bubble (mobile show, desktop hide) */
.hc-call-bubble { background: var(--hc-orange); }

/* Ẩn bubble call trên desktop (đã có hotline ribbon top) */
@media (min-width: 768px) {
  .hc-call-bubble { display: none; }
}

/* Tooltip label trên hover (desktop only) */
@media (min-width: 768px) {
  .hc-zalo-float a::before {
    content: attr(data-label);
    position: absolute; right: 70px;
    background: #1f2937; color: #fff;
    padding: 6px 12px; border-radius: 6px;
    font-size: 13px; font-weight: 500; white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(6px);
  }
  .hc-zalo-float a:hover::before {
    opacity: 1; transform: translateX(0);
  }
}

/* Ẩn float Zalo trên mobile khi sticky bottom bar đang hiện
   (sticky bar đã có nút Zalo riêng — tránh trùng) */
@media (max-width: 767px) {
  .hc-zalo-float { bottom: 72px; } /* nâng lên trên bar 56px */
}

/* ============================================================
   3. STICKY BOTTOM CTA BAR — chỉ mobile (≤767px)
   4 nút: Gọi / Zalo / Messenger / Báo giá
   ============================================================ */
.hc-sticky-cta {
  display: none; /* desktop hide */
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  z-index: 9997;
}
.hc-sticky-cta-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: 100%;
}
.hc-sticky-cta-grid > a {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  text-decoration: none; color: #1f2937;
  font-size: 11px; font-weight: 600;
  border-right: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}
.hc-sticky-cta-grid > a:last-child { border-right: 0; }
.hc-sticky-cta-grid > a:active { background: #f9fafb; }
.hc-sticky-cta-grid > a svg {
  width: 22px; height: 22px;
}
.hc-sticky-cta-grid .hc-cta-icon-call    { color: var(--hc-orange); }
.hc-sticky-cta-grid .hc-cta-icon-zalo    { color: var(--hc-zalo); }
.hc-sticky-cta-grid .hc-cta-icon-fb      { color: var(--hc-messenger); }
.hc-sticky-cta-grid .hc-cta-icon-quote   { color: var(--hc-navy); }

@media (max-width: 767px) {
  .hc-sticky-cta { display: block; }
  /* push body content up so bar không che footer */
  body { padding-bottom: 56px !important; }
}

/* Ẩn các float-contact cũ của Flatsome trên mobile (tránh đè) */
@media (max-width: 767px) {
  .float-contact { display: none !important; }
}
