/* ==========================================================================
   PORTAL: FLOATING WIDGETS (HOTLINE, ZALO) & GLOBAL ALERTS
   ========================================================================== */

/* Floating Actions Widgets: Hotline and Zalo Quick Connect */
.floating-actions {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 999;
    align-items: flex-end;
}

.floating-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.45);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.08);
}

.floating-btn:active {
    transform: scale(0.95);
}

/* Zalo Button: Official Zalo Royal Blue Gradient with Glow */
.floating-btn-zalo {
    background: linear-gradient(135deg, #0088ff 0%, #005ae0 100%) !important;
    box-shadow: 0 8px 22px rgba(0, 104, 255, 0.45) !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
}

.floating-btn-zalo:hover {
    box-shadow: 0 12px 28px rgba(0, 104, 255, 0.65) !important;
    transform: translateY(-3px) scale(1.08) !important;
}

/* Fanpage / Messenger Button: Official Facebook Messenger Brand Gradient */
.floating-btn-fanpage {
    background: linear-gradient(135deg, #00B2FE 0%, #006AFF 50%, #9B00E8 100%) !important;
    box-shadow: 0 8px 22px rgba(0, 106, 255, 0.45) !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
}

.floating-btn-fanpage:hover {
    box-shadow: 0 12px 28px rgba(155, 0, 232, 0.65) !important;
    transform: translateY(-3px) scale(1.08) !important;
}

.floating-btn-fanpage i,
.floating-btn-fanpage .floating-icon-wrap {
    color: #ffffff !important;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Phone Button: Vibrant Emerald Calling Gradient with Ripple Rings */
.floating-btn-phone {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
}

.floating-btn-phone:hover {
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.7) !important;
    transform: translateY(-3px) scale(1.08) !important;
}

/* Continuous Expanding Ripple Waves for Phone */
.floating-btn-phone::before,
.floating-btn-phone::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid rgba(34, 197, 94, 0.65) !important;
    pointer-events: none;
    animation: phonePulseRing 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.floating-btn-phone::after {
    animation-delay: 1.1s;
}

@keyframes phonePulseRing {
    0% {
        transform: scale(0.9);
        opacity: 0.95;
    }
    70% {
        transform: scale(1.48);
        opacity: 0;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Icon wrap & Phone Ring Vibration */
.floating-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.floating-btn-phone i {
    font-size: 1.35rem;
    color: #ffffff !important;
    animation: phoneWiggle 2.4s infinite ease-in-out;
}

@keyframes phoneWiggle {
    0%, 100% { transform: rotate(0deg); }
    6%, 22% { transform: rotate(-16deg) scale(1.05); }
    14%, 30% { transform: rotate(16deg) scale(1.05); }
    38% { transform: rotate(0deg); }
}

/* Tooltip: Glassmorphic Floating Pill */
.floating-tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 9px;
    height: 9px;
    background: rgba(15, 23, 42, 0.88);
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.floating-btn:hover .floating-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .floating-actions {
        bottom: 20px;
        right: 16px;
        gap: 12px;
    }
    .floating-btn {
        width: 48px;
        height: 48px;
    }
    .floating-btn-phone i {
        font-size: 1.15rem;
    }
    .floating-tooltip {
        display: none;
    }
}



/* Global Alert styling for messages */
.global-alert {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 1001;
    background-color: var(--white);
    border-radius: 6px;
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInAlert 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--accent-red);
}

@keyframes slideInAlert {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.global-alert-error {
    border-left-color: var(--accent-red);
}

.global-alert-success {
    border-left-color: var(--accent-green);
}

