/**
 * Floating Action Button - Frontend Styles
 * Handles the positioning and styling of the floating action button
 */

/* Base container styles */
.fab-container {
    position: fixed;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Position variations */
.fab-container.fab-bottom-right {
    bottom: 30px;
    right: 30px;
}

.fab-container.fab-bottom-left {
    bottom: 30px;
    left: 30px;
}

.fab-container.fab-top-right {
    top: 30px;
    right: 30px;
}

.fab-container.fab-top-left {
    top: 30px;
    left: 30px;
}

/* Button base styles */
.fab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    color: #fff;
    font-size: 28px;
}

/* Hover effect */
.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

/* Icon-specific colors */
.fab-button.fab-icon-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.fab-button.fab-icon-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
}

.fab-button.fab-icon-phone {
    background: linear-gradient(135deg, #34C759 0%, #2BA64A 100%);
}

.fab-button.fab-icon-email {
    background: linear-gradient(135deg, #FF9500 0%, #E68600 100%);
}

.fab-button.fab-icon-telegram {
    background: linear-gradient(135deg, #0088CC 0%, #006BA3 100%);
}

.fab-button.fab-icon-custom {
    background: linear-gradient(135deg, #667EEA 0%, #5568D3 100%);
}

/* Custom icon image styling */
.fab-custom-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Icon styling */
.fab-button i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Active/Click effect */
.fab-button:active {
    transform: scale(0.95);
}

/* Accessibility - Focus styles */
.fab-button:focus {
    outline: 3px solid rgba(66, 153, 225, 0.5);
    outline-offset: 3px;
}

/* Tablet responsive adjustments */
@media screen and (max-width: 768px) {
    .fab-container.fab-bottom-right,
    .fab-container.fab-bottom-left {
        bottom: 20px;
    }

    .fab-container.fab-top-right,
    .fab-container.fab-top-left {
        top: 20px;
    }

    .fab-container.fab-bottom-right,
    .fab-container.fab-top-right {
        right: 20px;
    }

    .fab-container.fab-bottom-left,
    .fab-container.fab-top-left {
        left: 20px;
    }

    .fab-button {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }

    .fab-custom-icon {
        width: 32px;
        height: 32px;
    }
}

/* Mobile responsive adjustments */
@media screen and (max-width: 480px) {
    .fab-container.fab-bottom-right,
    .fab-container.fab-bottom-left {
        bottom: 15px;
    }

    .fab-container.fab-top-right,
    .fab-container.fab-top-left {
        top: 15px;
    }

    .fab-container.fab-bottom-right,
    .fab-container.fab-top-right {
        right: 15px;
    }

    .fab-container.fab-bottom-left,
    .fab-container.fab-top-left {
        left: 15px;
    }

    .fab-button {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .fab-custom-icon {
        width: 28px;
        height: 28px;
    }
}

/* Animation for entrance */
@keyframes fabSlideIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fab-container {
    animation: fabSlideIn 0.5s ease-out;
}

/* Pulse animation on hover for attention */
@keyframes fabPulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Optional: Add pulse effect every few seconds for attention
.fab-button {
    animation: fabPulse 2s infinite;
}
*/

/* Print media - hide button when printing */
@media print {
    .fab-container {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .fab-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    .fab-container {
        animation: none;
        transition: none;
    }

    .fab-button {
        transition: none;
    }

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