/* =============================================
   Phone Buttons SDL - Styles v1.4
   Compatible with Flatsome & all themes
   ============================================= */

/* ---- Soft reset - avoid killing backgrounds ---- */
#pbsdl-container,
#pbsdl-container * {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    list-style: none !important;
    float: none !important;
    clear: none !important;
    text-transform: none !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    outline: none !important;
}

/* ---- Container ---- */
#pbsdl-container {
    position: fixed !important;
    bottom: 20px !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    pointer-events: none !important;
    background: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

#pbsdl-container.pbsdl-left {
    left: 20px !important;
    right: auto !important;
}

#pbsdl-container.pbsdl-right {
    right: 20px !important;
    left: auto !important;
}

/* ---- Each item row ---- */
#pbsdl-container .pbsdl-item {
    pointer-events: auto !important;
    position: relative !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
}

#pbsdl-container.pbsdl-left .pbsdl-item {
    justify-content: flex-start !important;
}

#pbsdl-container.pbsdl-right .pbsdl-item {
    justify-content: flex-end !important;
}

/* ---- Rings Container ---- */
#pbsdl-container .pbsdl-rings {
    position: absolute !important;
    width: 60px !important;
    height: 60px !important;
    top: 50% !important;
    margin-top: -30px !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* Center of icon is exactly 20px from the left edge of the button */
#pbsdl-container.pbsdl-left .pbsdl-rings {
    left: 20px !important;
    margin-left: -30px !important;
    /* -30px to center the 60px wide box exactly on the 20px mark */
}

/* Center of icon is exactly 20px from the right edge of the button */
#pbsdl-container.pbsdl-right .pbsdl-rings {
    right: 20px !important;
    margin-right: -30px !important;
}

/* ---- Ringing animation outer circle ---- */
#pbsdl-container .pbsdl-ring-outer {
    position: absolute !important;
    width: 62px !important;
    height: 62px !important;
    border-radius: 50% !important;
    top: 50% !important;
    left: 50% !important;
    margin-top: -31px !important;
    margin-left: -31px !important;
    animation: pbsdl-zoom 2s infinite ease-in-out !important;
    z-index: 1 !important;
}

/* ---- Ring inner pulsing ---- */
#pbsdl-container .pbsdl-ring-inner {
    position: absolute !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    top: 50% !important;
    left: 50% !important;
    margin-top: -24px !important;
    margin-left: -24px !important;
    z-index: 2 !important;
    animation: pbsdl-pulse 1.5s infinite ease-in-out !important;
}

/* ---- Single Seamless Pill Button ---- */
#pbsdl-container a.pbsdl-btn {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    border-radius: 20px !important;
    /* Perfect pill shape */
    cursor: pointer !important;
    color: #fff !important;
    z-index: 5 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    opacity: 1 !important;
    overflow: hidden !important;
    /* Ensures no contents spill out of pill */
}

#pbsdl-container.pbsdl-left a.pbsdl-btn {
    flex-direction: row !important;
    padding: 0 16px 0 3px !important;
    /* Less padding on left due to icon circle */
}

#pbsdl-container.pbsdl-right a.pbsdl-btn {
    flex-direction: row-reverse !important;
    padding: 0 3px 0 16px !important;
    /* Less padding on right due to icon */
}

#pbsdl-container a.pbsdl-btn:hover,
#pbsdl-container a.pbsdl-btn:focus,
#pbsdl-container a.pbsdl-btn:active,
#pbsdl-container a.pbsdl-btn:visited {
    color: #fff !important;
    opacity: 1 !important;
}

/* ---- Icon circle (White circle inside pill) ---- */
#pbsdl-container .pbsdl-icon {
    position: relative !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 50% !important;
    background-color: #fff !important;
    /* White circle background */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: pbsdl-shake 2s infinite ease-in-out !important;
}

#pbsdl-container .pbsdl-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
}

/* ---- Label text ---- */
#pbsdl-container .pbsdl-label {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    line-height: normal !important;
}

#pbsdl-container.pbsdl-left .pbsdl-label {
    margin-left: 8px !important;
}

#pbsdl-container.pbsdl-right .pbsdl-label {
    margin-right: 8px !important;
}

