/* ==========================================================================
   VMT Floating Contact Button - BEM CSS Architecture
   Block ID: #vmt-contact | Block Class: .vmt-contact
   Elements: .vmt-contact__list, .vmt-contact__item, .vmt-contact__link,
             .vmt-contact__label, .vmt-contact__icon, .vmt-contact__trigger, .vmt-contact__ping
   Modifiers: .vmt-contact--open, .vmt-contact--closed, .vmt-contact--left, .vmt-contact--right,
              .vmt-contact__link--[type]
   ========================================================================== */

/* Block Component (Default: Right Side) */
#vmt-contact,
.vmt-contact {
    position: fixed;
    bottom: 1rem;
    right: 0.625rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.625rem;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

@media (min-width: 768px) {
    #vmt-contact,
    .vmt-contact {
        bottom: 2.5rem;
        right: 2rem;
    }
}

/* Modifier: Position Left */
#vmt-contact.vmt-contact--left,
.vmt-contact--left {
    right: auto;
    left: 0.625rem;
    align-items: flex-start;
}

@media (min-width: 768px) {
    #vmt-contact.vmt-contact--left,
    .vmt-contact--left {
        right: auto;
        left: 2rem;
    }
}

/* List Element */
.vmt-contact__list {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.625rem);
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: flex-end;
    pointer-events: none;
}

.vmt-contact--left .vmt-contact__list {
    right: auto;
    left: 0;
    align-items: flex-start;
}

.vmt-contact--open .vmt-contact__list,
#vmt-contact.vmt-contact--open .vmt-contact__list {
    pointer-events: auto;
}

/* Item Element */
.vmt-contact__item {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.95);
    pointer-events: none;
    transition: all 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--vmt-delay, 0ms);
}

.vmt-contact--open .vmt-contact__item,
#vmt-contact.vmt-contact--open .vmt-contact__item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Link Element */
.vmt-contact__link {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 200ms ease-out;
}

.vmt-contact__link:hover {
    transform: scale(1.05);
}

/* Modifiers for Link Gradients */
.vmt-contact__link--email {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 55%, #1e40af 100%);
}
.vmt-contact__link--email:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 45%, #1d4ed8 100%);
}

.vmt-contact__link--phone {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 55%, #166534 100%);
}
.vmt-contact__link--phone:hover {
    background: linear-gradient(135deg, #86efac 0%, #22c55e 45%, #15803d 100%);
}

.vmt-contact__link--telegram {
    background: linear-gradient(135deg, #67e8f9 0%, #229ed9 55%, #0c4a6e 100%);
}
.vmt-contact__link--telegram:hover {
    background: linear-gradient(135deg, #a5f3fc 0%, #38bdf8 45%, #0284c7 100%);
}

.vmt-contact__link--whatsapp {
    background: linear-gradient(135deg, #86efac 0%, #25d366 55%, #15803d 100%);
}
.vmt-contact__link--whatsapp:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #4ade80 45%, #16a34a 100%);
}

.vmt-contact__link--zalo {
    background: linear-gradient(135deg, #60a5fa 0%, #0068ff 55%, #1e40af 100%);
}
.vmt-contact__link--zalo:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 45%, #1d4ed8 100%);
}

.vmt-contact__link--messenger {
    background: linear-gradient(45deg, #0a7cff 0%, #a033ff 55%, #ff5c87 100%);
}
.vmt-contact__link--messenger:hover {
    background: linear-gradient(135deg, #38c6ff 0%, #1d7bff 50%, #b24dff 100%);
}

.vmt-contact__link--ai {
    background: linear-gradient(135deg, #176dda 0%, #0b38a6 60%, #07246b 100%);
    border: none;
    cursor: pointer;
    padding: 0;
}
.vmt-contact__link--ai:hover {
    background: linear-gradient(135deg, #2582f5 0%, #0f47cc 60%, #0b38a6 100%);
}

/* Hide standalone AI Livechat launcher when integrated into floating contact */
#vmtChatLauncher {
    display: none !important;
}

/* Tooltip Label Element (Default Right-Aligned Layout: Tooltip on Left) */
.vmt-contact__label {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: #f8f8f8;
    color: #222222;
    font-size: 15px;
    line-height: 1;
    padding: 10px 14px;
    border-radius: 7px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: all 200ms ease-out;
    font-weight: 500;
}

/* Tooltip Label Element (Left-Aligned Layout: Tooltip on Right) */
.vmt-contact--left .vmt-contact__label {
    right: auto;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-8px);
}

@media (min-width: 768px) {
    .vmt-contact__label {
        font-size: 16px;
    }
}

.vmt-contact__link:hover .vmt-contact__label,
.vmt-contact__trigger:hover .vmt-contact__label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Icon Element */
.vmt-contact__icon {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    color:#fff !important;
}

/* Trigger Button Element */
button.vmt-contact__trigger,
.vmt-contact__trigger {
    margin: 0;
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    /* Xanh lá theo logo (trước: đỏ #ef4444 → #991b1b, rồi xanh dương) */
    background: linear-gradient(45deg, #009030 0%, #1fb954 50%, #009030 100%);
    box-shadow: 0 10px 26px rgba(0, 144, 48, 0.34);
    cursor: pointer;
    transition: transform 200ms ease-out;
}

.vmt-contact__trigger:hover {
    background: linear-gradient(45deg, #009030 0%, #3ccc6e 50%, #009030 100%);
    transform: scale(1.05);
}

/* Ping Animation Element */
.vmt-contact__ping {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: rgba(31, 185, 84, 0.4);
    animation: vmt-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes vmt-ping {
    75%, 100% {
        transform: scale(1.4);
        opacity: 0;
    }
}
