/* ===== أيقونة البروفايل في الهيدر ===== */

.profile-icon-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.profile-icon-btn:hover {
    background: rgba(139, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4), inset 0 0 15px rgba(139, 0, 0, 0.2);
}

.profile-icon-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== الحالات المختلفة ===== */
.profile-icon-btn:active {
    transform: scale(0.95);
}

.profile-icon-btn:focus {
    outline: 2px solid rgba(255, 215, 0, 0.5);
    outline-offset: 2px;
}

/* ===== للموبايل ===== */
@media (max-width: 768px) {
    .profile-icon-btn {
        width: 40px;
        height: 40px;
        border-width: 1.5px;
    }
    
    .profile-icon-btn:hover {
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .profile-icon-btn {
        width: 38px;
        height: 38px;
        border-width: 1px;
    }
}

/* ===== الحالة عند عدم تحميل الصورة ===== */
.profile-icon-btn.no-image .profile-icon-container {
    background: linear-gradient(135deg, #8B0000, #4a0000);
}

.profile-icon-btn.no-image .profile-icon-container::after {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 20px;
    color: #FFD700;
}

/* ===== الحركات والـ Animations ===== */
@keyframes profilePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0);
    }
}

.profile-icon-btn.pulse {
    animation: profilePulse 2s infinite;
}

/* ===== التوافق مع الـ RTL ===== */
[dir="rtl"] .profile-icon-btn {
    margin-left: 10px;
}

[dir="ltr"] .profile-icon-btn {
    margin-right: 10px;
}
