/* Custom styles for TaskPilot application */

/* Custom CSS variables - TaskPilot brand colors */
:root {
  --taskpilot-primary: #3498db;  /* Blue */
  --taskpilot-secondary: #2ecc71; /* Green */
  --taskpilot-accent: #9b59b6;   /* Purple */
  --taskpilot-dark: #2c3e50;     /* Dark Blue */
  --taskpilot-light: #ecf0f1;    /* Light Gray */
  --taskpilot-warning: #f39c12;  /* Orange */
  --taskpilot-danger: #e74c3c;   /* Red */
  --taskpilot-info: #1abc9c;     /* Teal */
}

/* General layout adjustments */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-bottom: 2rem;
}

/* Navigation */
.navbar-brand {
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
    transition: all 0.4s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand:hover img {
    transform: rotate(45deg);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

.navbar-brand span {
    background: linear-gradient(90deg, var(--taskpilot-primary), var(--taskpilot-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--taskpilot-primary);
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-link:hover:before {
    visibility: visible;
    width: 100%;
}

/* Cards */
.card {
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.05);
    border-bottom: none;
    padding: 1rem 1.25rem;
}

/* Project cards */
.project-card .card-title {
    margin-bottom: 0.25rem;
}

.project-card .project-meta {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.project-card .project-description {
    margin-bottom: 1rem;
}

.pinned-item {
    border-left: 4px solid var(--bs-primary);
}

/* Task list */
.task-item {
    position: relative;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-item:last-child {
    border-bottom: none;
}

.task-done {
    background-color: rgba(25, 135, 84, 0.1);
}

.task-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.task-done .task-title {
    text-decoration: line-through;
    color: var(--bs-secondary);
}

.task-meta {
    font-size: 0.85rem;
    color: var(--bs-secondary);
}

.task-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drag-handle {
    cursor: grab;
    color: var(--bs-secondary);
    margin-right: 0.5rem;
}

.drag-handle:hover {
    color: var(--bs-primary);
}

/* Buttons & Actions */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.btn:hover::after {
    width: 150%;
    height: 150%;
    opacity: 0;
}

.btn-primary {
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.btn-danger {
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
}

.btn-success {
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.25);
}

.btn-secondary {
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.25);
}

.btn-outline-primary:hover {
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.btn-outline-danger:hover {
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
}

.btn-outline-success:hover {
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.25);
}

/* Icon pulse animation */
@keyframes icon-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.btn i, .nav-link i {
    transition: all 0.3s ease;
}

.btn:hover i, .nav-link:hover i {
    animation: icon-pulse 1s infinite;
}

/* Badges */
.badge {
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.badge:hover {
    transform: scale(1.1);
}

.badge.priority-low {
    background-color: var(--bs-info);
    box-shadow: 0 2px 5px rgba(13, 202, 240, 0.3);
}

.badge.priority-medium {
    background-color: var(--bs-warning);
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.3);
}

.badge.priority-high {
    background-color: var(--bs-danger);
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

/* Notes */
.note-card .card-body {
    min-height: 100px;
}

.note-content {
    white-space: pre-wrap;
}

/* Time tracking */
.timer-display {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    z-index: 1050;
    max-width: 300px;
    color: #fff;
    transition: all 0.3s ease;
    animation: slide-in-right 0.5s ease-out forwards;
}

.timer-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.4);
}

.timer-counter {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 0.25rem;
    text-align: center;
    letter-spacing: 2px;
}

@keyframes slide-in-right {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dashboard */
.welcome-banner {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border-left: 4px solid var(--bs-primary);
}

.welcome-banner:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.activity-feed .list-group-item {
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
    border-left: 0 solid var(--bs-primary);
}

.activity-feed .list-group-item:hover {
    border-left-width: 4px;
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.activity-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.list-group-item:hover .activity-icon {
    transform: scale(1.2);
    background-color: rgba(var(--bs-primary-rgb), 0.2);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    display: block;
    margin-top: 0.2rem;
}

.task-project-link {
    transition: all 0.3s ease;
    text-decoration: none;
}

.task-project-link:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.projects-card .list-group-item, 
.tasks-card .list-group-item {
    transition: all 0.3s ease;
    border-left: 0 solid transparent;
}

.projects-card .list-group-item:hover, 
.tasks-card .list-group-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    border-left-width: 4px;
    border-left-color: var(--bs-primary);
}

.pinned-item {
    background-color: rgba(255, 193, 7, 0.05);
}

.quick-actions-card .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-actions-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.quick-actions-card .btn:hover::before {
    left: 100%;
}

/* Status updates */
.status-updates .card {
    margin-bottom: 1rem;
}

.status-updates .version-badge {
    background-color: var(--bs-info);
}

/* Responsiveness */
@media (max-width: 767.98px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .btn-group {
        margin-top: 0.5rem;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-controls {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }
}

/* Sortable classes */
@keyframes drag-start {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

@keyframes hover-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.sortable-ghost {
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
    border: 2px dashed var(--bs-primary) !important;
    border-radius: 0.5rem !important;
    opacity: 0.7;
    transform: scale(0.98);
    box-shadow: none !important;
}

.sortable-chosen {
    background-color: rgba(var(--bs-dark-rgb), 0.1) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
    z-index: 10;
    animation: drag-start 0.3s ease;
    cursor: grabbing !important;
}

.sortable-drag {
    opacity: 0.9;
    transform: rotate(1deg) scale(1.02);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
}

.drag-handle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    position: relative;
}

.drag-handle {
    cursor: grab;
    color: var(--bs-secondary);
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed transparent;
}

/* Add a subtle animation to indicate draggability */
.drag-handle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--bs-primary-rgb), 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.drag-handle:hover::before {
    opacity: 1;
    animation: pulse-bg 2s infinite;
}

@keyframes pulse-bg {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.7; }
}

.drag-handle:hover {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    transform: scale(1.1);
}

.pulse-handle {
    animation: hover-pulse 1s infinite;
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.handle-highlight {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    transform: scale(1.2);
}

.being-dragged {
    border-color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}

/* Sortable list enhancements */
.sortable-list {
    position: relative;
    transition: all 0.3s ease;
}

.sortable-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, transparent, var(--bs-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sortable-list:hover::before {
    opacity: 0.5;
}

/* Sorting hint message */
.sort-hint {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(var(--bs-info-rgb), 0.2);
    transition: opacity 0.5s ease;
}

/* Task drag animation */
@keyframes task-highlight {
    0% { background-color: rgba(var(--bs-primary-rgb), 0); }
    50% { background-color: rgba(var(--bs-primary-rgb), 0.1); }
    100% { background-color: rgba(var(--bs-primary-rgb), 0); }
}

.task-item:has(.drag-handle:hover) {
    animation: task-highlight 2s infinite;
}

/* Drag feedback notification */
.drag-feedback-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--bs-primary);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 300px;
}

.drag-feedback-container.visible {
    transform: translateY(0);
    opacity: 1;
}

.feedback-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.feedback-message {
    font-weight: 500;
}

/* Auto-save status */
.last-saved {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--bs-secondary);
    margin-bottom: 1rem;
}
