/* Timeline للملاحظات في المهام */

.notes-timeline-container {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.notes-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.notes-timeline-header h6 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.notes-count-badge {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Timeline */
.notes-timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.notes-timeline::before {
    content: '';
    position: absolute;
    right: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-right: 70px;
    padding-bottom: 30px;
    margin-bottom: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Timeline Icon */
.timeline-icon {
    position: absolute;
    right: 16px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid #007bff;
    z-index: 1;
}

.timeline-icon i {
    font-size: 14px;
    color: #007bff;
}

/* Note Types */
.timeline-item.note-type-warning .timeline-icon {
    border-color: #ffc107;
}

.timeline-item.note-type-warning .timeline-icon i {
    color: #ffc107;
}

.timeline-item.note-type-info .timeline-icon {
    border-color: #17a2b8;
}

.timeline-item.note-type-info .timeline-icon i {
    color: #17a2b8;
}

.timeline-item.note-type-success .timeline-icon {
    border-color: #28a745;
}

.timeline-item.note-type-success .timeline-icon i {
    color: #28a745;
}

/* Timeline Content */
.timeline-content {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent white;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.note-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.note-user-info {
    display: flex;
    flex-direction: column;
}

.note-user-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.note-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.note-action-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #6c757d;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.note-action-btn:hover {
    color: #007bff;
}

.note-action-btn.delete:hover {
    color: #dc3545;
}

.note-text {
    color: #495057;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-internal-badge {
    display: inline-block;
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

/* Add Note Form */
.add-note-form {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-note-form textarea {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.add-note-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.add-note-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.note-type-selector {
    display: flex;
    gap: 8px;
}

.note-type-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.note-type-btn:hover {
    background: #f8f9fa;
}

.note-type-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.note-type-btn.type-warning.active {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.note-type-btn.type-info.active {
    background: #17a2b8;
    border-color: #17a2b8;
}

.note-type-btn.type-success.active {
    background: #28a745;
    border-color: #28a745;
}

.add-note-submit {
    padding: 8px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.add-note-submit:hover {
    background: #0056b3;
}

.add-note-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Empty State */
.notes-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.notes-empty-state i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.notes-empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* Loading State */
.notes-loading {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.notes-loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .notes-timeline::before {
        right: 20px;
    }
    
    .timeline-item {
        padding-right: 50px;
    }
    
    .timeline-icon {
        right: 6px;
        width: 28px;
        height: 28px;
    }
    
    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .add-note-form-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .note-type-selector {
        justify-content: center;
    }
}

