/**
 * Floating Social Button - دکمه شناور شبکه اجتماعی
 * طراحی مینیمال و جذاب - فقط آیکون دایره‌ای
 * 
 * @package Kowsh
 * @version 1.0.0
 */

/* ========================================
   Floating Button Container
======================================== */
.kowsh-floating-button {
    position: fixed;
    z-index: 9999;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #9e0b0f;
    box-shadow: 0 8px 24px rgba(158, 11, 15, 0.4),
                0 4px 12px rgba(158, 11, 15, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    /* Animation - ظاهر شدن */
    animation: floatingButtonAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               floatingButtonFloat 3s ease-in-out 0.6s infinite;
    opacity: 0;
    transform: scale(0) translateY(20px);
}

.kowsh-floating-button--left {
    right: auto;
    left: 30px;
}

/* All platforms use same color - زرشکی */
.kowsh-floating-button--whatsapp,
.kowsh-floating-button--telegram,
.kowsh-floating-button--instagram,
.kowsh-floating-button--custom {
    background: #9e0b0f;
    box-shadow: 0 8px 24px rgba(158, 11, 15, 0.4),
                0 4px 12px rgba(158, 11, 15, 0.3);
}

/* No hover effects */

/* Button Icon - Speech Bubble - Always Visible */
.kowsh-floating-button__icon {
    width: 26px;
    height: 26px;
    fill: none !important;
    stroke: #fff1e2 !important;
    stroke-width: 2;
    z-index: 2;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #fff1e2 !important;
}

/* Ensure icon paths are always visible with correct color */
.kowsh-floating-button svg.kowsh-floating-button__icon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #fff1e2 !important;
}

.kowsh-floating-button svg.kowsh-floating-button__icon path,
.kowsh-floating-button svg.kowsh-floating-button__icon line {
    stroke: #fff1e2 !important;
    fill: none !important;
    color: #fff1e2 !important;
}

/* No hover effects on icon */
.kowsh-floating-button:hover .kowsh-floating-button__icon,
.kowsh-floating-button:hover svg.kowsh-floating-button__icon,
.kowsh-floating-button:hover svg.kowsh-floating-button__icon path,
.kowsh-floating-button:hover svg.kowsh-floating-button__icon line {
    stroke: #fff1e2 !important;
    fill: none !important;
    color: #fff1e2 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hide text always */
.kowsh-floating-button__text {
    display: none !important;
}

.kowsh-floating-button--with-text {
    width: 55px;
    height: 55px;
    padding: 0;
    border-radius: 50%;
    min-width: 55px;
}

/* ========================================
   Animations
======================================== */

/* Animation - ظاهر شدن جذاب */
@keyframes floatingButtonAppear {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px) rotate(-180deg);
    }
    60% {
        transform: scale(1.1) translateY(-5px) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

/* Animation - شناور شدن سبک */
@keyframes floatingButtonFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Animation - Pulse سبک */
@keyframes floatingButtonPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(158, 11, 15, 0.4),
                    0 4px 12px rgba(158, 11, 15, 0.3);
    }
    50% {
        box-shadow: 0 10px 28px rgba(158, 11, 15, 0.5),
                    0 6px 16px rgba(158, 11, 15, 0.4);
    }
}

/* ========================================
   Responsive Design
======================================== */

/* Tablet */
@media (max-width: 991px) {
    .kowsh-floating-button {
        bottom: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
    }
    
    .kowsh-floating-button--left {
        left: 25px;
    }
    
    .kowsh-floating-button__icon {
        width: 24px;
        height: 24px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .kowsh-floating-button {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
    
    .kowsh-floating-button--left {
        left: 20px;
    }
    
    .kowsh-floating-button__icon {
        width: 22px;
        height: 22px;
    }
    
    .kowsh-floating-button--with-text {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .kowsh-floating-button {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .kowsh-floating-button--left {
        left: 15px;
    }
    
    .kowsh-floating-button__icon {
        width: 20px;
        height: 20px;
    }
    
    .kowsh-floating-button--with-text {
        width: 45px;
        height: 45px;
        min-width: 45px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .kowsh-floating-button {
        bottom: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }
    
    .kowsh-floating-button--left {
        left: 12px;
    }
    
    .kowsh-floating-button__icon {
        width: 18px;
        height: 18px;
    }
}

/* Hide on specific pages if needed */
body.woocommerce-checkout .kowsh-floating-button,
body.woocommerce-cart .kowsh-floating-button {
    display: none;
}

