/* ============================================================================
   SMARTCRM 360 - TASK DETAIL MODAL STYLES V20.0.1
   Beautiful detail view with modern design
   Comprehensive information display with gradients and responsive layout
   ============================================================================ */

/* Detail Modal Container */
.detail-modal-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

/* Header */
.detail-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1;
}

.task-status-indicator {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.task-status-indicator i {
    font-size: 24px;
}

.task-status-indicator.completed {
    background: rgba(34, 197, 94, 0.3);
}

.header-text {
    flex: 1;
}

.task-detail-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
    line-height: 1.3;
}

.task-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.task-badge.important {
    background: rgba(251, 191, 36, 0.3);
}

.task-badge.my-day {
    background: rgba(249, 115, 22, 0.3);
}

/* Body */
.detail-modal-body {
    padding: 32px 40px;
    overflow-y: auto;
    flex: 1;
}

/* Sections */
.detail-section {
    margin-bottom: 32px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section-title i {
    color: #667eea;
    font-size: 18px;
}

.detail-section-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

/* Task Notes */
.task-notes {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0;
    white-space: pre-wrap;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Linked Entity Card */
.linked-entity-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.linked-entity-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.entity-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.entity-info {
    flex: 1;
}

.entity-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.entity-type {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Timeline */
.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #cbd5e1;
}

.timeline-item i {
    color: #64748b;
    font-size: 16px;
}

.timeline-item.completed {
    border-left-color: #22c55e;
}

.timeline-item.completed i {
    color: #22c55e;
}

.timeline-item span {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

/* Footer */
.detail-modal-footer {
    padding: 24px 40px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    gap: 16px;
}

.footer-left,
.footer-right {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .detail-modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .detail-modal-header {
        padding: 24px 20px;
    }
    
    .task-detail-title {
        font-size: 20px;
    }
    
    .detail-modal-body {
        padding: 20px;
    }
    
    .detail-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-left,
    .footer-right {
        width: 100%;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
.detail-modal-body::-webkit-scrollbar {
    width: 8px;
}

.detail-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.detail-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.detail-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
