/* ============================================
   FLOATING BUTTON STYLES
   ============================================ */

/* Container untuk floating button */
.floating-button-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* Floating button aktif (visible) */
.floating-button-container.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Tombol floating */
.floating-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* Hover effect */
.floating-button:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 12px 32px rgba(52, 152, 219, 0.6);
}

/* Active/Click effect */
.floating-button:active {
    transform: translateY(-4px) scale(1.05);
}

/* Ripple effect background */
.floating-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.floating-button:active::before {
    width: 300px;
    height: 300px;
}

/* Icon animation */
.floating-button i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.floating-button:hover i {
    animation: slideUp 0.6s ease;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .floating-button-container {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .floating-button {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .floating-button-container {
        bottom: 1rem;
        right: 1rem;
    }

    .floating-button {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }

    .floating-button:hover {
        transform: translateY(-6px) scale(1.08);
        box-shadow: 0 10px 28px rgba(52, 152, 219, 0.5);
    }
}

/* Extra small devices (320px and below) */
@media (max-width: 320px) {
    .floating-button-container {
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .floating-button {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus state untuk keyboard navigation */
.floating-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-button-container,
    .floating-button,
    .floating-button i {
        transition: none;
        animation: none;
    }

    .floating-button:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .floating-button {
        box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
    }

    .floating-button:hover {
        box-shadow: 0 12px 32px rgba(52, 152, 219, 0.5);
    }
}
