/* Mobile Contact Bar + Desktop AIO - v1.6 */
* { box-sizing: border-box; }

/* Never show the desktop AIO on mobile/tablet */
.mcbb-aio { display:none; }

/* ================= DESKTOP AIO - inspired by Vũ Trụ Số layout ================= */
@media (min-width: 992px) {
  .mcbb-aio {
    display:block !important;
    position:fixed !important;
    right:10px;
    bottom:140px;
    width:60px;
    height:60px;
    z-index:2147483000 !important;
    line-height:1 !important;
    font-family:Arial,Helvetica,sans-serif !important;
  }
  .mcbb-aio.left { right:auto; left:10px; }

  .mcbb-aio-menu {
    position:absolute;
    right:0;
    bottom:70px;
    width:235px;
    padding:14px 0;
    background:#fff;
    border-radius:7px;
    box-shadow:0 0 10px rgba(0,0,0,.28);
    transform-origin:80% 105%;
    transform:scale(0);
    opacity:0;
    visibility:hidden;
    transition:transform .16s ease-out,opacity .12s ease-out,visibility .16s;
    z-index:10000;
  }
  .mcbb-aio.left .mcbb-aio-menu { left:0; right:auto; transform-origin:20% 105%; }
  .mcbb-aio-menu:before {
    content:"";
    position:absolute;
    bottom:-7px;
    right:21px;
    border-right:8px solid transparent;
    border-top:8px solid #fff;
    border-left:8px solid transparent;
  }
  .mcbb-aio.left .mcbb-aio-menu:before { left:21px; right:auto; }
  .mcbb-aio.is-open .mcbb-aio-menu { transform:scale(1); opacity:1; visibility:visible; }

  .mcbb-aio-link {
    position:relative;
    display:flex;
    align-items:center;
    width:100%;
    min-height:54px;
    padding:8px 20px 8px 60px;
    margin:0;
    text-decoration:none !important;
    color:rgba(0,0,0,.87) !important;
    background:#fff;
    font-size:14px;
  }
  .mcbb-aio-link:hover { background:#f1f1f1; }
  .mcbb-aio-link > span:last-child { color:rgba(0,0,0,.87) !important; }
  .mcbb-aio-icon {
    position:absolute;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    width:40px;
    height:40px;
    border-radius:50%;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .mcbb-aio-icon img {
    display:block !important;
    width:40px !important;
    height:40px !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:contain !important;
    margin:0 !important;
  }

  .mcbb-aio-button {
    position:absolute !important;
    inset:0 !important;
    width:60px !important;
    height:60px !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    border-radius:50% !important;
    background:var(--mcbb-aio-color,#185137) !important;
    color:#fff !important;
    cursor:pointer;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    box-shadow:none !important;
    z-index:10002 !important;
  }
  .mcbb-aio-static {
    width:60px;
    height:60px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    transition:.2s ease;
  }
  .mcbb-aio-static strong { color:#fff !important; font-size:10px !important; line-height:11px !important; font-weight:700 !important; }
  .mcbb-aio-bubble { color:#fff !important; font-size:22px !important; line-height:22px !important; transform:rotate(-8deg); }
  .mcbb-aio-close {
    position:absolute;
    width:16px;
    height:16px;
    right:22px;
    top:22px;
    color:#fff;
    font-size:24px;
    line-height:14px;
    opacity:0;
    transform:rotate(180deg) scale(0);
    transition:.15s ease;
  }
  .mcbb-aio.is-open .mcbb-aio-static { opacity:0; transform:scale(0); }
  .mcbb-aio.is-open .mcbb-aio-close { opacity:1; transform:rotate(0) scale(1); }
  .mcbb-aio-pulse {
    position:absolute;
    width:74px;
    height:74px;
    left:-7px;
    top:-7px;
    border-radius:50%;
    background:var(--mcbb-aio-color,#185137);
    opacity:.28;
    z-index:-1;
    animation:mcbb-aio-pulse 2s infinite;
    pointer-events:none;
  }
  .mcbb-aio-pulse:nth-of-type(2) { animation-delay:.5s; }
  @keyframes mcbb-aio-pulse {
    0% { transform:scale(.75); opacity:.45; }
    70% { transform:scale(1.15); opacity:0; }
    100% { transform:scale(1.15); opacity:0; }
  }
}

/* ================= MOBILE BAR ================= */
@media (max-width:991px) {
  .mcbb-bar {
    position:fixed !important;
    left:0 !important; right:0 !important; bottom:0 !important;
    width:100% !important; height:76px !important;
    z-index:2147483000 !important;
    display:grid !important;
    grid-template-columns:repeat(5,1fr) !important;
    align-items:end !important;
    padding:0 0 env(safe-area-inset-bottom) !important;
    background:#fff !important;
    border-top:1px solid #e8e8e8 !important;
    box-shadow:0 -3px 14px rgba(0,0,0,.12) !important;
    font-family:Arial,Helvetica,sans-serif !important;
  }
  .mcbb-bar .mcbb-item { height:72px !important; padding:4px 1px 7px !important; display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:flex-end !important; gap:3px !important; background:transparent !important; border:0 !important; color:#333 !important; text-decoration:none !important; font-size:12px !important; line-height:16px !important; }
  .mcbb-image-icon { width:42px !important; height:42px !important; border-radius:50% !important; overflow:hidden !important; display:flex !important; align-items:center !important; justify-content:center !important; }
  .mcbb-image-icon img { width:100% !important; height:100% !important; object-fit:contain !important; margin:0 !important; }
  .mcbb-call { width:100% !important; height:76px !important; padding:0 !important; display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:flex-start !important; text-decoration:none !important; }
  .mcbb-call-circle { width:54px !important; height:54px !important; margin:-13px 0 0 !important; border:3px solid #fff !important; border-radius:50% !important; overflow:hidden !important; background:#0873fd !important; box-shadow:0 2px 12px rgba(0,0,0,.25) !important; display:flex !important; align-items:center !important; justify-content:center !important; }
  .mcbb-call-circle img { width:100% !important; height:100% !important; object-fit:contain !important; }
  .mcbb-call-label { width:76px !important; height:27px !important; margin:-1px 0 0 !important; padding:4px 5px !important; border-radius:10px !important; background:#008bc4 !important; color:#fff !important; font-size:12px !important; font-weight:700 !important; line-height:19px !important; text-align:center !important; }
  body { padding-bottom:76px !important; }
}
