/**
 * أنماط CSS للواجهة الأمامية لإضافة زر واتساب الاحترافي
 */

:root {
    --whatsapp-button-color: #25D366;
    --whatsapp-icon-color: #ffffff;
}

/* أنماط أساسية للزر */
.whatsapp-pro-button {
    position: fixed;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    background-color: var(--whatsapp-button-color, #25D366);
}

/* إعدادات خاصة للزر في الشورت كود */
.whatsapp-pro-button.shortcode-button {
    position: relative;
    display: inline-flex;
    margin: 10px 0;
}

/* موقع الزر */
.whatsapp-pro-button.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.whatsapp-pro-button.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.whatsapp-pro-button.position-middle-right {
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
}

.whatsapp-pro-button.position-middle-left {
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
}

/* شكل الزر */
.whatsapp-pro-button.shape-circle {
    border-radius: 50%;
}

.whatsapp-pro-button.shape-square {
    border-radius: 0;
}

.whatsapp-pro-button.shape-rounded {
    border-radius: 10px;
}

/* حجم الزر */
.whatsapp-pro-button.size-small {
    width: 40px;
    height: 40px;
}

.whatsapp-pro-button.size-medium {
    width: 60px;
    height: 60px;
}

.whatsapp-pro-button.size-large {
    width: 80px;
    height: 80px;
}

/* أنماط الزر مع العنوان */
.whatsapp-pro-button .whatsapp-button-with-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    width: auto;
    height: 100%;
}

.whatsapp-pro-button.size-small .whatsapp-button-with-label {
    min-width: 120px;
}

.whatsapp-pro-button.size-medium .whatsapp-button-with-label {
    min-width: 160px;
}

.whatsapp-pro-button.size-large .whatsapp-button-with-label {
    min-width: 200px;
}

.whatsapp-pro-button .whatsapp-button-with-label .whatsapp-icon {
    margin-right: 10px;
    flex: 0 0 auto;
}

.whatsapp-pro-button .whatsapp-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

/* أنماط أيقونة واتساب */
.whatsapp-pro-button .whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--whatsapp-icon-color, #ffffff);
}

.whatsapp-pro-button .whatsapp-icon img,
.whatsapp-pro-button .whatsapp-icon svg {
    width: 60%;
    height: auto;
    color: inherit;
}

/* إصلاح تنسيق الأيقونة */
.whatsapp-single-button .whatsapp-icon,
.whatsapp-main-button .whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* التحريكات */
.whatsapp-pro-button.animation-pulse {
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-pro-button.animation-bounce {
    animation: whatsapp-bounce 2s infinite;
}

.whatsapp-pro-button.animation-shake {
    animation: whatsapp-shake 1.5s infinite;
}

/* أنماط زر واحد */
.whatsapp-pro-button .whatsapp-single-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* أنماط الأرقام المتعددة */
.whatsapp-button-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.whatsapp-main-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

.whatsapp-numbers-list {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 200px;
    display: none;
    z-index: 10000;
}

.whatsapp-button-container:hover .whatsapp-numbers-list,
.whatsapp-main-button:focus + .whatsapp-numbers-list,
.whatsapp-numbers-list:hover {
    display: block;
}

.whatsapp-number-item {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
}

.whatsapp-number-item:hover {
    background-color: #f5f5f5;
}

.whatsapp-department {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.whatsapp-name {
    font-size: 14px;
    font-weight: bold;
}

/* تعريف التحريكات */
@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes whatsapp-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

@keyframes whatsapp-shake {
    0%, 100% {
        transform: rotate(0);
    }
    20%, 60% {
        transform: rotate(6deg);
    }
    40%, 80% {
        transform: rotate(-6deg);
    }
}

/* تحسينات للهواتف المحمولة */
@media screen and (max-width: 768px) {
    .whatsapp-pro-button.size-small {
        width: 40px;
        height: 40px;
    }
    
    .whatsapp-pro-button.size-medium,
    .whatsapp-pro-button.size-large {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-numbers-list {
        min-width: 180px;
    }
    
    .whatsapp-department {
        font-size: 11px;
    }
    
    .whatsapp-name {
        font-size: 13px;
    }
    
    .whatsapp-pro-button .whatsapp-button-with-label {
        padding: 8px 12px;
    }
    
    .whatsapp-pro-button.size-small .whatsapp-button-with-label,
    .whatsapp-pro-button.size-medium .whatsapp-button-with-label,
    .whatsapp-pro-button.size-large .whatsapp-button-with-label {
        min-width: 100px;
    }
    
    .whatsapp-pro-button .whatsapp-label {
        font-size: 12px;
    }
} 