/* تصميم رفع الصور */
.image-upload-input {
    border: 2px dashed var(--border-color) !important;
    padding: 20px !important;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--dark-bg);
}

.image-upload-input:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 44, 0.1);
}

.upload-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* عرض الصور في الرسائل */
.message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.message-image:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

/* مشاهد الصورة الكبيرة */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* رسوم متحركة للصور */
@keyframes imageAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes imageDisappear {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* تحسين منطقة السحب والإفلات */
.drag-over {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 208, 132, 0.3);
}

/* تحسين معاينة الصور */
.image-preview-container {
    min-height: 50px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed transparent;
    transition: var(--transition);
}

.image-preview-container:not(:empty) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

/* تحسين أزرار الحذف */
.image-remove-btn:hover {
   background: #d32f2f !important;
   transform: scale(1.2) !important;
   box-shadow: 0 2px 8px rgba(211, 47, 47, 0.4);
}
