/* =========================================================
   Floating Quick-Action Buttons (Call + Line Chat)
   Positioned bottom-right, modern UI, mobile-friendly.
   ========================================================= */

.cm-float-actions {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 9999;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: end;
        -ms-flex-align: end;
            align-items: flex-end;
    gap: 14px;
}

.cm-float-actions__item {
    position: relative;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    text-decoration: none !important;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

.cm-float-actions__btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    color: #fff !important;
    font-size: 24px;
    text-decoration: none !important;
    -webkit-box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    -webkit-transition: -webkit-transform 0.25s ease, box-shadow 0.25s ease;
    transition: -webkit-transform 0.25s ease;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cm-float-actions__btn:hover {
    -webkit-transform: translateY(-3px);
        -ms-transform: translateY(-3px);
            transform: translateY(-3px);
    -webkit-box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

/* Phone button */
.cm-float-actions__btn--phone {
    background: -webkit-linear-gradient(135deg, #f10202, #530b00);
    background: linear-gradient(135deg, #f10202, #530b00);
}

/* Line button */
.cm-float-actions__btn--line {
    background: -webkit-linear-gradient(135deg, #f10202, #530b00);
    background: linear-gradient(135deg, #f10202, #530b00);
}

/* Pulsing ring on the Line (chat) button to draw attention */
.cm-float-actions__btn--line::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgb(195 0 0 / 0.55);
    z-index: -1;
    -webkit-animation: cm-fa-pulse 2.2s ease-out infinite;
            animation: cm-fa-pulse 2.2s ease-out infinite;
}

@-webkit-keyframes cm-fa-pulse {
    0%   { -webkit-transform: scale(1);   transform: scale(1);   opacity: 0.8; }
    100% { -webkit-transform: scale(1.7); transform: scale(1.7); opacity: 0; }
}

@keyframes cm-fa-pulse {
    0%   { -webkit-transform: scale(1);   transform: scale(1);   opacity: 0.8; }
    100% { -webkit-transform: scale(1.7); transform: scale(1.7); opacity: 0; }
}

/* Tooltip label shown on hover (desktop) */
.cm-float-actions__label {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 999px;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity 0.2s ease, visibility 0.2s ease;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.cm-float-actions__label::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(17, 24, 39, 0.92);
}

.cm-float-actions__item:hover .cm-float-actions__label {
    opacity: 1;
    visibility: visible;
}

/* Mobile: hide tooltip labels, show a compact quick-call / chat widget */
@media (max-width: 767px) {
    .cm-float-actions {
        right: 16px;
        bottom: 16px;
        gap: 12px;
    }

    .cm-float-actions__btn {
        width: 52px;
        height: 52px;
        font-size: 21px;
    }

    .cm-float-actions__label {
        display: none;
    }
}
