/**
 * Enhanced Activity Manager Styles
 * 
 * Comprehensive styling for the interactive activity management system
 * including drag-and-drop boards, rich activity cards, and enhanced UX
 */

/* Enhanced Master Plan Modal */
.enhanced-activity-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    backdrop-filter: blur(4px);
}

.enhanced-master-plan {
    margin: auto;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: none;
}

/* Enhanced Header */
.enhanced-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.plan-metrics {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.metric-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.enhanced-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.enhanced-close:hover {
    opacity: 1;
}

/* Enhanced Body */
.enhanced-body {
    padding: 1.5rem;
    background: #f8f9fa;
    max-height: 70vh;
    overflow-y: auto;
}

/* Progress Overview */
.progress-overview {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    max-width: 100%;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.quick-actions .btn {
    border-radius: 6px;
    font-weight: 500;
}

/* Activity Status Board */
.activity-status-board {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    min-height: 400px;
}

/* Status Column */
.status-column {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.status-column.drag-over {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
    transform: scale(1.02);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.column-title {
    font-weight: 600;
    flex: 1;
}

.activity-count {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Activity List */
.activity-list {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-activity-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    color: #6c757d;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.status-column.drag-over .add-activity-placeholder {
    border-color: #007bff;
    color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

/* Activity Card */
.activity-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: grab;
    position: relative;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.activity-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    cursor: grabbing;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem 0.5rem;
}

.activity-priority {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
}

.activity-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-card:hover .activity-actions {
    opacity: 1;
}

.activity-action-btn {
    padding: 0.25rem;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Card Body */
.card-body {
    padding: 0 1rem 1rem;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #212529;
}

.activity-description {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Progress Bar */
.activity-card .progress {
    background: #e9ecef;
    border-radius: 2px;
}

/* Assignee */
.activity-assignee {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.assignee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 24px;
    height: 24px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
}

.assignee-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.assignee-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assignee-role {
    font-size: 0.625rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Due Date */
.activity-due-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.activity-due-date.overdue {
    color: #dc3545;
}

.activity-due-date.overdue i {
    color: #dc3545;
}

/* Subtasks */
.subtasks {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Tags */
.activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.activity-tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.125rem 0.375rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: lowercase;
}

/* Enhanced Footer */
.enhanced-footer {
    background: white;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Quick Add Activity Modal */
#quickAddActivityModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#quickAddActivityModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

#quickAddActivityModal .btn-close {
    filter: invert(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-master-plan {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .status-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .plan-metrics {
        justify-content: center;
        gap: 1rem;
    }
    
    .quick-actions {
        justify-content: center;
    }
    
    .enhanced-footer {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .enhanced-body {
        background: #1a1a1a;
    }
    
    .activity-status-board,
    .progress-overview {
        background: #2d2d2d;
        color: #e9ecef;
    }
    
    .activity-card {
        background: #3a3a3a;
        border-color: #495057;
        color: #e9ecef;
    }
    
    .activity-card:hover {
        background: #404040;
    }
    
    .status-column {
        background: #2a2a2a;
        border-color: #495057;
    }
    
    .column-header {
        background: #3a3a3a;
        color: #e9ecef;
    }
}

/* Animation for status changes */
@keyframes statusChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.activity-card.status-changed {
    animation: statusChange 0.5s ease-in-out;
}

/* Drop zone active state */
.drop-zone-active {
    border-style: solid !important;
    border-color: #007bff !important;
    background: rgba(0, 123, 255, 0.02) !important;
}

.drop-zone-active .add-activity-placeholder {
    border-color: #007bff;
    color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

/* Enhanced drag feedback */
.activity-card.dragging {
    opacity: 0.6;
    transform: rotate(3deg) scale(0.95);
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Drag over column highlighting */
.activity-list.drag-over {
    background: rgba(0, 123, 255, 0.08) !important;
    border-radius: 8px;
}

/* Column count badge animation */
.activity-count {
    transition: all 0.3s ease;
}

.activity-count.updated {
    background: #28a745;
    color: white;
    transform: scale(1.2);
}

/* Loading States */
.activity-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}

.activity-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}