/* ===== COMPLETE TASK SYSTEM - MOVED FROM STYLE.CSS ===== */

/* ===== TASK ANIMATIONS ===== */
@keyframes moveUp {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-10px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes moveDown {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Animations for sidebar tasks only - modal has its own in task-modal.css */
.task-item.task-moving-up,
#todo-list li.task-moving-up { 
    animation: moveUp 0.3s ease-out; 
}

.task-item.task-moving-down,
#todo-list li.task-moving-down { 
    animation: moveDown 0.3s ease-out; 
}

/* ===== BASE TASK SYSTEM ===== */
#todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Task Items - Base Layout */
.task-item,
#todo-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-secondary) !important;
    background: var(--accent-bg-light, rgba(102, 126, 234, 0.05)) !important;
    border: 1px solid var(--accent-border-light, rgba(102, 126, 234, 0.2)) !important;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    position: relative !important;
    overflow: hidden;
    /* Ensure enough space for absolute positioned buttons */
    padding-right: 45px !important;
    min-height: 60px !important;
}

.task-item::before,
#todo-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--text-cyan) !important;
    opacity: 0;
    transition: var(--transition);
}

.task-item:hover,
#todo-list li:hover {
    background: var(--accent-bg-medium, rgba(102, 126, 234, 0.1)) !important;
    border-color: var(--text-cyan) !important;
    transform: translateX(2px);
    box-shadow: 0 4px 12px var(--accent-shadow-light, rgba(102, 126, 234, 0.15)) !important;
}

.task-item:hover::before,
#todo-list li:hover::before {
    opacity: 1;
}

.task-item.completed,
#todo-list li.completed {
    background: var(--accent-bg-lighter, rgba(0, 255, 136, 0.05)) !important;
    border-color: var(--accent-green, #00ff88) !important;
    opacity: 0.8;
}

.task-item.completed::before,
#todo-list li.completed::before {
    background: var(--accent-green, #00ff88) !important;
    opacity: 1;
}

/* Task Checkbox */
.task-checkbox {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-cyan) !important;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.task-checkbox:hover {
    border-color: var(--text-cyan) !important;
    box-shadow: 0 0 12px var(--accent-shadow-medium, rgba(102, 126, 234, 0.4)) !important;
    transform: scale(1.05);
}

.task-checkbox:checked {
    background: linear-gradient(135deg, var(--text-cyan), var(--text-cyan)) !important;
    border-color: var(--text-cyan) !important;
    box-shadow: 0 0 15px var(--accent-shadow-strong, rgba(102, 126, 234, 0.6)) !important;
}

.task-checkbox:checked::after {
    content: '✓';
    color: var(--primary-bg) !important;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: checkmark 0.3s ease-in-out;
}

/* Task Text */
.task-text {
    flex: 1;
    font-weight: bold;
    line-height: 1.4;
    color: #F9FAFB; /* Higher contrast white for better readability */
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
    word-wrap: break-word;
}

.task-text.completed {
    text-decoration: line-through;
    opacity: 0.7;
    color: var(--accent-green, #00ff88) !important;
}

.task-item:hover .task-text,
#todo-list li:hover .task-text {
    color: var(--text-primary) !important;
}

/* Task Categories */
.task-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 2px;
    width: fit-content;
    transition: var(--transition);
}

.task-category:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.task-item.completed .task-category,
#todo-list li.completed .task-category {
    opacity: 0.6;
    filter: grayscale(30%);
}

/* Empty States */
#todo-list:empty::after,
.tasks-empty-state {
    content: '📝 Nu ai task-uri încă. Adaugă unul cu "adauga task [descriere]"';
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 10px;
}

/* ===== TASK MANAGEMENT ENHANCEMENTS ===== */
/* Priority and Due Date Styling */

