/* ======================================= */
/* ====== DESKTOP ACTION BAR STYLES ====== */
/* ======================================= */

/* Mobile-first: ẩn desktop action bar */
.desktop-action-bar {
    display: none;
}

/* Hiển thị trên PC */
@media (min-width: 769px) {
    .desktop-action-bar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: fixed;
        right: 25px;
        bottom: 30px;
        z-index: 1000;
    }

    .desktop-action-bar .action-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #4CAF50; /* xanh nông nghiệp */
        color: #fff;
        position: relative;
        cursor: pointer;
        font-size: 1.5rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .desktop-action-bar .action-button:hover {
        transform: translateY(-3px) scale(1.05);
        background-color: #66BB6A;
        box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    }

    /* Nút riêng biệt theo loại */
    .action-button.hotline { background-color: #e74c3c; }
    .action-button.zalo { background-color: #0068ff; }
    .action-button.messenger { background-color: #0084ff; }
    .action-button.cart { background-color: #28a745; }
    .action-button.scroll-to-top { background-color: #1B5E20; }

    /* Icon trong button */
    .action-button .action-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    /* Badge */
    .action-button .action-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ff4757;
        color: #fff;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        font-size: 11px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #fff;
        flex-shrink: 0;
    }

    /* Tooltip */
    .action-button .action-tooltip {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        right: 120%;
        top: 50%;
        transform: translateY(-50%);
        background-color: #333;
        color: #fff;
        padding: 6px 12px;
        border-radius: 5px;
        white-space: nowrap;
        font-size: 14px;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: 1001;
    }

    .action-button:hover .action-tooltip {
        visibility: visible;
        opacity: 1;
    }

    /* Ẩn scroll-to-top mặc định, sẽ hiển thị khi cuộn */
    .scroll-to-top {
        display: none;
    }
}

/* ====================================== */
/* ====== MOBILE ACTION BAR STYLES ====== */
/* ====================================== */

.mobile-action-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-action-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        z-index: 2000;
    }

    .mobile-action-bar .action-bar-content {
        display: flex;
        justify-content: space-around;
        align-items: stretch;
        max-width: 600px;
        margin: 0 auto;
    }

    .mobile-action-bar .action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        cursor: pointer;
        padding: 0.5rem 0.2rem;
        color: #333;
        text-decoration: none;
        transition: background-color 0.2s;
    }

    .mobile-action-bar .action-item:active {
        background-color: #f0f0f0;
    }

    .mobile-action-bar .action-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        margin-bottom: 4px;
        position: relative;
        flex-shrink: 0;
        color: #28a745;
    }

    .mobile-action-bar .action-item .calling i { color: #e74c3c; }
    .mobile-action-bar .action-icon img { width: 28px; height: auto; }

    .mobile-action-bar .action-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ff4757;
        color: #fff;
        border-radius: 50%;
        min-width: 18px;
        height: 18px;
        padding: 2px;
        font-size: 10px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #fff;
    }

    .mobile-action-bar .action-label {
        font-size: 0.75rem;
        color: #333;
        text-align: center;
    }

    body {
        padding-bottom: 70px !important;
    }
}

/* Video icon nổi bật */
.action-button.video { background-color: #ff9800; }
.mobile-action-bar .action-item .fa-play { color: #ff9800; }
@media (min-width: 769px) {
    .desktop-action-bar .action-button.video { display: none !important; }
}

