/* assets/css/floating-button.css */

/* ------------------------------------------------------------------
 * 1. الأنماط الأساسية للأداة العائمة
 * ------------------------------------------------------------------ */

.pro-sl-floating-btn {
    /* أساسيات الموقع العائم */
    position: fixed;
    z-index: 9999;
    
    /* تصميم الحاوية والظلال */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ------------------------------------------------------------------
 * 2. مواضع الأيقونة (يتم التحكم بها من PHP)
 * ------------------------------------------------------------------ */

.pro-sl-bottom-right {
    bottom: 20px;
    right: 20px;
}

.pro-sl-bottom-left {
    bottom: 20px;
    left: 20px;
}

.pro-sl-top-right {
    top: 20px;
    right: 20px;
}

.pro-sl-top-left {
    top: 20px;
    left: 20px;
}

/* ------------------------------------------------------------------
 * 3. زر المشاركة (المرئي)
 * ------------------------------------------------------------------ */

#pro-sl-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    /* تصميم الزر */
    background: #4C9AFF;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    padding: 10px 15px;
}

#pro-sl-share-btn:hover {
    background: #3B7DD8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

#pro-sl-share-btn:active {
    transform: translateY(0);
}

.pro-sl-icon {
    font-size: 1.5em;
    line-height: 1;
}

.pro-sl-text {
    font-size: 1em;
    font-weight: 600;
    white-space: nowrap;
    direction: rtl;
}

/* ------------------------------------------------------------------
 * 4. أحجام الأيقونة (يتم التحكم بها من PHP)
 * ------------------------------------------------------------------ */

.pro-sl-small #pro-sl-share-btn {
    padding: 8px 12px;
}
.pro-sl-small .pro-sl-icon {
    font-size: 1.3em;
}
.pro-sl-small .pro-sl-text {
    font-size: 0.9em;
}

.pro-sl-medium #pro-sl-share-btn {
    padding: 12px 18px;
}
.pro-sl-medium .pro-sl-icon {
    font-size: 1.6em;
}
.pro-sl-medium .pro-sl-text {
    font-size: 1.1em;
}

.pro-sl-large #pro-sl-share-btn {
    padding: 15px 22px;
}
.pro-sl-large .pro-sl-icon {
    font-size: 2em;
}
.pro-sl-large .pro-sl-text {
    font-size: 1.2em;
}

/* ------------------------------------------------------------------
 * 5. رسائل الحالة والنتيجة
 * ------------------------------------------------------------------ */

.pro-sl-message {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9em;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 250px;
    white-space: normal;
    direction: rtl;
}

/* حاوية الإجراءات بعد النجاح */
.pro-sl-result-actions {
    background: #F0F8FF;
    border: 1px solid #D1E7FF;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    text-align: right;
    direction: rtl;
}

#pro-sl-result-address {
    margin: 0 0 15px 0;
    font-size: 0.95em;
    color: #1E40AF;
    font-weight: 500;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

#pro-sl-result-address a {
    color: #4C9AFF;
    text-decoration: none;
}

#pro-sl-result-address a:hover {
    text-decoration: underline;
}

/* أزرار الإجراءات (النسخ/الواتساب/الإغلاق) */
.pro-sl-action-btn {
    background: #4C9AFF;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: background-color 0.2s;
    margin-top: 8px;
    width: 100%;
    display: block;
}

.pro-sl-action-btn:hover {
    background: #3B7DD8;
}

.pro-sl-whatsapp {
    background: #25D366;
}

.pro-sl-whatsapp:hover {
    background: #128C7E;
}

.pro-sl-close {
    background: #EF4444;
}

.pro-sl-close:hover {
    background: #DC2626;
}

/* إخفاء رسالة التحميل بعد العرض */
.pro-sl-message.hide {
    display: none;
}

/* ------------------------------------------------------------------
 * 6. تصميم متجاوب للهواتف
 * ------------------------------------------------------------------ */

@media (max-width: 768px) {
    .pro-sl-floating-btn {
        gap: 8px;
    }
    
    .pro-sl-result-actions {
        max-width: 280px;
        margin: 0 10px;
    }
    
    #pro-sl-result-address {
        font-size: 0.9em;
    }
    
    .pro-sl-bottom-right,
    .pro-sl-bottom-left {
        bottom: 10px;
    }
    
    .pro-sl-top-right,
    .pro-sl-top-left {
        top: 10px;
    }
}