/* Task content structure */
.task-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.task-metadata {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* Priority badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.priority-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.priority-low {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.priority-medium {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.priority-high {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.priority-urgent {
    background: rgba(233, 30, 99, 0.2) !important;
    color: #e91e63 !important;
    border: 1px solid rgba(233, 30, 99, 0.4) !important;
    animation: urgentPulse 2s ease-in-out infinite !important;
}

@keyframes urgentPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.4);
        transform: scale(1);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 4px rgba(233, 30, 99, 0);
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* Due date badges */
.due-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.due-date-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Overdue tasks special styling */
.task-item:has(.due-date-badge:contains("Întârziat")) {
    border-left: 3px solid #f44336;
    background: rgba(244, 67, 54, 0.05);
}

/* ===== TASK ACTIONS SYSTEM ===== */
/* Actions container should be static so buttons position relative to task-item */
.task-item .task-actions,
#todo-list li .task-actions {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 8px !important;
    /* Container is visible but buttons control their own opacity */
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Task edit button styling - positioned top-right */
.task-item .task-edit,
#todo-list li .task-edit {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(79, 195, 247, 0.1) !important;
    border: 1px solid rgba(79, 195, 247, 0.3) !important;
    color: #4fc3f7 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transform: scale(0.8) !important;
    z-index: 10 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    /* Force visibility over any other styles */
    visibility: visible !important;
}

/* Override conflicting styles from style.css - HIGHER SPECIFICITY */
.task-item:hover .task-actions .task-edit,
.task-item:hover .task-edit,
#todo-list li:hover .task-actions .task-edit,
#todo-list li:hover .task-edit {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.task-item .task-edit:hover,
#todo-list li .task-edit:hover {
    background: rgba(79, 195, 247, 0.2) !important;
    border-color: #4fc3f7 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.3) !important;
}

.task-item .task-edit:active,
#todo-list li .task-edit:active {
    transform: scale(0.95) !important;
}

/* Task delete button styling - positioned bottom-right */
.task-item .task-delete,
#todo-list li .task-delete {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    background: rgba(244, 67, 54, 0.1) !important;
    border: 1px solid rgba(244, 67, 54, 0.3) !important;
    color: #f44336 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transform: scale(0.8) !important;
    z-index: 10 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    /* Force visibility over any other styles */
    visibility: visible !important;
}

.task-item:hover .task-actions .task-delete,
.task-item:hover .task-delete,
#todo-list li:hover .task-actions .task-delete,
#todo-list li:hover .task-delete {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.task-item .task-delete:hover,
#todo-list li .task-delete:hover {
    background: rgba(244, 67, 54, 0.2) !important;
    border-color: #f44336 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3) !important;
}

/* Priority Grid Selector */
.priority-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px 0;
    margin: 4px 0;
}

.priority-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    text-align: center;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.priority-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.priority-option:hover::before {
    opacity: 1;
}

.priority-option.selected {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.priority-option.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    color: currentColor;
    font-size: 12px;
    font-weight: bold;
}

.priority-icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.priority-option:hover .priority-icon {
    transform: scale(1.1);
}

.priority-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: currentColor;
    opacity: 0.9;
}

.priority-option:hover .priority-label {
    opacity: 1;
}

/* Priority grid focus styles for keyboard navigation */
.priority-grid:focus-within .priority-option.selected {
    outline: 2px solid rgba(79, 195, 247, 0.6);
    outline-offset: 2px;
}

/* Responsive priority grid */
@media (max-width: 480px) {
    .priority-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .priority-option {
        min-height: 60px;
        padding: 8px 4px;
    }
    
    .priority-icon {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .priority-label {
        font-size: 9px;
    }
}

/* Modal enhancements for priority and due date */
.noah-modal .form-field {
    margin-bottom: 16px;
}

.noah-modal select[multiple] {
    height: auto;
    min-height: 120px;
}

.noah-modal input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #4fc3f7;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.noah-modal input[type="date"]:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3);
    outline: none;
}

.noah-modal input[type="date"]::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234fc3f7"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg>') no-repeat center;
    background-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.noah-modal input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Priority select styling */
