/* ==========================================================================
   BUBBLE DOWNLOAD CATALOG COMPONENT (buble-pdf.css)
   ========================================================================== */

.bubble-catalog-container {
    position: fixed;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    background-color: #121824 !important; /* Warna gelap pekat agar kontras di light & dark mode */
    border: 2px solid #3b82f6 !important;
    border-radius: 50px;
    padding: 0.45rem 0.6rem 0.45rem 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

/* Kondisi saat ditutup lewat tombol X */
.bubble-catalog-container.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
}

/* Link area */
.bubble-catalog-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #ffffff !important;
    text-decoration: none;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.bubble-catalog-link:hover {
    color: #93c5fd !important;
}

/* Ikon dokumen putih bersih & jelas */
.bubble-catalog-icon {
    font-size: 1.15rem;
    color: #ffffff !important;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Tombol Close X */
.btn-close-bubble {
    background: transparent;
    border: none;
    color: #cbd5e1 !important;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem 0 0.5rem;
    margin-left: 0.4rem;
    border-left: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.btn-close-bubble:hover {
    color: #ff4d4f !important;
}

/* ==========================================================================
   DESKTOP VIEW (Floating Mengambang di Kanan Bawah)
   ========================================================================== */
@media (min-width: 769px) {
    .bubble-catalog-container {
        right: 2rem;
        bottom: 2rem;
        animation: floatBubbleDesktop 3.5s ease-in-out infinite;
    }

    .bubble-text.mobile-only {
        display: none !important;
    }

    .bubble-text.desktop-only {
        display: inline-block;
        color: #ffffff !important;
    }

    @keyframes floatBubbleDesktop {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-8px);
        }
    }
}

/* ==========================================================================
   MOBILE VIEW (Pojok Kiri Bawah, Ikon Putih Jumbo, Expand saat Klik)
   ========================================================================== */
@media (max-width: 768px) {
    .bubble-catalog-container {
        left: 1.1rem;
        right: auto;
        bottom: 5.2rem;
        width: 58px;
        height: 58px;
        min-width: 58px;
        min-height: 58px;
        padding: 0;
        border-radius: 50px;
        justify-content: center;
        overflow: hidden;
        cursor: pointer;
        background-color: #121824 !important;
        border: 2px solid #3b82f6 !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
        transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    padding 0.35s ease,
                    box-shadow 0.3s ease;
    }

    .bubble-catalog-link {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
    }

    /* Ikon besar & putih bersih di mode mobile */
    .bubble-catalog-icon {
        font-size: 1.85rem !important;
        color: #ffffff !important;
        display: block;
        line-height: 1;
    }

    .bubble-text.desktop-only {
        display: none !important;
    }

    .bubble-text.mobile-only {
        display: inline-block;
        font-size: 0.95rem;
        font-weight: 700;
        color: #ffffff !important;
        white-space: nowrap;
        max-width: 0;
        opacity: 0;
        transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
        margin-left: 0;
    }

    .btn-close-bubble {
        display: none;
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    /* --- SAAT DI-KLIK (MEMANJANG) --- */
    .bubble-catalog-container.is-expanded {
        width: auto;
        padding: 0.6rem 1rem 0.6rem 1.15rem;
        gap: 0.65rem;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    }

    .bubble-catalog-container.is-expanded .bubble-catalog-link {
        width: auto;
        gap: 0.75rem;
    }

    .bubble-catalog-container.is-expanded .bubble-text.mobile-only {
        max-width: 220px;
        opacity: 1;
        margin-left: 0.5rem;
    }

    .bubble-catalog-container.is-expanded .btn-close-bubble {
        display: flex;
        opacity: 1;
        font-size: 1.5rem;
        padding-left: 0.7rem;
        margin-left: 0.4rem;
        border-left: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    }
}