/* Floating Action Buttons - Celebrato */
/* Support and Task buttons with vertical text like in the reference image */

/* ========== FLOATING BUTTONS CONTAINER ========== */
.floating-buttons {
    position: fixed;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    /* Ensure proper mobile viewport handling */
    max-height: calc(100vh - 2rem);
    overflow: visible;
    /* Prevent buttons from being cut off */
    box-sizing: border-box;
    /* Handle safe areas for devices with notches */
    right: max(1rem, env(safe-area-inset-right) + 0.5rem);
}

/* ========== WHATSAPP BUTTON ========== */
.floating-whatsapp {
    background: #25d366;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 1rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 50px;
    height: 120px;
    gap: 0.5rem;
    animation: pulse-whatsapp 2s infinite;
}

.floating-whatsapp:hover {
    background: #128c7e;
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.floating-whatsapp i {
    font-size: 1.2rem;
    transform: rotate(90deg);
}

/* ========== CALL SUPPORT BUTTON ========== */
.floating-call {
    background: #0dcaf0;
    color: #000;
    border: none;
    border-radius: 15px;
    padding: 1rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 50px;
    height: 120px;
    gap: 0.5rem;
}

.floating-call:hover {
    background: #0aa2c0;
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(13, 202, 240, 0.4);
    color: #000;
    text-decoration: none;
}

.floating-call i {
    font-size: 1.2rem;
    transform: rotate(90deg);
}

/* ========== VERTICAL TEXT STYLING ========== */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ========== ANIMATIONS ========== */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3), 0 0 0 8px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
}

/* ========== RESPONSIVE DESIGN ========== */

/* Mobile devices */
@media (max-width: 768px) {
    .floating-buttons {
        right: max(0.75rem, env(safe-area-inset-right) + 0.25rem);
        gap: 0.3rem;
        top: 50%;
        transform: translateY(-50%);
        /* Ensure buttons don't get cut off */
        max-height: calc(100vh - 2rem);
        overflow: visible;
    }
    
    .floating-whatsapp,
    .floating-call {
        width: 32px;
        height: 90px;
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
        /* Ensure buttons are fully visible */
        min-height: 90px;
        box-sizing: border-box;
    }
    
    .vertical-text {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }
    
    .floating-whatsapp i,
    .floating-call i {
        font-size: 1rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .floating-buttons {
        right: max(0.5rem, env(safe-area-inset-right) + 0.25rem);
        gap: 0.25rem;
    }
    
    .floating-whatsapp,
    .floating-call {
        width: 28px;
        height: 80px;
        padding: 0.3rem 0.15rem;
        font-size: 0.65rem;
    }
    
    .vertical-text {
        font-size: 0.65rem;
        letter-spacing: 0.2px;
    }
    
    .floating-whatsapp i,
    .floating-call i {
        font-size: 0.9rem;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 991px) {
    .floating-buttons {
        right: 0.8rem;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .floating-buttons {
        right: 1rem;
    }
}

/* ========== MOBILE TOUCH IMPROVEMENTS ========== */
@media (max-width: 768px) {
    /* Hide floating buttons on mobile */
    .floating-buttons {
        display: none !important;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .floating-whatsapp {
        animation: none;
    }
    
    .floating-whatsapp:hover,
    .floating-call:hover {
        transform: none;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .floating-buttons {
        display: none;
    }
}