.noah-modal select option {
    background: #121426;
    color: #ffffff;
    padding: 8px;
    border: none;
}

.noah-modal select option[value="low"] {
    color: #4caf50;
}

.noah-modal select option[value="medium"] {
    color: #ff9800;
}

.noah-modal select option[value="high"] {
    color: #f44336;
}

.noah-modal select option[value="urgent"] {
    color: #e91e63;
    font-weight: bold;
}

/* Task list sorting enhancements */
.task-group-wrapper[data-priority="urgent"] {
    order: 1;
}

.task-group-wrapper[data-priority="high"] {
    order: 2;
}

.task-group-wrapper[data-priority="medium"] {
    order: 3;
}

.task-group-wrapper[data-priority="low"] {
    order: 4;
}

/* Task Group Header Category Name - Capitalize */
.task-group-header span {
    text-transform: uppercase;
}

/* ===== RESPONSIVE TASK ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .task-item,
    #todo-list li {
        padding: 10px 12px;
        font-size: 14px;
        gap: 12px;
        padding-right: 45px !important;
    }
    
    .task-checkbox {
        width: 20px;
        height: 20px;
    }
    
    .task-category {
        font-size: 9px;
        padding: 1px 6px;
        letter-spacing: 0.3px;
    }
    
    .task-metadata {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .priority-badge,
    .due-date-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .task-content {
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .task-item,
    #todo-list li {
        padding: 8px 10px;
        gap: 10px;
        font-size: 13px;
        padding-right: 45px !important;
    }
    
    .task-checkbox {
        width: 18px;
        height: 18px;
    }
    
    .task-category {
        font-size: 8px;
        padding: 1px 5px;
        letter-spacing: 0.2px;
    }
    
    .task-metadata {
        margin-top: 2px;
    }
    
    .priority-badge,
    .due-date-badge {
        font-size: 8px;
        padding: 1px 3px;
        border-radius: 6px;
    }
}

/* FINAL OVERRIDE - Force our button positioning over style.css conflicts */
/* Hide old task-rename buttons completely */
.task-item .task-rename,
#todo-list li .task-rename {
    display: none !important;
}

/* Override style.css for our new buttons */
.task-item:hover .task-delete,
#todo-list li:hover .task-delete {
    /* Override style.css translateX with our positioning */
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* Ensure edit button shows properly */
.task-item:hover .task-edit,
#todo-list li:hover .task-edit {
    opacity: 1 !important;
    transform: scale(1) !important;
} 

/* Enhanced Priority Icon Styles */
.priority-badge i {
    font-size: 12px;
    margin-right: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 0 2px currentColor);
}

.modal-task-item .priority-badge i {
    font-size: 14px;
    margin-right: 6px;
}

/* Priority specific icon animations */
.priority-high i {
    animation: highFlicker 2s ease-in-out infinite;
}

@keyframes highFlicker {
    0%, 90%, 100% { 
        opacity: 1;
    }
    95% { 
        opacity: 0.7;
    }
}

/* Priority grid icon styling */
.priority-grid .priority-icon i {
    font-size: 20px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 3px currentColor);
    transition: all 0.3s ease;
}

.priority-option:hover .priority-icon i {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px currentColor);
}

.priority-option.selected .priority-icon i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px currentColor);
    animation: selectedPriorityPulse 2s ease-in-out infinite;
}

@keyframes selectedPriorityPulse {
    0%, 100% { 
        transform: scale(1.1);
    }
    50% { 
        transform: scale(1.2);
    }
} 

/* ===== PRIORITY FILTER CHECKBOXES - JARVIS STYLE ===== */
/* 
 * Stilurile pentru priority filters au fost mutate în ui-components/buttons.css
 * pentru centralizare și reutilizare
 */

/* Responsive adjustments */
/* 
 * Stilurile responsive pentru priority filters au fost mutate în ui-components/buttons.css
 * pentru centralizare și reutilizare
 */