/* =============================================
   COLOR SCHEME - Apply background to the entire pill!
   ============================================= */

/* -- Phone 1: Red -- */
#pbsdl-container .pbsdl-item-1 .pbsdl-ring-outer {
    background-color: rgba(220, 38, 38, 0.3) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-1 .pbsdl-ring-inner {
    background-color: rgba(220, 38, 38, 0.5) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-1 a.pbsdl-btn {
    background-color: #dc2626 !important;
    background-image: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

#pbsdl-container .pbsdl-item-1 .pbsdl-icon svg {
    fill: #dc2626 !important;
    /* Red phone inside white circle */
}

/* -- Phone 2: Blue -- */
#pbsdl-container .pbsdl-item-2 .pbsdl-ring-outer {
    background-color: rgba(37, 99, 235, 0.3) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-2 .pbsdl-ring-inner {
    background-color: rgba(37, 99, 235, 0.5) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-2 a.pbsdl-btn {
    background-color: #2563eb !important;
    background-image: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

#pbsdl-container .pbsdl-item-2 .pbsdl-icon svg {
    fill: #2563eb !important;
    /* Blue phone inside white circle */
}

/* -- Phone 3: Green -- */
#pbsdl-container .pbsdl-item-3 .pbsdl-ring-outer {
    background-color: rgba(22, 163, 74, 0.3) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-3 .pbsdl-ring-inner {
    background-color: rgba(22, 163, 74, 0.5) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-3 a.pbsdl-btn {
    background-color: #16a34a !important;
    background-image: linear-gradient(135deg, #16a34a, #15803d) !important;
}

#pbsdl-container .pbsdl-item-3 .pbsdl-icon svg {
    fill: #16a34a !important;
    /* Green phone inside white circle */
}

/* -- Zalo: Zalo Blue -- */
#pbsdl-container .pbsdl-item-zalo .pbsdl-ring-outer {
    background-color: rgba(0, 104, 255, 0.3) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-zalo .pbsdl-ring-inner {
    background-color: rgba(0, 104, 255, 0.5) !important;
    background-image: none !important;
}

#pbsdl-container .pbsdl-item-zalo a.pbsdl-btn {
    background-color: #0068ff !important;
    background-image: linear-gradient(135deg, #0068ff, #004ecc) !important;
}

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes pbsdl-shake {
    0% {
        transform: rotate(0deg) scale(1);
    }

    5% {
        transform: rotate(-20deg) scale(1.05);
    }

    10% {
        transform: rotate(20deg) scale(1.05);
    }

    15% {
        transform: rotate(-20deg) scale(1.05);
    }

    20% {
        transform: rotate(20deg) scale(1.05);
    }

    25% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(0deg) scale(1);
    }
}

@keyframes pbsdl-zoom {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.4;
    }

    100% {
        transform: scale(0.85);
        opacity: 0.8;
    }
}

@keyframes pbsdl-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.9;
    }
}

/* =============================================
   HOVER
   ============================================= */
#pbsdl-container a.pbsdl-btn:hover {
    filter: brightness(1.1) !important;
    transform: translateY(-1px) !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    #pbsdl-container {
        bottom: 12px !important;
        gap: 12px !important;
    }

    #pbsdl-container.pbsdl-left {
        left: 10px !important;
    }

    #pbsdl-container.pbsdl-right {
        right: 10px !important;
    }

    #pbsdl-container .pbsdl-item {
        height: 44px !important;
    }

    #pbsdl-container.pbsdl-left .pbsdl-rings {
        left: 18px !important;
    }

    #pbsdl-container.pbsdl-right .pbsdl-rings {
        right: 18px !important;
    }

    #pbsdl-container a.pbsdl-btn {
        height: 36px !important;
        border-radius: 18px !important;
    }

    #pbsdl-container .pbsdl-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    #pbsdl-container .pbsdl-icon svg {
        width: 16px !important;
        height: 16px !important;
    }

    #pbsdl-container .pbsdl-label {
        font-size: 13px !important;
    }
}

/* Flatsome sticky footer / Mobile nav overrides */
body.has-sticky-footer #pbsdl-container {
    bottom: 65px !important;
}