/* Todo Details & Expanded View */
.todo-item {
    transition: all 0.3s ease;
}

.todo-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
}

.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-title-wrapper {
    position: relative;
}

.todo-title {
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    color: hsl(var(--foreground));
    word-break: break-word;
    display: block;
    padding: 2px 4px;
    border-radius: calc(var(--radius) * 0.5);
    transition: background 0.2s;
}

.todo-title:hover {
    background: hsl(var(--muted) / 0.3);
}

.todo-title-input {
    width: 100%;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 2px 4px;
    border: 1px solid hsl(var(--primary));
    border-radius: calc(var(--radius) * 0.5);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: inherit;
    outline: none;
}

.todo-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.date-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--muted-foreground));
    border-radius: calc(var(--radius) * 0.5);
    white-space: nowrap;
}

.todo-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.expand-btn {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    border-radius: calc(var(--radius) * 0.5);
    transition: all 0.2s;
}

.expand-btn:hover {
    background: hsl(var(--muted) / 0.3);
    color: hsl(var(--foreground));
}

.expand-btn svg {
    transition: transform 0.3s ease;
}

/* Details Section */
.todo-details {
    padding: 1rem;
    background: hsl(var(--muted) / 0.1);
    border-top: 1px solid hsl(var(--border));
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.detail-field {
    margin-bottom: 1rem;
}

.detail-field:last-child {
    margin-bottom: 0;
}

.detail-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.detail-input {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) * 0.75);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: inherit;
    transition: all 0.2s;
}

.detail-input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.1);
}

.description-input {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Priority Colors - Using subtle background colors instead of border */
.priority-low {
    background: hsl(var(--card));
}

.priority-medium {
    background: hsl(210, 40%, 98%);
}

.priority-high {
    background: hsl(40, 40%, 98%);
}

.priority-urgent {
    background: hsl(0, 40%, 98%);
}

/* Dark mode priority colors */
@media (prefers-color-scheme: dark) {
    .priority-medium {
        background: hsl(210, 20%, 12%);
    }
    
    .priority-high {
        background: hsl(40, 20%, 12%);
    }
    
    .priority-urgent {
        background: hsl(0, 20%, 12%);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .detail-row {
        grid-template-columns: 1fr;
    }
    
    .todo-main {
        padding: 0.75rem;
    }
    
    .todo-details {
        padding: 0.75rem;
    }
}