/* تصميم قائمة المرفقات */
.attachments-container {
    margin-top: 2rem;
    direction: rtl;
}

.attachments-title {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.attachments-title::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%234a5568" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>') no-repeat center;
    margin-left: 8px;
}

.attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}









.attachment-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 14px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* تأثير متموج خفيف */
.attachment-item::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(241, 245, 249, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(15deg);
    pointer-events: none;
}

.attachment-item:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 70%, #e2e8f0 100%);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    border-color: #cbd5e0;
}

/* النسخة الداكنة (Dark Mode) */
.dark .attachment-item {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    border-color: #475569;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark .attachment-item:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 70%, #475569 100%);
    border-color: #64748b;
}

.dark .attachment-item::before {
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(100, 116, 139, 0.1) 50%,
        transparent 100%
    );
}







.attachment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.attachment-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex-grow: 1;
    transition: color 0.2s;
}

.attachment-link:hover {
    color: #2b6cb0;
}

.attachment-link::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%234a5568" viewBox="0 0 24 24"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg>') no-repeat center;
    margin-left: 10px;
}

.attachment-size {
    color: #718096;
    font-size: 0.875rem;
    margin-right: auto;
    padding-right: 10px;
}

/* تأثيرات للتفاعل */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.attachment-item:active {
    animation: pulse 0.3s ease;
}

/* أيقونات حسب نوع الملف */
.attachment-link[href$=".pdf"]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23e53e3e" viewBox="0 0 24 24"><path d="M8 11.5v.5h1.5v-.5H8zm2.5 0v.5H12v-.5h-1.5zM8 13v.5h1.5V13H8zm2.5 0v.5H12V13h-1.5zM14 9h-4v1.5h4V9zm-1 6.5H12V15h1v.5zM14 13h-1.5v.5H14V13zm-1-1h1.5v-.5H13V12zm-5 1v1h1.5v-1H8zm2.5-3V9H9v1h1.5zm0 2.5V12H9v.5h1.5z"/><path d="M6 2v20h12V8l-6-6zm8 17H10v-1.5h4V19zm0-3.5h-1V15H10v1H8v-4h6v3.5zm0-4.5v-3h1.5v3H14z"/></svg>');
}

.attachment-link[href$=".doc"],
.attachment-link[href$=".docx"]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%232b6cb0" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>');
}

.attachment-link[href$=".xls"],
.attachment-link[href$=".xlsx"]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%232f855a" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>');
}

.attachment-link[href$=".zip"],
.attachment-link[href$=".rar"]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23975a16" viewBox="0 0 24 24"><path d="M10 2H4c-1.1 0-1.99.9-1.99 2L2 20c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8l-6-6zm4 18H8v-1h6v1zm0-3H8v-1h6v1zm-1-5V3.5L18.5 12H13z"/></svg>');
}